Post by JJJaved » Wed May 19, 2010 6:31 pm

BUMP!! ???

New member

Posts

Joined
Tue Jul 07, 2009 12:57 am
Location - Cardiff - UK

Post by allenshea » Wed May 19, 2010 7:32 pm

JJJaved wrote:looking for help to implement it in v1.4.7. ???
thanks

Just replace

Code: Select all

($this->url->https('
into

Code: Select all

((HTTPS_SERVER . 'index.php?route=
You can run it in 1.4.7

Allen

P.S., Hope it already in the core of OC 1.4.8

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by Qphoria » Wed May 19, 2010 7:44 pm

I've already updated the wiki for 1.4.7 (but it seems to be down)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JoomGO » Fri Feb 28, 2014 8:01 am

I need to Skip the Payment Method step as we only accept Credit Card, so there is no need to ask. I see the code on page 1 but it didn't work as I have a more up-to-date version of OpenCart.

How would we skip the Payment Method option in checking for version 1.5.5.1 ?

JoomGO! - http://www.joomgo.com
Website Design & Management


User avatar
Newbie

Posts

Joined
Fri Jan 24, 2014 3:05 am
Location - Cincinnati, OH

Post by beebee » Wed May 18, 2016 10:58 pm

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:

Code: Select all

$this->session->data['shipping_methods'] = $quote_data;
AFTER ADD:

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');
	}
}//
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.

EDIT: catalog/controller/checkout/payment.php
FIND:

Code: Select all

$this->session->data['payment_methods'] = $method_data;
AFTER ADD:

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');
}
Hello Qphoria,

I'm using ver2.2 and have just one shipping method and wish to bypass "Delivery Method" in checkout.
I tried to look for the above code and couldn't locate:

$this->session->data['shipping_methods'] = $quote_data;

Instead, it shows:

$this->session->data['shipping_methods'] = $method_data;

Should I tweak the code to say "$method_data;" or do you recommend something else?
Thank in advance for your help!

BeeBee
When the going gets weird, the weird turn Pro!!


User avatar
New member

Posts

Joined
Thu May 12, 2016 5:13 pm
Who is online

Users browsing this forum: No registered users and 34 guests