Developer forum

Forum » Ecommerce - Standard features » Variant Image
Adrian Ursu
Reply

Hi Guys,

 

I have this situation:

Shop with mixed products. Some have variants some don;t.

In the product list we display for all ProductImages based on usual template tags. No problem so far.

But when the user ads a variant in the cart, the Product Image is no longer displayed because it is assigned to the parent product and not to the variant.

Is there any way to use a single Image tag in the OrderlinesLoop for both type of products?

If not, can this be added as a feature request? I find it unusual to need to find workarounds for a typical scenario like this.

Thank you,

Adrian 


Replies

 
Alexander Gubenko
Reply

Hi Adrian,

Thank you for your request.

1) Ensure that the variant has image which different from product image.

2) What version DW you use?

3) Are you use "Use alt images" feature? I mean http://manual.dynamicweb-cms.com/Dynamicweb-eCommerce/Modules/Product-Catalog/Alternative-product-images.aspx

 

 

 
Adrian Ursu
Reply

Hi Alexander,

The Variant does not have an image. Only the parent products has. That's the issue.

I am using 8.6.1.5

I am not using "alt images", the images are stores in the image fields of the parent product

Thank you,

Adrian

 
Alexander Gubenko
Reply

Hi Adrian,

You could use OrderLineTemplateExtender to solve your issue. I did simple sketch for you. see attachement.

 
Adrian Ursu
Reply

Thanks a lot Alexander.

For some reason, I cannot download the file.

However, this might be a workaround to the problem, but shouldn't this be a native functionality?

Whenever you whant to display an image for a product, loook for the regular rules (alt image, stored image) then, if it's a variant, do the same for the parent product.
This will simplify things a lot and will avoid custom code and you can have one single loop for the orderlines without if's or else's.
Don't you think?

Thanks,

Adrian

 

 

You must be logged in to post in the forum