Comments (5)
Hi Tobias, this works perfectly! This solves it completely. Thanks for your great work, appreciate it!
from oc-mall-plugin.
@chocolata the tax calculation is pretty complex and differs from country to country. You'll find sources that tell you to use the shipping address for tax calculations, others recommend to use the billing address.
If you change to using the billing address here and here, does it work for you?
from oc-mall-plugin.
Hi @tobias-kuendig ,
Thanks for your insights about taxes being dependent on shipping / billing country. I guess that setting is fine as it is then.
I've did some more digging and I found out that when a user is not logged in and is ordering for the first time, i.e. enters his billing / shipping address for the first time on the quick checkout page, there is no Ajax request that refreshes the page to recalculate the taxes. Whatever shipping or billing country I choose, the taxes stay the same...
Might this be something we missed? Or did I overwrite too much in my custom partial?
from oc-mall-plugin.
Hi, I've done some more digging and I've found this:
-
Changing the shipping adress to the billing address for the tax calculation doesn't resolve the issue unfortunately.
-
In the partial quickcheckout/countrystate.htm, there does seem to be an Ajax request tied to the country dropdown:
{% set id = type ~ '_country_id' %}
<div class="mall-form-control">
<label for="{{ id }}">{{ 'offline.mall::frontend.form.country' | trans }}</label>
{{ form_select_country(id, countryId, {
id: id,
emptyOption: ('offline.mall::frontend.select' | trans ),
'data-request': 'onInit',
'data-request-data' : ("type: '" ~ type ~ "'"),
'data-request-success': '$.publish("mall.address.update")',
'data-request-update': {
(__SELF__ ~ '::countrystate'): ('#countryState_' ~ type)
}
}) }}>
<div data-validate-for="{{ id }}"></div>
</div>
When I investigate the sourcecode though, it seems that the output might be malformed:
Do you think that expressions like "quickCheckout::countrystate":"#countryState_billing"
might be the cause?
I've reverted to the default quickCheckout partials that are shipped with Mall, but I am getting the same results.
- When users are logged in or have an active session after checking out as a guest and make a second purchase, everything works as it should and the appropriate taxes are applied.
Could you kindly have another look? Most people are running into this issue now, as most don't yet have an account...
P.S.: One important thing to mention. The product in my cart does not require shipping, as it is a virtual product, but as stated the tax is applied correctly when the users are logged in.
from oc-mall-plugin.
Hey @chocolata, give version v3.0.28 a try. I have added a workaround to calculate taxes for unregistered users based on their QuickCheckout country selection.
See 47c3455
from oc-mall-plugin.
Related Issues (20)
- Help translating the Offline\Mall extension
- The filename and the fallback cannot contain the "/" and "\" characters. HOT 2
- Dynamic file not getting attached HOT 2
- Deprecated messages in error log with PHP 8.2 and 8.3 HOT 2
- Aws S3 Product files storage error
- Stripe Webhook/Endpoint
- TotalsCalculator.php:19 HOT 7
- Reconsider shippable flag effect
- Remove RainLab\User dependency on Mall\Customer model HOT 3
- Download Invoice button missing in backend orders. HOT 2
- Call to a member function mapWithKeys() on array error if Old Price disabled HOT 3
- Can't delete Payment Method HOT 1
- Backend order breaks after disabling payment method HOT 2
- Missing data for Invoice order partial
- Indirect modification of overloaded property October\Rain\Element\ElementHolder::$missing_file_hint has no effect
- \MallComponent::decode(): Argument #1 ($value) must be of type string, null given, called in \components\Product.php on line 44 HOT 3
- "Illegal offset type" on line 105 of ~/app/plugins/offline/mall/classes/traits/CustomFields.php
- An exception has been thrown during the rendering of a template
- Discount per quantity purchased
- Add quantity input close to "add to cart button" on the category page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oc-mall-plugin.