News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Adding redirect to another site when standard payment selected

Started by Mattybee, November 28, 2018, 01:13:39 AM

Previous topic - Next topic

Mattybee

Hi,

I'm using joomla 3.9 and vm 3.2.13

I am trying to set the standard payment method to redirect after the customer has finalised their order to direct them to another page off my site so they can fill out a form for credit, the customer does not need to be redirected afterwards

I have tried searching for any info on how to do this but couldn't find anything I thought was relevant.

I assume it is just a simple line of code at the end and any help would be great thanks.

Thanks,
Matt.

GJC Web Design

It would be a standard joomla redirect in an orderdone.php template override after checking/filtering for the correct payment method
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Mattybee

Ahhh thank you, that makes sense.

Do you know what code I would need to add?

I know how to set up an override.

Thanks,

GJC Web Design

$mainframe = JFactory::getApplication();
$mainframe->redirect('https://xxx.com');

don't know if it works with external urls otherwise use a JS redirect

<script>document.location.href='https://xxx.com';</script>
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Mattybee

Hi,

the below line worked great thank you :)

I ended up adding it to post_payment.php under standard vmpayment.

<script>document.location.href='https://xxx.com';</script>

One last question how would I get this to only trigger when the order is flagged as confirmed by shopper please :)

You have been so much help.