| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product ID in Category List? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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?
__________________
X-Cart installation (v4.4.2) |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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...
__________________
X-Cart installation (v4.4.2) |
|||||||
#4
|
|||||||||
|
|||||||||
![]() It's not called Array. The name is probably $products or similar
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart Gold, version 4.4.2. |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Loop through the array with foreach to access them
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|