Hi,
Is there a way to display a list of all the products a customer bought ? Something like
Product I bought :
product XX : image / link to the order
product YY : image / link to the order
...
I know this is very specific, but if someone has even the beginning of an idea it would be great :D
Thanks
u need to write a module,
do a query in orders using the logged in userid
display results
That is what I'm doing.
Thanks.
Hi,
The module exist already in my shop :
http://shop.st42.fr/en/products/products-any-ways.htm
This permit to display product in cart,product ordered .... in many ways.
Regards,
Patrick
Note that i don't test release with obselete Virtuemart 2.x releases
In order list view you can add something like this to get all your orders with details (including products bought).
$orderModel = VmModel::getModel('orders');
foreach($this->orderlist as $order)
{
$orders[] = $orderModel->getMyOrderDetails($order->virtuemart_order_id);
}
The rest depends on how you want them displayed.
Ghost,
it only work for 1 order, not for all products
Works with all user's orders. $this->orderlist already contains orders but only basic information. For each order use getMyOrderDetails to get detailed information.
Yes, but it's not the product list, but the order details products, so the customfield for eg. are this from user and you cannot add a add to cart, or you need to recall using the producti id.
And of course, adding code to get right display ...
My module is not to see the list of product as order details, but to display list of products brought but with the possibility to add to cart for eg.
Si this depend the real need, displaying the product in the orders(for eg. if you have donwload links) or permit user tu buy same product again.