![]() |
Product ID in Category List?
I'm not sure if this has been answered before, I've been searching the forums and have seen many similar queries, but not any that suit my specific question;
I need to retrieve the wholesale price(s) of each product as they are looped through on the product list, the product ID is defined in a Smarty variable on the products_list.tpl, but I need it as a PHP variable so that I can query the database BEFORE the tpl loads. Can someone help? |
Re: Product ID in Category List?
productid is part of the products array that is assigned to smarty. you need to look inside the array, loop through it for each element.productid
|
Re: Product ID in Category List?
Don't mean to sound ignorant here, but where is said Array? It's not in products.php, I can't seem to find exactly where the products Array is defined in PHP...
|
Re: Product ID in Category List?
It's not called Array. The name is probably $products or similar
|
Re: Product ID in Category List?
No I realise that, and it is called $products, I just can't find where the variables within the array are defined.
EDIT: I'm using another account to post this response, just in case it confused you. |
Re: Product ID in Category List?
Loop through the array with foreach to access them
|
All times are GMT -8. The time now is 01:11 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.