Page 1 of 1

Different Shipping Locations and Tax

Posted: Wed Nov 21, 2012 12:17 pm
by fibernut
Hello,
I am trying to configure shipping to different countries and a flat rate shipping rate for each country, but after reading the documentation I cannot see how I would go about doing this.

Also I would like to set a global tax rate for the store but when I enter anything other than the stock tax settings I get Error 503.
Could someone please explain what I am doing wrong and what I should do?

Thanks

Re: Different Shipping Locations and Tax

Posted: Thu Nov 29, 2012 11:31 am
by fibernut
A polite bump.

Re: Different Shipping Locations and Tax

Posted: Thu Nov 29, 2012 12:41 pm
by phillipuniverse
What is your definition of "stock tax" and "global tax"? Any server logs that go along with your 503 like a stack trace or something? How are you trying to configure tax now?

We don't currently have a facility to implement a shipping rate how you want (flat rate per-country) but you can subclass our implementations to achieve it. I would probably override FlatRateFulfillmentPricingProviderImpl with your own implementation that looks at a map bean (or in the database if you need it to be configurable) of {Country -> Price} and then assigns the shipping price to the fulfillment group based on the address country associated with it. Then you would need to have a single FlatRateFulfillmentOption in the database and ensure that all of the FulfillmentGroups that are created get assigned this FulfillmentOption before the pricing workflow happens (which is where your custom FlateRateFulfillmentPricingProvider comes in). One thing to note is that you won't actually be using the 'rate' field on the FlatRateFulfillmentOption; you're really just going to use it as a marker to go through the FlatRateFulfillmentPricingProvider.

Another option would be to make a different FlatRateFulfillmentOption in the database for countries that have unique rates. Then when the user saves the address for the FulfillmentGroup, you decide which FlatRateFulfillmentOption to associate to it based on the shipping country that they specified. You might even subclass FlatRateFulfillmentOptionImpl to include a 'country' field to facilitate this a little more, but it might be just as easy to use the 'name' field from FulfillmentOption and have it correspond to a country abbreviation and look it up that way.

Those are two possibilities that I see for shipping. Don't have enough information to help you on the tax issue.