Author Topic: How to Skip order_done before making payment  (Read 903 times)

zainabubu

  • Jr. Member
  • **
  • Posts: 128
  • VirtueMart Version: 2.0
How to Skip order_done before making payment
« on: November 14, 2013, 19:32:24 pm »
Hello,

Please how do I skip the "thank you for your order" page that shows before the payment page? I see that some websites that use vm don't have it, but I've been unable to find a solution for this problem. Help would be deeply appreciated.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10298
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: How to Skip order_done before making payment
« Reply #1 on: November 14, 2013, 21:26:38 pm »
This is normally controlled by each individual payment plugin by the plgVmConfirmedOrder() function called by cart.php

For example the native paypal plug uses

Code: [Select]
$html = '<html><head><title>Redirection</title></head><body><div style="margin: auto; text-align: center;">';
$html .= '<form action="' . "https://" . $url . '" method="post" name="vm_paypal_form"  accept-charset="UTF-8">';
$html .= '<input type="submit"  value="' . JText::_('VMPAYMENT_PAYPAL_REDIRECT_MESSAGE') . '" />';
$html .= '<input type="hidden" name="charset" value="utf-8">';
foreach ($post_variables as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
}
$html .= '</form>';
$html .= ' <script type="text/javascript">';
$html .= ' document.vm_paypal_form.submit();';
$html .= ' </script></body></html>';

so it all depends what payment plugin your using
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

zainabubu

  • Jr. Member
  • **
  • Posts: 128
  • VirtueMart Version: 2.0
Re: How to Skip order_done before making payment
« Reply #2 on: November 14, 2013, 21:38:23 pm »
Ok, many thanks. I had a payment plugin built for my site, will let developer know.

zainabubu

  • Jr. Member
  • **
  • Posts: 128
  • VirtueMart Version: 2.0
Re: How to Skip order_done before making payment
« Reply #3 on: November 15, 2013, 16:36:42 pm »
Hello,

Another problem I'm facing is multiple creations of the same cart in a session. In my case, when a client gets returned from the payment gateway due to whatever payment failure and want to purchase using a payment method, they get returned to the cart with the items still in them (which is great). The problem is every time they try to pay again, a different invoice is created and so I have a lot of pending invoices on my back end.

Can't the same invoice # be called on to get this done instead of a new one getting created all the time?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10298
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: How to Skip order_done before making payment
« Reply #4 on: November 15, 2013, 17:07:19 pm »
this I would think is down to your custom payment plugin - there are lots of functions within the plugin that need to be called correctly..

Test against something like the Paypal plugin to see the correct operation
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation