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)
-   -   Extra Fields in Products & Featured Products (https://forum.x-cart.com/showthread.php?t=50683)

Knickershack 11-12-2009 07:47 AM

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

cflsystems 11-12-2009 02:55 PM

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

Knickershack 11-12-2009 10:41 PM

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.

cflsystems 11-13-2009 04:18 AM

Re: Extra Fields in Products & Featured Products
 
Are the extra fileds you are trying to show active?

Knickershack 11-13-2009 04:26 AM

Re: Extra Fields in Products & Featured Products
 
Hi
Yes they are active on the product just cant get them to display in products, strange

cflsystems 11-13-2009 04:34 AM

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

Knickershack 11-13-2009 05:17 AM

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

cflsystems 11-13-2009 05:30 AM

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}

Knickershack 11-13-2009 05:49 AM

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}

TheWrongGrape 05-12-2010 05:37 PM

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}


All times are GMT -8. The time now is 06:21 AM.

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