Author Topic: Customising add to cart button in order-history page  (Read 783 times)

phil147

  • Beginner
  • *
  • Posts: 13
  • A beginner
Customising add to cart button in order-history page
« 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

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3693
  • using Matomo instead of Google Analytics
Re: Customising add to cart button in order-history page
« Reply #1 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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations