Opencart hide / remove step 4 Delivery Method in checkout

Recently I have a case where my client requires me to put the shipping method in options instead of shipping method so they can have different charges for different timing. Here’s how it looks like in the product page:

delivery-in-option

So as a result, I disabled the “Required shipping” for the product. But it ended up remove the “Delivery Address” in the checkout. What I figured out is, I will need to keep the required shipping as well as the delivery address to be available to the customer. At the same time, remove the “Delivery Method” from step 4.

 

Enable Free Shipping and hide delivery method in your orders and email

First you need to do is to enable a “free shipping” so that we can use it to let the system select it by default.

Update your checkout.tpl

Open \catalog\view\theme\yourselectedtheme\template\checkout\checkout.tpl and look for:

<div id="shipping-method">

in line 56. Replace it with:

<div id="shipping-method" style="display:none;">

 

Then search for

$('#shipping-method .checkout-content').slideDown('slow');

And replace it with

$('#shipping-method #button-shipping').click();

I have seen 2 different type if button id. So if this does not work properly later, try replace it with:

$(‘#shipping-method #button-shipping-method’).click();

Change the display name of Free Shipping

You may skip all steps from here if the display of “free shipping” in orders / invoices / email does not bother you.

Open \catalog\language\english\shipping\free.phpChange tex_title and text_description as below.

$_['text_title'] = 'Not Applicable'; 
$_['text_description'] = '';

It is important to keep text_description as empty so it will help in hiding the shipping in your order info and invoice with the steps that I’ll cover later.

 

Hide Free Shipping in your orders and email

As previously we’ve already empty the text_description, it will not show a shipping method below your payment method in  your order details. But you will still see a “$0.00” in your  “total” section. To remove this,

open \catalog\view\theme\yourselectedtheme\template\account\order_info.tpl and find the following code in line 127:

orderhide1

Add a if else condition to check if only the title is not empty, display it. So in this condition, the free shipping section will not be displayed as we’ve already empty the free shipping title (text_description) earlier.

orderhide2

 

We’ll do the same to other files. Open admin\view\template\sale\order_invoice.php and look for

foreach ($order['total'] as $total)

in line 102, add the if else condition in the foreach like what we did earlier. After that, open  \catalog\view\theme\default\template\mail\order.tpl and repeat the same action (line 105).

 

Related Post – Fix for version 2

OPENCART v2.3 HIDE / REMOVE STEP 4 DELIVERY METHOD IN CHECKOUT

 

 

And we’re done. Share our tutorial with your friend if you like it. =)

 

Tagged ,

11 thoughts on “Opencart hide / remove step 4 Delivery Method in checkout

  1. Hi,
    This one is great and is really a good post. I think it will help me a lot in the related stuff and is very much useful for me. Very well written I appreciate & must say good job.

    —————————

    Opencart Website Developer

    ————————-

    1. Thank you. I’m glad it helped =)

  2. what about version 2.x.x ?

    1. Hi,
      I have added a post for version 2.
      http://www.codinglover.com/opencart-v2-3-hide-remove-step-4-delivery-method-checkout/

      Let me know if it works for your version. =)

  3. Hi, can possible on Opencart v2?

    1. Hi,
      this post only works for version 1+. it is not possible work in Version 2+ with the same code.

    2. Hi,
      I have added a post for version 2.
      http://www.codinglover.com/opencart-v2-3-hide-remove-step-4-delivery-method-checkout/

      Let me know if it works for your version. =)

  4. hi,
    Can you suggest For version 2.1.0.2 …

    1. Hi,
      I have added a post for version 2.
      http://www.codinglover.com/opencart-v2-3-hide-remove-step-4-delivery-method-checkout/

      Let me know if it works for your version. =)

  5. i tried this from tmp i hided options but when click on step 3 it not move to step 6 as may be some restrictions in controllers. can you help me with this

    1. this solution only help to skip one step, so im guessing you have to do the same to skip step 5 as well.

Leave a Reply

Your email address will not be published. Required fields are marked *