Post by info@jrvsystem.se » Fri Oct 07, 2022 2:29 pm

I have free shipping and flat rate active.
Free shipping set to "320 kr" gives free shipping available if items in cart is 320kr+80kr(VAT 25%) order total 400kr
No problem there.

But I have a MOD to hide the flat rate option if free shipping is available.
However, if the cart items is above 320(included VAT, 256+64) the flat rate is removed :(
So if coustomer is trying to buy items between 320 and 400 kr(inlucded VAT) there is no shipping option available.

I use this method for hiding the flat rate: https://isenselabs.com/posts/free-shipp ... pencart-3x

I have tried playing around with order totals and the sort order of sub-total, VAT and shipping. Does not seem to make any diffrence.
The store VAT is based on the address of the shop, not customer billing/shipping address(if that could have some influence?).

If you would like to have a look: nya(dot)vattenfilterbutik(dot)se (no clickable link as I dont want the site do index from anywere at this point)

Sidenote: is there a way to have shipping cost after VAT in order total but still apply VAT to shipping? Would look better in cart.
Last edited by info@jrvsystem.se on Mon Oct 10, 2022 2:34 pm, edited 1 time in total.


Posts

Joined
Thu Sep 15, 2022 4:55 pm

Post by OSWorX » Fri Oct 07, 2022 5:25 pm

Guess not a bug in the core, more the mod you are trying.
Ask them what to do and if they can help ..

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by JNeuhoff » Fri Oct 07, 2022 5:47 pm

Well, this particular code from iSenseLabs uses something like this in its OCmod:

Code: Select all

            if (get_class($this)!='ModelExtensionShippingFree') {
              if (($this->config->get('shipping_free_status') == 1) && (float)$this->cart->getTotal() >= $this->config->get('shipping_free_total')) {
                 $status = false;
              }
            }
Which is wrong! The $this->cart->getTotal() is inclusive of taxes. Perhaps it should be $this->cart->getSubTotal()?

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Johnathan » Fri Oct 07, 2022 9:22 pm

I changed the topic title so it would reflect that this is a bug in the modification, not the extensions themselves.

JNeuhoff has the right answer -- the built-in Free Shipping extension only uses the untaxed sub-total. The modification uses the taxed sub-total. Changing it to this should fix the discrepency:

$this->cart->getSubTotal();

Image
Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by info@jrvsystem.se » Mon Oct 10, 2022 2:33 pm

Thanks.
This solved the issue.


Posts

Joined
Thu Sep 15, 2022 4:55 pm
Who is online

Users browsing this forum: No registered users and 8 guests