Developer forum

Forum » Templates » Ecom -> Product and variants

Ecom -> Product and variants


Reply
Hi all,

I am developing a new site. It is a fashion-site with dresses. Each dress has a color and a size. This means, that when you list all dresses - you have one image. When you are showing details - you may use more images. On another color you might even show another image.

This doesn't work for me.

Product in backend:

Mainproduct
Imagesmall: "dress_black.jpg"

Variant: XS/Black:

Imagesmall: ""

Variant XS/White:

Imagesmall: "dress_white.jpg"

My problem is as follows:

When I show the product XS/Black - there is no image. It only appears when I select XS/White. I know the "easy" solution is to put "dress_black.jpg" on that variant. BUT I can't do that on 5000+ imported products.
Is there any way I can have a "fallback" to my main-products image?

Hope you can help me...

best regards

Kenneth




Replies

 
Reply
Hi Kenneth,
 
I suggest using ProductTemplateExtender, it is quite easy (see http://engage.dynamicweb-cms.com/Admin/Public/Download.aspx?File=Files%2fFiler%2fDocumentation%2fDevelopment%2feCommerce%2f(en-US)+eCommerce+Extensibility+API%2c++Dynamicweb+eCommerce.pdf ). So you can specify your own tag and render it as you want. In your case you can check if product has empty Imagesmall and render the main product image instead.
 
Best regards,
Michael
 
 
 
 
Reply

We have created a feature request regarding "force images" from main product to empty image fields in extended variants.

When a main product is created with images selected in Media and you create an extended variant, then the variant will get the media files from the main product (together with content from other product fields). This is intended, but when you start changing the extended variant, then it gets "its own life" as a new "product".
If the image fields is emptied for the variant, then it means that the variant doesn't have images.

BUT we understand the issue and has created a feature request.

In the meantime it is possible to work with the variants and get the requested solution - even though you need to change your variants.

Maybe you can use this method:

- Select images for your main product in Media and save BEFORE you create variants.
- Enable your extended variants
- If you change your variants then don't change the image paths in Media for the variant (they should be the same as in main product)

Notice:
- If you have created/saved your extended variants (orange variant icon) BEFORE you selected your images for the main product, then you don't get the same images for your variant.
- Then you need to delete the variant (open variant - Delete -> variant icon is now grey again)
- Now you can open the variant again and it should get the image fields filled with the same as main product (and it's same for all product fields). 


(Language and variant field differentiation is enabled for the image fields in Management Center - Ecom settings- Advanced - Language)

 

You must be logged in to post in the forum