Page 1 of 1

[SOLVED] Auto calculate Shipping

Posted: Wed May 25, 2016 10:20 pm
by beebee
Hello,

I having been trying to find a way to apply shipping automatically instead of it appearing as an option in the checkout. I have setup a "Flat Rate" shipping of $10 [for eg.] and "Free shipping" for orders above $100.

At this point, in the checkout, if the orders are above $100, it shows both "Free and Flat Rate" shipping with a radio button and if it's below $100, it says "Flat Rate" shipping. I don't want this! I would like this to appear only on the "Confirm Order" section.

I looked for support in the forum and found similar issues, however, the solution provided was not for ver2.2. For e.g.,

http://forum.opencart.com/viewtopic.php ... 4&start=20

A lot of these topics have the same/ similar solution. So, I tried my luck and got the below error in the "Shipping Method" section of the checkout page:

Notice: Undefined variable: quote_data in /home/blingssf/public_html/DBTEST/catalog/controller/checkout/shipping_method.php on line 41

I also tried to hide "STEP 4: Shipping Method", but this means it doesn't add shipping at all to the order.
Has anyone had luck with this?
If this is not possible, can you suggest an extension that can auto calculate shipping removing section 4?
I tried a few extensions, even the single page ones, however, they either have the shipping method show up or it skips shipping completely.

Your help is much appreciated.

Thanks,
B

Re: Auto calculate Shipping

Posted: Thu May 26, 2016 10:20 pm
by Johnathan
Automatic Shipping can automatically add the lowest shipping cost to the cart. If Free Shipping is available, it will add that, and if only Flat Rate is available, it will add that. However, customers will still be given the option to choose a shipping during checkout.

However, with Hide Checkout Steps you can hide the shipping step so that it is skipped. It will apply whatever shipping cost shows up first in the shipping step, so if you set the Sort Order for Free Shipping to something lower than Flat Rate, it would apply that if available. You could use Hide Checkout Steps by itself, or together with Automatic Shipping (if you want the shipping to show up before the customer gets to the "confirm" stage of checkout).

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Re: Auto calculate Shipping

Posted: Thu May 26, 2016 10:54 pm
by beebee
Johnathan wrote:Automatic Shipping
Thank you for the suggestion Johnathan,

I had used a hide shipping extension that actually removed shipping completely and did not add it to the order total.
I just wanted to confirm that if I choose "Automatic Shipping" extension, it will apply flat rate to all products below a certain amount that I setup and calculate free shipping for orders above that amount, without the customer having to choose in the checkout page?

Re: Auto calculate Shipping

Posted: Fri May 27, 2016 11:58 pm
by Johnathan
Automatic Shipping pulls your shipping rates just like the checkout, then picks the lowest one and applies it as the "Shipping" line item to the order. If you have a mod that is hiding the shipping completely, it may affect Automatic Shipping, so I can't guarantee it would work without disabling that mod.

Otherwise, as long as your Free Shipping is set up to only be available above a certain total, then Automatic Shipping would apply that above that total, and Flat Rate below that total.

Re: Auto calculate Shipping

Posted: Fri Jun 10, 2016 12:47 am
by beebee
Hey guys,

Just came across another thread that reported the same issue by for an earlier version. However, the solution provided by "barakka" works well on ver 2.2: http://forum.opencart.com/viewtopic.php ... 26#p622726
barakka wrote:I had the same problem, what you need to do is modify the flat rate module so that if the "free shipping threshold" has been exceeded the flat shipping is disabled.

In /catalog/model/shippping/flat.php find:

Code: Select all

	$method_data = array();
Insert this on the next line:

Code: Select all

		if ($this->cart->getSubTotal() > $this->config->get('free_total')) {
			$status = FALSE;
		}	

Or if you use VQMOD use the attached file

HTH :)
Hope this helps!

Cheers,
B

Re: [SOLVED] Auto calculate Shipping

Posted: Fri Dec 15, 2017 12:14 am
by arcovirtual
I have another problem and I can not find a solution, my version is 2.1.0.2 OC, in my case, no shipping fee is calculated despite enabling all shipping fees, no fee is added at the end of the purchase is an impossible to my power to make it add up, the value sent to the total of the final shopping cart after step 4 :(

Re: [SOLVED] Auto calculate Shipping

Posted: Fri Dec 15, 2017 11:39 pm
by Johnathan
Sounds like you disabled the "Shipping" Order Total, which controls the display of that line item. You can re-enable it in Extensions > Order Totals > Shipping.