I've installed the above recently and am now trying to do something very simple. I have assigned a Content Type to a Product and trying to render the Image property for a Product. When I select an Image and save it looks to have save fine, no errors in UI or Console but when I try render and look in immediate window:
Model.HasProperty("image")
true
This suggests the ContentType association has worked but HasValue is always false:
In the back office you've added an image to a media picker on a content type associated with your product.
The image shows in the back office associated with the product.
Your view that has some model that implements IProductContent
Are you saying?
@{
var condition1 = Model.HasProperty("image"); // is true
var condition2 = Model.HasValue("image"); // is false
var image = Model.GetPropertyValue("image"); // is not null???
}
@{
var condition1 = Model.HasProperty("image"); // is true
var condition2 = Model.HasValue("image"); // is false
var image = Model.GetPropertyValue("image"); // is null
}
i.e. It has the property, it looks saved in the backend but never appears to save the value.
Aha, you pointing me to that table has revealed that there are two versions of the product, one for en-GB and one for en-US - I had initially removed en-US from this site but I think I had to put it back in as some packages were complaining about it being missing.
I think I will just leave it as it is in future :S
One last thing, when I go to a listing page it shows me the image set for en-GB, (currently set in culture and hostnames) but when I click through to the product (www.mysite.com/product-slug) I get the US version.
I suppose I can set the same image twice for each product as a workaround if it can't be helped but is there a better way to set the culture?
Thanks again for a great product and all of your help.
Product Images Not Rendering
Hello,
Umbraco Version: 7.5.9 Merchello Version: 2.4.0 FastTrack: 2.4.0
I've installed the above recently and am now trying to do something very simple. I have assigned a Content Type to a Product and trying to render the Image property for a Product. When I select an Image and save it looks to have save fine, no errors in UI or Console but when I try render and look in immediate window:
Model.HasProperty("image") true
This suggests the ContentType association has worked but HasValue is always false:
Model.HasValue("image") false
Any ideas?
Thanks, Liam
Hey Liam
Assuming:
Are you saying?
Hi Rusty,
Your assumptions are correct but the output is:
i.e. It has the property, it looks saved in the backend but never appears to save the value.
Thanks, Liam
Hey Liam,
There has to be something else in the mix ... we definitively would have noticed that if it was systemic.
If you return to the back office is the image still associated with the picker?
You can check the
merchProductVariantDetachedContect
table to see if there are values associated with the productVariantKey ...Can you post the code from the view (and controller if you're building the model)?
Aha, you pointing me to that table has revealed that there are two versions of the product, one for en-GB and one for en-US - I had initially removed en-US from this site but I think I had to put it back in as some packages were complaining about it being missing.
I think I will just leave it as it is in future :S
One last thing, when I go to a listing page it shows me the image set for en-GB, (currently set in culture and hostnames) but when I click through to the product (www.mysite.com/product-slug) I get the US version.
I suppose I can set the same image twice for each product as a workaround if it can't be helped but is there a better way to set the culture?
Thanks again for a great product and all of your help.
Liam
I just removed en-US again and looks good so far, thanks for you help Rusty
This is a bit a confusion for an user...How to configure content for a language or another?
I found how to configure. In action there is the button.
is working on a reply...