Re: Default Shipping & Payment Method
Posted: Wed May 19, 2010 6:31 pm
BUMP!! 

OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
JJJaved wrote:looking for help to implement it in v1.4.7.![]()
thanks
Code: Select all
($this->url->https('
Code: Select all
((HTTPS_SERVER . 'index.php?route=
Hello Qphoria,Qphoria wrote:If there is only one shipping option available, it will auto-select it and automatically move to the next step. Otherwise it will display the shipping options.
EDIT: catalog/controller/checkout/shipping.php
FIND:AFTER ADD:Code: Select all
$this->session->data['shipping_methods'] = $quote_data;
If there is only one payment option available, it will auto-select it and automatically move to the next step. Otherwise it will display the shipping options.Code: Select all
//Q: Bypass shipping if using only one and its single rate if (count($quote_data) == 1) { $values = array_values($quote_data); if (count($values[0]['quote']) == 1) { $keys = array_keys($values[0]['quote']); $method = $values[0]['quote'][$keys[0]]; $this->session->data['shipping_method'] = $method; $this->session->data['comment'] = ''; $this->redirect(HTTPS_SERVER . 'index.php?route=checkout/payment'); } }//
EDIT: catalog/controller/checkout/payment.php
FIND:AFTER ADD:Code: Select all
$this->session->data['payment_methods'] = $method_data;
Code: Select all
// If there is only one payment option, set it to session and go to confirm if (count($method_data) == 1) { $keys = array_keys($method_data); $values = array_values($method_data); $method = $values[0]; $this->session->data['payment_method'] = $method; $this->session->data['comment'] = ''; $this->redirect(HTTPS_SERVER . 'index.php?route=checkout/confirm'); }