Page 1 of 2

[SOLVED] Remove shipping costs from checkout total

Posted: Sun Oct 04, 2020 5:58 pm
by AlanARG
/edit: You'll find a workaround provided by mona in the replies. He suggested to add a pop up into any process of the checkout and that was a fantastic idea, works great and looks great. Quite simple to install and use.

-

Hey guys, how u doing?

I wanna remove the shipping costs from the total, is it possible?

Found this old thread but they talk about "cart", not checkout.

Any ideas? Thanks!

Re: Remove shipping costs from checkout total

Posted: Sun Oct 04, 2020 6:24 pm
by thekrotek
If you don't need shipping at all, just set all your products to not require shipping, that's all.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 6:00 am
by AlanARG
thekrotek wrote:
Sun Oct 04, 2020 6:24 pm
If you don't need shipping at all, just set all your products to not require shipping, that's all.
I do need shipping, it's just that I don't want them to pay it to me but to the shipping company when they receive the order.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 11:51 am
by khnaz35
AlanARG wrote:
Mon Oct 05, 2020 6:00 am
I do need shipping, it's just that I don't want them to pay it to me but to the shipping company when they receive the order.
How do you see this happening exactly ?
Customer orders to you and then visit shipping company and pay for their parcel and send you label so you can send their parcel/goods to them ? ???

Explain the scenario .

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 3:14 pm
by opencartmart
AlanARG wrote:
Sun Oct 04, 2020 5:58 pm
I wanna remove the shipping costs from the total, is it possible?
Uninstall the `Shipping` from `Order Totals` module list. Check the screenshot

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 3:38 pm
by thekrotek
AlanARG wrote:
Mon Oct 05, 2020 6:00 am
I do need shipping, it's just that I don't want them to pay it to me but to the shipping company when they receive the order.
Then you DO NOT need shipping in your store.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 4:01 pm
by letxobnav
perhaps it would be handy to be able to enter a shipping address.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 9:27 pm
by AlanARG
khnaz35 wrote:
Mon Oct 05, 2020 11:51 am
AlanARG wrote:
Mon Oct 05, 2020 6:00 am
I do need shipping, it's just that I don't want them to pay it to me but to the shipping company when they receive the order.
How do you see this happening exactly ?
Customer orders to you and then visit shipping company and pay for their parcel and send you label so you can send their parcel/goods to them ? ???

Explain the scenario .
We use a local shipping service that accepts cash just for the delivery so our customers pay to us online and then, when they receive the order, they pay for the shipping separately with cash directly to the delivery guy.

What I need is to remove the shipping cost from the total but I do want to keep it in the summary so customers can see it and we need the shipping address and module to calculate the costs and know where to send it.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 9:29 pm
by AlanARG
thekrotek wrote:
Mon Oct 05, 2020 3:38 pm
AlanARG wrote:
Mon Oct 05, 2020 6:00 am
I do need shipping, it's just that I don't want them to pay it to me but to the shipping company when they receive the order.
Then you DO NOT need shipping in your store.
I do! In order to know where to send it and to tell our customers how much they will pay to the shipping company.
They pay us online the order and the shipping to the delivery guy in cash, separately. But we organize the whole thing.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 10:22 pm
by by mona
You will have to remove shipping cost and add (assuming it is a constant) a line to say "shipping cash of delivery $20” and/or a link to the company so they can check themselves. Or contact the commercial support to have a specific module created for you. In theory it should not be complicated, but theory is based on the very little to non-existant information you have provided.

You can request a quote here viewforum.php?f=88.
I suggest you work out exactly how that shipping amount is calculated in order get a valid quote.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 10:24 pm
by khnaz35
AlanARG wrote:
Mon Oct 05, 2020 9:27 pm
We use a local shipping service that accepts cash just for the delivery so our customers pay to us online and then, when they receive the order, they pay for the shipping separately with cash directly to the delivery guy.

