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

Extra fileds in Recommended Products section

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-20-2011, 01:36 PM
 
4ideas 4ideas is offline
 

Member
  
Join Date: Sep 2011
Posts: 11
 

Question Extra fileds in Recommended Products section

Hi,

Can anyone help me with the adding of extra field values in the recommended products area ?
After reading some posts on the forum I've edited the common_files/customer/simple_products_list.tpl and added
{$product_links[cat_num].extra_fields[1].value}
also tryed {$product_links.extra_fields[1].field_value}
and {$product.extra_fields[1].field_value}

none of witch work.

I got this to work in the home page in the featured products after following the instructions here
{$product.extra_fields[2].field_value} works fine there.

Obviously I'm doing something wrong... but what ?

Would really appreciate any help.
Cheers
__________________
xcart 4.4.3
Reply With Quote
  #2  
Old 09-20-2011, 02:25 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Extra fileds in Recommended Products section

I'm trying to figure out why you would want extra fields in the recommended products. All it does is link to a product, and they are generated randomly. Do you mind my asking what you plan on using the extra field(s) for?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 09-20-2011, 10:08 PM
 
4ideas 4ideas is offline
 

Member
  
Join Date: Sep 2011
Posts: 11
 

Default Re: Extra fileds in Recommended Products section

On the extra fields i have some product details (shape, brand, etc) and i want them to show up just like in the featured items. Now i only have the product thumb and title.
__________________
xcart 4.4.3
Reply With Quote
  #4  
Old 09-20-2011, 11:16 PM
 
4ideas 4ideas is offline
 

Member
  
Join Date: Sep 2011
Posts: 11
 

Default Re: Extra fileds in Recommended Products section

got it to work like this {$recommends[0].extra_fields[1].value} only it sets the same field value for all the products in the recommended area.
Is there a way to specify an index or something ?
tried with {$recommends[index].extra_fields[1].value} but it doesn't work.

any ideas ?

SOLVED:
added a counter before the foreach statement in simple_products_list
{assign var="counter_rec" value=-1}

and used it in the listing
{assign var="counter_rec" value=$counter_rec+1 }
<ul>
<li>{$recommends[$counter_rec].extra_fields[1].value}</li>
<li>{$recommends[$counter_rec].extra_fields[2].value}</li>
<li>{$recommends[$counter_rec].extra_fields[3].value}</li>
<li>{$recommends[$counter_rec].extra_fields[4].value}</li>
</ul>
__________________
xcart 4.4.3
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 01:38 PM.

   

 
X-Cart forums © 2001-2020