Developer forum

Forum » Ecommerce - Standard features » Alt. images in ecom

Alt. images in ecom

Thomas Schroll
Reply

Hi

I'm trying to override the alt. images functionality in ecom by placing an image on a product.

In the cookbook it says: "This will not conflict with images already attached to products but simply run "on top" of the normal image handling in Dynamicweb eCommerce." (http://developer.dynamicweb-cms.com/documentation/cookbooks-(solution-set)/solution-set/ecommerce/product-catalog.aspx).

Does anybody know if it is possible to override the alt. images functionality, and if so how?

Regards Thomas


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Thomas

Not quite sure what your are trying to achieve. You cannot override that method that finds the alternative image directly. But you can add a new template tag using a product template extender: http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.eCommerce.Products.ProductTemplateExtender.html

That will give you an additional tag that you create holding the image path.

Then you can do a conditional in your template:

If Defined(MyAlternativeImageTag)

Else

EndIf

BR Nicolai

 
Thomas Schroll
Reply

Hi Nicolai

Thanks, but that's not quite the solution I was hoping for.

I have a couple of products where I would like to use the same image, but I need to give them different numbers. Instead of having the same image with different names in the archive I would like to change the images on the particular product in ecom. That way I only have to keep track of a single file. I just thought it would be a good idea to be able to choose an alternative (override) image to the alternative image functionality.

Regards Thomas

 

You must be logged in to post in the forum