VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: phil147 on July 15, 2020, 16:42:51 PM

Title: Customising add to cart button in order-history page
Post by: phil147 on July 15, 2020, 16:42:51 PM
Hi,
not sure where lese to post this question...
Im using VM 3.2.12 and JM 3.9.15

I'm trying to put function to add previous ordered items to cart from order-history page. (on test local host)

When use is logged in and at page /order-history  , I have inserted following code in details_items.php

$productModel = VmModel::getModel('Product');
$this->product = $productModel->getProduct ($product_id,'1');
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));

So far so good, function displays add to cart button and correct product is added to cart.

My question is , when add to cart is actioned, why doesnt the window pop up happen (padded.php) , instead it opens the cart

I want the add to cart pop up window opened and remain on same view of order-history

Thanks
Phil
Title: Re: Customising add to cart button in order-history page
Post by: jjk on July 19, 2020, 11:10:04 AM
I don't know how to solve your remaining problem. Just wanted to mention that 'Webkul' offers a plugin which might be of interest to you. Search for 'Joomla Virtuemart Buy Again' in Google.