| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
If statement for specific option class? | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: If statement for specific option class?
Thanks Victor, but it isn't for me. What version is it working for you on? This is a 4.1.10 cart.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#12
|
|||||||
|
|||||||
Re: If statement for specific option class?
Quote:
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#13
|
|||||||
|
|||||||
Re: If statement for specific option class?
Its possible you might need to use $v.classtext instead of $v.class in the smarty. classtext is what is displayed on the page. If that doesn't work add {$products|print_r} to the top of your products.tpl and take a look at the [class] and [classtext] values for the products to see whats up.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#14
|
|||||||
|
|||||||
Re: If statement for specific option class?
Yep both class and classtext are 'size'. Now some of these products have both a size and flavor class - will this work when a product has both? Meaning I want it to display if size class is present by itself or in combo with another class.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#15
|
|||||||
|
|||||||
Re: If statement for specific option class?
It scans all options for the product and if it finds one with the name size it adds the text. So it works like you want it to. Tested and working fine for me.
Did you add it to the right .tpl? Sometimes I dig around in products.tpl for a while before I notice things don't look right and remember my site uses products_t.tpl. Other than that I can only suggest some basic troubleshooting. Replace the whole smarty {foreach} stuff that was added with some plain text to be sure its in the right spot. If that's OK replace it with {$products[product].product_options|print_r} to see if you've got the [class] variable there. If that shows the proper [class] stuff, scratch head and post back.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
|
#16
|
|||||||
|
|||||||
Re: If statement for specific option class?
Yep, did that, spit out the correct variable. So I backed up and started from scratch. This time I got rid of the |lower and it is now working. Thanks for the help guys, really appreciate it!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#17
|
|||||||||
|
|||||||||
Re: If statement for specific option class?
I have really stuck with 4.1.10 till found that products_t.tpl is used for 1-column format (in admin there was 1 for number of columns to display products).
For 4.1.11 it is working perfect.
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
|
|||
X-Cart forums © 2001-2020
|