X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Only display X custom fields if Y extra field equals Z (https://forum.x-cart.com/showthread.php?t=52896)

Shamun 03-18-2010 08:03 PM

Only display X custom fields if Y extra field equals Z
 
I'm having a bit of a problem with the extra fields.

I have a need of about 20 fields, however not all products need all 20. Most only need about 10, and are specific to a type a product.
I couldnt find a way to use product specific enable/disable of these, so I'm trying to get them to only display when another extra field is equal to something.

So like...

Display extra field #1-#10 if product field #30 equals abc. Don't show extra field #11-20 if it doesnt.
Display extra field #11-20 if field #31 equals xyz and dont show the rest


Any ideas on how I can do the {if} states as such?

Pyro 03-18-2010 08:56 PM

Re: Only display X custom fields if Y extra field equals Z
 
Tal,

I have no idea how to do what your asking; however, there may be another solution. How is it determined that you need 20 fields? Is it on a per category basis or does it just depend on the product?

Shamun 03-19-2010 12:37 AM

Re: Only display X custom fields if Y extra field equals Z
 
The extra's can be considered to be able to be done via category as well, but if I can do it per "item type category" rather than listed category that would be better.

Pyro 03-19-2010 10:55 AM

Re: Only display X custom fields if Y extra field equals Z
 
Tal,

Like I said, I do not know how to do what you want, but have you looked at websitecm's mod?


http://www.websitecm.com/x-cart-mods/multiple-product-templates-package-for-xcart.html


From what I gather, it allows a different template to be used per category. I have never used it before, but maybe it could also work for fields.

Hope it helps.

gb2world 03-19-2010 03:50 PM

Re: Only display X custom fields if Y extra field equals Z
 
Should not be a problem to do what you are trying to do. I think if you understand the code in this thread - it may be similar enough to what you are trying to do


All times are GMT -8. The time now is 10:33 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.