| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Auto-Generated Color or Image Swatches from Product Options | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
![]() Yes, you can have multiple CSS files. Though most people may get away with the other method in this thread and just use images.
Here's an example in my product.tpl: I show a manufactures logo. But, as I do not want to call the logo from the MySQL table and php, I use a Smarty variable replacement. Code:
If I put an image in the skin1/images dir and in a folder called "brands", I could then call the images with a Smarty variable. But, some brands (and colors) would have multiple words. So I tweak the variable to replace "spaces" with no space. That's the |replace:' ':'' part of the code. Using the other solution in this thread, you could then also use the "Product Option" itself to show an image with it's name. Easier than CSS if you only have a few brands or charts to display, but CSS works well if you have a lot of brands with a lot of color variations. Say I have 130 brands with 50 diff. color charts. It might only work to use the CSS technique and if statement method as you have done. That way, you only get the core CSS skin1 file AND the one manufacturers CSS file for the color calls... a lot less code than calling all CSS files into the template structure. And as I mentioned a decent entry-level alternative vs. php and MySQL work which would be necessary if you actually wanted to assign a swatch image to the variant table. X-Cart did this for a site I know, but it was a bit complex and a few hundred dollar job. I'm sure they have the code for many specific needs. - Mike
__________________
4.1.9 |
|||||||
#32
|
|||||||
|
|||||||
![]() Do you know how i can change the coding so that it looks at a specific variant ie colour/swatch variant rather than sizes?
we dont have that many colours usually black, white or hivis. I just want it to bring in the colour swatch.tpl if there is a colour variant available and not have it bring in blank swatches for the sizes?
__________________
X-Cart Version 4.0.3 |
|||||||
#33
|
|||||||
|
|||||||
![]() I have started trying to get this to work for 4.1.x and have managed to display one column of variants (colors only). Can anyone help me to: 1. Allow for 2 or 3 columns and 2. Display only available color swatches/names?
Code:
My mod has a directory in the images dir. called "S" and the images are named "Brand_ColorTitle.gif". Thank for helping me to develop this intermediary solution. - Mike
__________________
4.1.9 |
|||||||
#34
|
|||||||
|
|||||||
![]() Hi Mike,
Thanks a ton for sharing all your time on this. I've just read this whole thread and wanted to touch base with you to see what your current take on the best solution to this is... any advice would be greatly appreciated as I'm about to jump in to trying to get this mod to work. Thanks! Damian
__________________
-- Mindshare Studios using X-Cart 4.1.7 fashion mosaic fancy categories x-magnifier (pretty much all addons...) |
|||||||
#35
|
|||||||||
|
|||||||||
![]() Has any figured out how to put thumbnail images and place them under the product image for 4.1 verision as http://www.ridersinc.com/alpinestars-boots-supertech-r-2008-p100221.html is using it in addition to the dropdown that is comes with the cart?
I see how the drop down works by swamping images but I would also like to have thumbnails under the product image. Most people will not know to use the dropdown to see other images.
__________________
Cyber Matrix ------------------- X-Cart 4.1.9 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|