![]() |
product's sequence number
Is there an easy way to get product's sequence number in current category?
For example if I open 5th product I need to get something like $current_product=4 (considering it starts with 0), so then I can pass it to javascript. I know I can go through $products or $cat_products to get this number, I just was wondering if that number already exists somewhere. It's for v.4.4.4 |
Re: product's sequence number
Possibly the closest you could get to doing this with some pre-existing code/variables would be if you set the product positions in the category, then use the order_by variable.
|
Re: product's sequence number
Nice idea, unfortunately order_by is available only for categories in $categories_menu_list, I don't know how to include it into $product.
|
Re: product's sequence number
OK, that was simple.
in product.php PHP Code:
PHP Code:
In my design I display products of current category at the bottom of product area so PHP Code:
And now I can use {$product.seq_number} in my templates. |
All times are GMT -8. The time now is 06:37 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.