Hi,
My client has asked if customers can re-order previous orders.
So far I have a button on the customers account page next to each previous order. when you click this it goes to the shopping cart page and passes the order id.
on the shopping cart page I then have a query to get the product ids and quantities from the order id.
The problem I am having it getting it to add the products into the cart. I have been trying to use
if ($_GET['order_id']) { // Disable essential updates
global $db;
$order_query = "select * from zen_orders_products where orders_id = '".$_GET['order_id']."'";
$orderDetails = $db->Execute($order_query);
while (!$orderDetails->EOF) {
$order_product_id = $orderDetails->fields['orders_products_id'];
$qty = $orderDetails->fields['products_quantity '];
$_SESSION['cart']->add_cart($order_product_id , $qty);
$orderDetails->MoveNext();
}
}
but this does nothing.
am I on the right track or am I being a bit thick!
if someone could tell me how I can add these product IDs to the cart I would be very grateful
I am using Zen Cart 1.3.8a
Thanks
Rachael