What I need is to remove the shipping cost from the total but I do want to keep it in the summary so customers can see it and we need the shipping address and module to calculate the costs and know where to send it.
So if this is the case then you just enable free shipping from admin and all other shipping module disable it.

This way you will have customers address also to calculate shipping fee which you can tell them via email total cost.

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 10:49 pm
by AlanARG
by mona wrote:
Mon Oct 05, 2020 10:22 pm
You will have to remove shipping cost and add (assuming it is a constant) a line to say "shipping cash of delivery $20” and/or a link to the company so they can check themselves. Or contact the commercial support to have a specific module created for you. In theory it should not be complicated, but theory is based on the very little to non-existant information you have provided.

You can request a quote here viewforum.php?f=88.
I suggest you work out exactly how that shipping amount is calculated in order get a valid quote.
Shipping cost will change according to destination, that's why I can't add a simple generic message for everyone.

What I want is to keep the system as it is right now but remove from the TOTAL checkout the shipping cost.

Regarding not providing enough information, what else do you need? Thanks!

Re: Remove shipping costs from checkout total

Posted: Mon Oct 05, 2020 10:52 pm
by by mona
I needed the information that shipping is based on destination !

So in which case .. I suggest a pop up window with a table of costs per location.
That is really simple and covers your legal obligations

Re: Remove shipping costs from checkout total

Posted: Tue Oct 06, 2020 3:45 am
by AlanARG
by mona wrote:
Mon Oct 05, 2020 10:52 pm
I needed the information that shipping is based on destination !

So in which case .. I suggest a pop up window with a table of costs per location.
That is really simple and covers your legal obligations
What else would be shipping based on? xD Sorry I thought that was obvious that's why I didn't say anything about it, my bad.

How can I do that about the pop window? Is it possible to add it to the checkout page? Thanks a lot for ur help! :)

Re: Remove shipping costs from checkout total

Posted: Tue Oct 06, 2020 6:04 am
by by mona
AlanARG wrote:
Tue Oct 06, 2020 3:45 am
What else would be shipping based on? xD Sorry I thought that was obvious that's why I didn't say anything about it, my bad.
umm .. weight? .. size? .. speed? .. fragile? .. you obviously have never had the pleasure of Royal Mail !


How can I do that about the pop window? Is it possible to add it to the checkout page? Thanks a lot for ur help! :)
I have a module that can do that in a number of ways .. https://www.opencart.com/index.php?rout ... n_id=33048
I will get it as you want it to be - that is my support for my work.

But I am sure someone will give you free code here ..

Basically what you want to do is :-
https://getbootstrap.com/docs/4.0/components/modal/

which is adding

Code: Select all

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#shippingModal">SHIPPING COSTS</button>
<div class="modal fade" id="shippingModal" tabindex="-1" role="dialog" aria-labelledby="shippingModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="shippingModalLabel">SHIPPING COSTS</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
     ADD YOUR TABLE HERE
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
and for the table (ADD YOUR TABLE HERE)

Code: Select all

<table style="width:100%">
  <tr>
    <th>CITY</th>
    <th>ZIP</th> 
    <th>COST</th>
  </tr>
  <tr>
    <td>city1</td>
    <td>90210</td> 
    <td>$22</td>
  </tr>
  <tr>
    <td>City1</td>
    <td>90211</td> 
    <td>$24</td>
  </tr>
</table>

and that code you add into your catalog/view/theme/your-theme/template/checkout/checkout.twig

It looks complicated but it is very easy .. and you are welcome

Re: Remove shipping costs from checkout total

Posted: Thu Oct 08, 2020 4:27 am
by AlanARG
by mona wrote:
Tue Oct 06, 2020 6:04 am
AlanARG wrote:
Tue Oct 06, 2020 3:45 am
What else would be shipping based on? xD Sorry I thought that was obvious that's why I didn't say anything about it, my bad.
umm .. weight? .. size? .. speed? .. fragile? .. you obviously have never had the pleasure of Royal Mail !
How can I do that about the pop window? Is it possible to add it to the checkout page? Thanks a lot for ur help! :)
I have a module that can do that in a number of ways .. https://www.opencart.com/index.php?rout ... n_id=33048
I will get it as you want it to be - that is my support for my work.

