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

Extra Fields in Products & Featured Products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-12-2009, 07:47 AM
 
Knickershack Knickershack is offline
 

Member
  
Join Date: Apr 2008
Posts: 25
 

Default Extra Fields in Products & Featured Products

Hi All
I have extra fields working a treat in my Products & Featured Products 4.1.x store however we are in the process of now upgrading to 4.3.0.

For some reason the same technique used to get it working in 4.1 doesnt work in 4.3 can anyone help please

Thank you everyone
__________________
Branch 4.1.11

Lingerie site
Reply With Quote
  #2  
Old 11-12-2009, 02:55 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Extra Fields in Products & Featured Products

The hack for this for 4.1.x was not needed for 4.2.x as QT included them by default. I assume extra fields are in 4.3.x by default as well. You may need to change the way you call them
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 11-12-2009, 10:41 PM
 
Knickershack Knickershack is offline
 

Member
  
Join Date: Apr 2008
Posts: 25
 

Default Re: Extra Fields in Products & Featured Products

Yes i would have thought the same however i cant get it working at all.
Ive tried the calls to the extra fields all sorts of ways but they dont appear to show.
__________________
Branch 4.1.11

Lingerie site
Reply With Quote
  #4  
Old 11-13-2009, 04:18 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Extra Fields in Products & Featured Products

Are the extra fileds you are trying to show active?
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 11-13-2009, 04:26 AM
 
Knickershack Knickershack is offline
 

Member
  
Join Date: Apr 2008
Posts: 25
 

Default Re: Extra Fields in Products & Featured Products

Hi
Yes they are active on the product just cant get them to display in products, strange
__________________
Branch 4.1.11

Lingerie site
Reply With Quote
  #6  
Old 11-13-2009, 04:34 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Extra Fields in Products & Featured Products

Yes the code for the extra fields in 4.3 as well so no need to hack it (it is in include/search.php). Try the debug window and see how extra fields are shown there - as separate array or part of the products array (I would assume is part of the products array for each product). It shold be
$product.extra_field[0].field_value
for values when [0] is the extra field id or you can loop the array
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 11-13-2009, 05:17 AM
 
Knickershack Knickershack is offline
 

Member
  
Join Date: Apr 2008
Posts: 25
 

Default Re: Extra Fields in Products & Featured Products

Thanks Again .
Yes it shows correctly in the debug console ...

Code:
1 => Array (7) fieldid => "2" provider => "user" field => "overlay" value => "hot" active => "Y" orderby => "2" service_name => "SERVICE_NAME02"

however {$product.extra_field[2].field_value} produces nothing LOL, very strange
__________________
Branch 4.1.11

Lingerie site
Reply With Quote
  #8  
Old 11-13-2009, 05:30 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Extra Fields in Products & Featured Products

There is no field_value in this array (if this is the whole array) - use value instead
{$product.extra_field[2].value}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 11-13-2009, 05:49 AM
 
Knickershack Knickershack is offline
 

Member
  
Join Date: Apr 2008
Posts: 25
 

Default Re: Extra Fields in Products & Featured Products

still blank http://www.discountlingeriedirect.co.uk/Baby-Dolls/

note the ***** above the image corresponding code in products_list.tpl
Code:
*****{$product.extra_field[2].value}

and the >>>>>> below the image corresponding code in products.tpl
Code:
>>>>>>{$product.extra_field[2].value}
__________________
Branch 4.1.11

Lingerie site
Reply With Quote
  #10  
Old 05-12-2010, 05:37 PM
 
TheWrongGrape TheWrongGrape is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: Los Angeles, CA
Posts: 68
 

Default Re: Extra Fields in Products & Featured Products

Was this ever resolved? I've been going through tons of threads and following various different instructions and can't get extra fields to show up on my products_list.tpl in 4.3.1.

EDIT: I finally got it working. No modifications to any php files are necessary. My problem was that my Extra Fields were not checked off for "Show" and therefore not available as Product Search Options. I checked off the "Show" box and then made them available as search options under General Settings > Product Search Options.

This made my extra fields, which I mainly use for if/then statements, visible on my Product Details which I did not want. This was easy enough to hide by editing product.tpl in the Extra Fields skin folder.

Code used on products_list.tpl is {$product.extra_fields[0].field_value}
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 11:31 AM.

   

 
X-Cart forums © 2001-2020