Adding Icons to products
Hey - Happy Friday to everyone :D
I have just been asked by a client if it is possible to add small icons to individual products. He has 3 product types so far, CD, DVD, Book and would like an icon to represent each, which would probably sit under the thumbnail just to make it easy to recognise. Some products are available in all three medias. Is this acheivable? Can an existing part of x-cart be modified to show this? Would it need a custom script? Cheers Tye |
This should put you on the right track
Make a folder in your shop called /shop/productimages/ dump dvd.gif book.gif etc in there Add an extra product field to x-cart then in the box put "dvd.gif" and in the templates where you want the image to appear use if your on 3.5.X the extra field will be stored in {$param01} through to {$param09} so for example to show the image use: <img src=/shop/productimages/{$param00}> For x-cart 4.X you need to use it's extra field format which i can't recall off the top of my head. |
Thanks groovico
I'll have a go at this next week I suspected it was something to do with extra fields - but I have never used them before. Here goes nothing :D Cheers |
nm... bumping this back up after several years :o
I have added my extra field which is "param01" - named 'New' I have then typed into my products.tpl: Code:
<div align=center"><img src=/icons/{$param01}></div> Yet what I get is a broken image - and in the source I get: Code:
<div align=center"><img src=/icons/></div> Should there be something else I should be adding? |
put the images in skin1/images/extra and then use
<div align=center">[img]{$ImagesDir}/extra/{$param01}[/img]</div> |
Noope - that didn't work...
Here how I am using the code in the 'product.tpl' Code:
<tr> Upon further examination - it looks like this isn't going to work - I think I should be editing the 'product.tpl' for the modules/extrafields directory. My aim has actually changed from my original post - I now want to place a 'new' icon underneath the thumbnail on the 'customer/main/product.tpl' I am not sure it this can be done with extra fields... please tell me I'm wrong :) |
my bad :?
Code:
<div align=center">[img]{$ImagesDir}/extra/{$product.param01}[/img]</div> |
Would it be difficult to code this as a selection field?
So you could update the image the same as you would when you add a new image? As in click the button to Add an Image and then upload in the same manner... |
Has anyone come across a version of this mod that I could use for version 4.0.3??
My mummy always said "if unsure always ask for directions" |
All times are GMT -8. The time now is 11:54 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.