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

Accesing the Next product

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-12-2003, 01:20 AM
 
cipi cipi is offline
 

Member
  
Join Date: Oct 2003
Posts: 16
 

Default Accesing the Next product

Hello,

In the customer/main/products.tpl I would like to be able to know what is the next product from list.

I looked up the Smarty documentation and here is what I found:

Code:
{section name=customer loop=$custid} {$smarty.section.customer.index} id: {$custid[customer]} {* FYI, $custid[customer.index] and $custid[customer] are identical in meaning *} {if $custid[customer.index_next] ne $custid[customer.index]} The customer id will change {/if} {/section}

I triend to implement something similar but I get an error:
Smarty plugin error: [in customer/main/products.tpl line 3]: unknown tag - '$products.[product.index_prev].productid'

Code:
{section name=product loop=$products} {$products.[product.index_next].productid} {$products[product].productid} {/section}


Can someone help me with this problem.

Thanks
Reply With Quote
  #2  
Old 12-30-2003, 04:03 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

The next product from the list is already in the products.tpl template.

It simply loops through the $products array using the process you described.

I dont follow what you are trying to do in this template.

If however, you want to do this in the product detail page, there is another thread on the forum that covers this in more detail but to my knowledge has not been solved yet.
__________________
ex x-cart guru
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:09 PM.

   

 
X-Cart forums © 2001-2020