-
1. Re: Can I add an icon somehow to the Individual Product - Small layout to indicate the product belongs to a specific category?
Liam Dilley Aug 11, 2014 11:56 PM (in response to Grant Senior)Hi Grant,
Yes but will need some work and "Always do"
Some may post here some javascript solutions or say it is not possible but you can do the following...
You have this per product - {tag_catalogueid}
This will render the catalog ID of the product that it is currently viewed in.
If your on the summer-flowering catalog url then this will render the ID for that, if not it is something else.
You can see what the ID of a Catalog is when you view it in the admin - It is in the URL.
What you can do is have an image in the markup like this...
<img src="/yourimagefolder/catimg-{tag_catalogueid}.jpg alt="" /> and ensure you have an image with that file name for each catalog and as a catalog id ( catimg-213213.jpg) and you then you would have as your looking to do.
-
2. Re: Can I add an icon somehow to the Individual Product - Small layout to indicate the product belongs to a specific category?
Grant Senior Aug 12, 2014 5:52 AM (in response to Liam Dilley)Thanks Liam,
That's a really nice approach and works perfectly for when the page is displaying just that selected category.
What I needed on top of that (and realise I didn't explain that clearly above) is that I need for the image specifying the Highly-scented category to display in any other category that the product also appears in. With your method if the product appears in another category the Highly-scented icon doesn't display. As a get around I've taken your approach but used <img src="/img/scented- {tag_productcode} .jpg" alt="" /> instead which is giving me the result I want, just means every product must have the Highly scented icon or a blank place-holding image, a bit laborious but it works.
Cheers
-
3. Re: Can I add an icon somehow to the Individual Product - Small layout to indicate the product belongs to a specific category?
Grant Senior Aug 14, 2014 8:36 PM (in response to Grant Senior)Further to this, and what has turned out to be the best solution for what I needed to do - in the More Options section of each Product there are 4 custom fields, 'Custom 1:' through to 4 which can be called in the layout using the tags {tag_custom1} through to 4. If the Product has been assigned anything in these custom forms the page will display it and display nothing if there is nothing to display = perfect for my needs (don't have to create any place-holding image or whatever for every other product).
Hope that helps anybody else looking for this info.


