View Single Post
  #9  
Old 12-30-2010, 07:53 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

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

Default Re: How to add variable ?

It depends on where you are trying to display them.

If it is on the product page - they will display with the "show" setting described in the documentation. They are displayed in the details section.

If it is on another page or section, you need to see if they are already available by using webmaster mode and looking at the smarty variables. (Look for an array called $extra_fields.) If they are not available, you have to edit the php file to add a query to get them.

If they are available, you can do a loop similar to what is used on the product page to display them all. (See /common_files/modules/Extra_Fields.) You can use if-than statements within the loop to display/not display what you want.

You can also reference them directly knowing their position in the array - something like $extra_fields[5].field_value - You can see all this in the webmastermode console.

This is for an older version - but if you can understand all the code snippets in this thread - you should be able to display what you need

---
__________________
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