and that code you add into your catalog/view/theme/your-theme/template/checkout/checkout.twig

It looks complicated but it is very easy .. and you are welcome
Man, you are a genius, thank you so much for that.

Just two things:
1. Can I add a picture instead of a table?
2. Where exactly in the whole "checkout.twig" file should I place the code? I mean, that modal should appear when people is about to choose the shipping method so should I add it in the "checkout.twig" or in the "shipping_method.twig" and where exactly?

This is what's inside "checkout.twig" regarding shipping method:

Code: Select all

<div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title">{{ text_checkout_shipping_method }}</h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-shipping-method">
            <div class="panel-body"></div>
          </div>
        </div>
And this is the whole shipping_method.twig code:

Code: Select all

{% if error_warning %}
<div class="alert alert-warning alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
{% if shipping_methods %}
<p>{{ text_shipping_method }}</p>
{% for shipping_method in shipping_methods %}
<p><strong>{{ shipping_method.title }}</strong></p>
{% if not shipping_method.error %}
{% for quote in shipping_method.quote %}
<div class="radio">
  <label> {% if quote.code == code or not code %}
    {% set code = quote.code %}
    <input type="radio" name="shipping_method" value="{{ quote.code }}" checked="checked" />
    {% else %}
    <input type="radio" name="shipping_method" value="{{ quote.code }}" />
    {% endif %}
    {{ quote.title }} - {{ quote.text }}</label>
</div>
{% endfor %}
{% else %}
<div class="alert alert-danger alert-dismissible">{{ shipping_method.error }}</div>
{% endif %}
{% endfor %}
{% endif %}
<p><strong>{{ text_comments }}</strong></p>
<p>
  <textarea name="comment" rows="8" class="form-control">{{ comment }}</textarea>
</p>
<div class="buttons">
  <div class="pull-right">
    <input type="button" value="{{ button_continue }}" id="button-shipping-method" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
  </div>
</div>
Thank you so much!

Re: Remove shipping costs from checkout total

Posted: Sat Oct 10, 2020 8:14 pm
by by mona
Yes you can add anything instead of ADD YOUR TABLE HERE

The code should be placed where you want it
So in your case shipping_method.twig
and in the place you want it. Round about here sounds sensible. Before this or after this.

Code: Select all

<p><strong>{{ text_comments }}</strong></p>

Re: Remove shipping costs from checkout total

Posted: Sat Oct 17, 2020 5:58 am
by AlanARG
by mona wrote:
Sat Oct 10, 2020 8:14 pm
Yes you can add anything instead of ADD YOUR TABLE HERE

The code should be placed where you want it
So in your case shipping_method.twig
and in the place you want it. Round about here sounds sensible. Before this or after this.

Code: Select all

<p><strong>{{ text_comments }}</strong></p>
Ok so I added it to "shipping_method" and the button is there but when I click it, nothing happens.
I took a look at the network and console tool on Google Chrome but there's nothing there either.

I'd like to pay for that cup of a coffee and something else if you don't mind, just a way to thank you for all the help so far :)

Thanks a lot!

Re: Remove shipping costs from checkout total

Posted: Sat Oct 17, 2020 6:20 am
by by mona
Its working for me

I have just seen why yours is not working - copy and paste !
“ translates on here incorrectly they need to be straight "

Re: Remove shipping costs from checkout total

Posted: Sat Oct 17, 2020 9:18 am
by AlanARG
by mona wrote:
Sat Oct 17, 2020 6:20 am
Its working for me

I have just seen why yours is not working - copy and paste !
“ translates on here incorrectly they need to be straight "
I installed that with the installer (since it's .ocmod, right?) but no effect at all.
3.0.3.6 version and this theme, though that modification was made on the "default" one, there's no shipping_method.twig file on my theme.

Thanks!