Post by Johnathan » Tue Nov 06, 2012 8:32 pm

==============================================================================
Want to hide all other shipping methods when Free Shipping is active? In OpenCart versions 1.5.2 - 1.5.5, perform these core file modifications:
==============================================================================

IN BOTH:

Code: Select all

/catalog/controller/checkout/cart.php
/catalog/controller/checkout/shipping_method.php
BEFORE:

Code: Select all

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

Code: Select all

if (isset($quote_data['free'])) {
    $free_only['free'] = $quote_data['free'];
    $quote_data = $free_only;
} 
The files for 1.5.0.x and 1.5.1.x versions are:

Code: Select all

/catalog/controller/checkout/shipping.php
/catalog/controller/total/shipping.php
The files for 1.4.x versions are:

Code: Select all

/catalog/controller/checkout/guest_step_2.php
/catalog/controller/checkout/shipping.php
More tutorials are available at OpenCartX.com/tutorials

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Avvici » Wed Nov 07, 2012 11:31 pm

Very useful :)

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by JAY6390 » Tue Nov 13, 2012 10:12 am

Johnathan, how am I meant to compete with my paid version if you're giving it away for free :P

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Johnathan » Tue Nov 13, 2012 11:37 am

Didn't mean to step on your toes! ;) I had this buried in an old post, and thought I'd make it more prominent so I'd stop getting so many questions about it.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by JAY6390 » Tue Nov 13, 2012 11:51 pm

haha I was only kidding :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 20 guests