Developer forum

Forum » Templates » After update to 8.3.0.0 @GetValue() stopped working

After update to 8.3.0.0 @GetValue() stopped working

Dmitrij Jazel
Reply

Hi guys,

Just wanted to ask if anyone runned into similar problem, I have a filter, and products in product catalog.

After moving to 8.3.0.0 I updated index, made sure filters are up to date, and product catalog in in place.

 

Funny thing... in eCommerce @GetValue("dwtag") is not working, @foreach (LoopItem i in GetLoop("VariantOptions")) is working aswell as other loops. So Razor works. just GetValue method stopped working for some reason.

 

Does anyone has any suggestions why something like this could ever happen?

 


Replies

 
Nicolai Høeg Pedersen
Reply

GetValue now returns an object. Use GetString instead.

 

In 8.2 Razor was beta - now it is released and that is why we allowed our selfes to make changes.

 
Dmitrij Jazel
Reply

Hmm, ok, well I was quite surprised to see this!

So if I correctly understand you, I have to change all of my GetValue() to GetString() expressions? What if I keep my GetValue()?

Cause after the Hotfix it actually works perfectly. Except I had to use another method to compare values, I used to use "==" now I used string.Compare(a, b)

It's just I used GetValue() quite extensively.

Just want to make sure that my shop wouldn't go down suddenly after another update.

Thanks for info :-)

 

 
Nicolai Høeg Pedersen
Reply

GetValue changed from always returning a string to now return an object of the type of data, i.e. DateTime, String, Integer, Double etc.

 

So GetValue will work in most scenarios where you have a string returned from the template.

 

Nicolai

 
Dmitrij Jazel
Reply

Nice! :-)

Thanks allot for great info! :-)

 

You must be logged in to post in the forum