SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2
Topic US Taxes 15616 Views

US Taxes

29 December 2012 at 9:13pm

In the US, we don't have VAT. But each state has their own individual sales tax. Have you built out support for that yet? We would need a way in the backend to list each state's tax rate, and then when someone puts in their address, it would dynamically apply their tax rate in the shopping cart.

If you haven't built that yet, is there someone that I could hire to help build that into Silvercart for us?

Re: US Taxes

2 January 2013 at 2:36pm

Hi Pneuma33,

perhaps we can handle some detail questions by email.
Could you send a short description of the extended tax handling by email to sdiel [at] silvercart [dot] org ?

After that I'd be able to submit an offer for providing this feature.

Cheers,
Sebastian

Re: US Taxes

2 January 2013 at 5:00pm Last edited: 2 January 2013 5:01pm

Hi,

based on this tutorial for another shopsoftware, tax rules in the US seem to be rather complex:

http://www.packtpub.com/article/creating-tax-rules-in-magento

Even though the article is a bit dated (2009), I don't think that fundamental things have changed meanwhile...

Would be a good idea to specify the requirements properly to avoid misunderstandings :-)

Cheers
Ramon

Re: US Taxes

5 November 2013 at 11:07pm

Hi SC Team,

As I'm moving along with my project, there is one more thing for me that needs to be addressed and that is the topic of this thread.

I have not find too much information on this topic, just this page in the docs:
http://doc.silvercart.org/SilverCart/en/Userbase/The-SilverCart-Handbook/04-Tax-Handling#tax-handling

"...we made it quiet easy for developers to implement a dynamic tax systems where the tax depends on the customers shipping ZIP like in the USA."

Could you please be a bit more specific or point me to the right guide if there is any?

A short guile to get started would be really helpful.

Thank you in advance,
Szabesz

Re: US Taxes

6 November 2013 at 9:59am Last edited: 6 November 2013 10:00am

Hi Szabesz,

there is no detailed documentation available yet.

We try to provide one as soon as possible.

Until we did that, perhaps you want to have a look at SilvercartTax::getTaxRate().

This method provides the central tax handling for a single product.
As you can see there, you are able to extend this method by a decorator using the method getTaxRate() inside your decorator to overwrite the default handling. Your decorators getTaxRate() needs to return the tax rate as a float value.

I hope this hint helps!

Best Regards
Sebastian

Re: US Taxes

6 November 2013 at 10:08am

Hi Sebastian,

Thanx for pointing me in the right direction! Now let's see how I can handle this :)

cheers
Szabesz

Re: US Taxes

12 November 2013 at 11:51pm Last edited: 12 November 2013 11:55pm

Hi Sebastian,

Could you please help me out?

This is what I got so far:

public function getTaxRate() {
$currentTax = $this->owner->Rate;
$customer = Member::currentUser();
$shippingAddressState = $customer->SilvercartShippingAddress()->State;

if ($shippingAddressState == "IN") {
$currentTax = 7.0;
}
return $currentTax;
}

But instead of the default Shipping Address ($customer->SilvercartShippingAddress()->State) I should get the actual address of the soon to be placed order, which can be different (and an Anonymous user has no default Shipping Address anyway).

How can I get the Shipping State field of SilvercartCheckoutFormStep5? In this class, AddressData() uses getCombinedStepData(), but how can I get a reference to the actual instance of the SilvercartCheckoutFormStep5 class from the instance of SilvercartAddress?

thanx in advance,
Szabesz

Re: US Taxes

13 November 2013 at 9:18am Last edited: 13 November 2013 9:19am

Hi Szazbesz,

something like this should work:

$currentTax = $this->owner->Rate;

if (Controller::curr() instanceof SilvercartCheckoutStep_Controller) {

$checkoutData = Controller::curr()->getCombinedStepData();

if (array_key_exists('Shipping_State', $checkoutData) &&
$checkoutData['Shipping_State'] == "IN") {

$currentTax = 7.0;

}

}

Best Regards
Sebastian :)