Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Get orders_products_id on account_history_info page

Get orders_products_id on account_history_info page

Started by tips007 on 28 Jan 2013, 2:52 PM · Views: 409

Results 1 to 2 of 2
28 Jan 2013, 2:52 PM
#1
tips007 avatar

tips007

New Zenner

Join Date:
Oct 2012
Posts:
52
Plugin Contributions:
0

Get orders_products_id on account_history_info page

on account_history_info page, i can get the products_id of each product ordered by using
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$order->products[$i]['id']
}
i also want to get the orders_products_id of each product ordered, but i don't find a way to get this
any help?

28 Jan 2013, 4:53 PM
#2
tips007 avatar

tips007

New Zenner

Join Date:
Oct 2012
Posts:
52
Plugin Contributions:
0

Re: Get orders_products_id on account_history_info page

<?php $order->products[$i]['id']; ?> displays the products_id next to each product

i want to display the orders_products_id which is from the table zen_orders_products
i add sql to header.php, then i add <?php $my_own_sql->fields['orders_products_id'][$i]; ?>, it only displays the orders_products_id of the first product