VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: thering1975 on April 01, 2021, 10:17:23 AM

Title: Order Complete URL Paypal
Post by: thering1975 on April 01, 2021, 10:17:23 AM
Okay so i have searched and searched including threads that go back to 2011 all with similar issues.

I have worked through most of the issues just by brute force but this one i cannot solve.

All is fine when going through the cart to Paypal, Paypal completes fine and redirects back to the site, payment is handled corrently and order status updated.

However the Redirect which i understand is hard coded, goes back to an item id=0. As this ID does not exist, i get a page with just the menu nav bar and footer, no content inbetween and thus the thank you message is pretty sparse and actually very unprofessional looking. This is the URL redirect from paypal

Quotehttps://my.domain.co.uk/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=F48707&pm=1&Itemid=0&PayerID=xxxxxxxxx

Tried with a hidden OrderDone VM menu item but still blank content and the modules assigned not showing, return url wit this active is

Quote/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=CH1T06&pm=1&Itemid=0


Now on other sites i use Payplans for handling payment for subs and that works a treat as you can specify a redirect URL, so can create a pretty good receipt landing page. However i know there is no where in the UI where you can adjust the URL for VM

I have setup a hidden menu link to a landing page that i want to redirect to, so i can have some module based content top and bottom to make the page look smarter.

Is there anyway of editing the plugin to adjust the itemID of the return URL. I saw a post back from 2011 version 1 where they edited the paypal.php file, but those tags arent present in the current version.

For reference:

Joomla - 3.9.25.
PHP - 7.4.16
VM - 3.8.9 10473
Paypal - Standard setup
Sandbox Environment

No other VM Extensions installed


Title: Re: Order Complete URL Paypal
Post by: GJC Web Design on April 01, 2021, 10:22:54 AM
from memory it picks up the Itemid of the cart

have u a menu to the cart?

formed by

$post_variables['return'] = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=' . $this->order['details']['BT']->order_number . '&pm=' . $this->order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . vRequest::getInt('Itemid') . $lang;

plugins\vmpayment\paypal\paypal\helpers\paypalstd.php
Title: Re: Order Complete URL Paypal
Post by: thering1975 on April 01, 2021, 15:36:50 PM
Thanks for that it worked and makes perfect sense, i had no shopping basket link.

I shall now go berate myself profusely for being an idiot  :D