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)
-   -   Accesing the Next product (https://forum.x-cart.com/showthread.php?t=5570)

cipi 12-12-2003 01:20 AM

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

funkydunk 12-30-2003 04:03 AM

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.


All times are GMT -8. The time now is 04:29 AM.

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