The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Limit shipping by product category

dariodario Member
in Help edited November 2014
Hello
I'm trying to configure my shop to show different product price, taxes and shipping options depending on some external parameter (i.e. domain name or user localization). I created a product category for Austria and one for Germany and configured the proper VAT rate for each of them. Now I would like to limit the shipping location by category: so if a product has Germany category, it can be shipped only in Germany. However at the moment the shipping dropdown shows always both options Germany and Austria. Is it possible to show only the selected country (Germany or Austria)? Or is there some other workaround?
Thanks
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @dario,

    It is possible to dynamically restrict the country dropdown based on different conditions - depending on your store version will dictate which script you can use.
    2.0: https://wiki.foxycart.com/v/2.0/snippets/locations_modfication
    1.0-1.1: https://wiki.foxycart.com/snippets/shipping/restricting_countries_and_states_on_the_checkout
    0.7.2 and older: https://wiki.foxycart.com/snippets/shipping/restricting_countries_and_states_on_the_checkout_old
  • Hi Adam
    I'm now restricting the countries (the dropdown is disabled and showing the right one) but I still have an issue: there are no 'country' taxes applied (of course country is the same as the one in the dropdown) but the it looks like tax calculation is not triggered if I don't change manually the dropdown. So I can see Germany in the dropdown (blocked), I have a country based tax for Germany (VAT) but in the right column the area for tax calculation is empty.
    Is there a way to trigger it or some other workaround?

  • fc_adamfc_adam FoxyCart Team
    @dario,

    Are you completing the address after changing the country? The taxes are triggered once an address is present, which would include postcode, city and possibly state/region.
  • Well we are limiting the country by code, it is correctly set in the dropdown and the tax is country-based (so need to know state/address)...so we are wondering if there's a way to trigger the tax calculation to show the user the VAT and final price as soon as he goes to checkout page....
  • fc_adamfc_adam FoxyCart Team
    @dario,

    Could you whisper me what store this is for? In doing some testing on this - country based taxes are calculated on page load, if the country that we prepopulate the checkout with has a tax. So for example, I'm based on Australia so the country field is prepopulated with Australia on page load. If there is an Australian based tax on my store, that tax is visible on page load as well.

    If I change the country field to a different country, the taxes won't be updated straight away though as you've noted. It'll wait for a complete address (at least including city, state and postcode as required by the country) before updating. I'm going to create a ticket on our side to look into adjusting our javascript to allow for updating the taxes as quickly as we're able to based on the information present.
  • dariodario Member
    edited December 2014
    Is the VAT calculated/shown according to customer physical location?
  • fc_adamfc_adam FoxyCart Team
    @dario,

    The country field will be prepopulated based on the users IP address on page load - so if a user is accessing from Germany, the country field will be prepopulated to Germany. When the checkout is loaded - the taxes are initially calculated based on the country field for any global and country based taxes. Once the page is loaded though, the taxes are only refreshed after the customer completes the country, city, state and postcode fields.
Sign In or Register to comment.