Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Only display X custom fields if Y extra field equals Z

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-18-2010, 08:03 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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?
__________________
- Shane Munroe
Reply With Quote
  #2  
Old 03-18-2010, 08:56 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default 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?
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
  #3  
Old 03-19-2010, 12:37 AM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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.
__________________
- Shane Munroe
Reply With Quote
  #4  
Old 03-19-2010, 10:55 AM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default 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.
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
  #5  
Old 03-19-2010, 03:50 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:03 PM.

   

 
X-Cart forums © 2001-2020