Post by fourgood » Fri Nov 09, 2012 4:08 pm

Is there a way to hide the "free checkout" if shipping costs are present?

In my case the free checkout button appears (because the total is 0.00) but the customer needs to pay shipping, though free checkout must be hidden.

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by Johnathan » Sat Nov 10, 2012 12:03 am

You should always state what version of OpenCart you are using.

This issue doesn't occur in the default installation of the latest version (1.5.4.1) of OpenCart.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by fourgood » Sat Nov 10, 2012 7:51 pm

oh im sorry, im using oc 1.4.9.1
and no ;) there is no way for me to update because it it very very cutomized.

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by Johnathan » Sat Nov 10, 2012 11:34 pm

I looked at the 1.4.9 code, and it should still take into account the shipping cost. If you're using a customized installation, though, something else may be affecting it. You'll likely need someone to take a look at your installation, for which I recommend you post a request in the OpenCart "Commercial Support" forum (http://forum.opencart.com/viewforum.php?f=88), which is checked by a number of OpenCart developers.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by fourgood » Mon Nov 26, 2012 7:01 pm

The "error" only occurs if i choose guest checkout. Because shipping and payment are on one page. If i have entered a coupon which reduces the overall amount to 0.00€ the shipping is not taken into account and therefore i can choose "free checkout", even though i have to pay shipping.
Is there a way to set fixed shipping costs, that can be altered later, so that the calculation is right?

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by Johnathan » Mon Nov 26, 2012 8:59 pm

Ah, I see. You're right -- this actually seems like something OpenCart should address, so you may want to post it in the bug thread, as well. You could probably use Automatic Shipping to fix this, or if you have a flat shipping cost of $5 for example, you could fix it by doing this:

Code: Select all

IN:
/catalog/model/payment/free_checkout.php

REPLACE:
if ($this->customer->isLogged && $total <= 0) {
    $status = true;
} else {
    $status = false;
}

WITH:
if ($total <= 0) {
    $status = true;
} elseif (!$this->customer->isLogged && ($total+5) <= 0) {
    $status = true;
} else {
    $status = false;
} 

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by fourgood » Mon Nov 26, 2012 11:18 pm

I think Automatic Shipping is exactly what i need ;)
So i just bought it. But does it work for 1.4.9.1 out of the box?

EDIT:
ok, seems to work. But now it chooses PICK UP as the standard as this is the cheapest one. is there a way to exclude certain methods?

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm
Who is online

Users browsing this forum: No registered users and 19 guests