I need to dynamicaly remove tax during checkout for business to business customers in Magento. I have a module which asks for a VAT ID during checkout and checks it against the European Online VAT-ID Validation Service. If the VAT ID is valid, the tax should be removed during checkout.
The module already assigns new customers with valid VAT ID to the according business to business group in Magento. Customers who order for the first time and create their account during that first checkout, get charged VAT (even with valid VAT-ID).
I basically need to know, how this can be done, which methods involved, etc.
I've got a similar setup going on at the moment, what I have done is if the VAT# at checkout is stored in mage_checkout_model_session. The call
Mage::getSingleton('checkout/session')->getQuote()->getCustomerTaxvat()
In my instance is returning the VAT number for me to check elsewhere. Your VAT# validator is certainly setting something similar to this. At this point you can either create a new module to modify the tax, or override the controller with
$x = Mage::getSingleton('where_your_extension/stores_the_value)->getIsVatValid();
if ($x) $this->setTaxValue( 0 );
else //magento sets it automatically
and it will set the tax rate to zero for the remainder of the session. It will work with guests and registered customers.
Related
We would like Magento to only display the payment method "Purchase order" when the fields "Company name" and "Taxvat" are filled out on the Magento checkout page. (so that only businesses can purchase and pay afterwards)
We use Firecheckout, but that doesn't matter because it requests the payment methods every time something changes in the address (like company name).
So the modification has to be made somewhere in the function $methods = $this->getMethods(). But where and how to do it? I know that the payment methods can by default be dependend on the country entered on the same page, so it should be possible that it's also dependend on the Company and VAT fields.
Thanks for your help guys!
I have products with a normal price(let's say product A costs 20e) and a group price(lets product A costs 15e) assigned to my customer group
that I call it "Resellers".
I want to apply an extra 20% discount to specific Resellers (not to the whole Reseller group)
in the group price(meaning the 15e)
I tried to solve it by creating a "Shoping Cart Price Rule" (I called it "20% Extra Discount") it applies to the whole Customer Group
How Can I apply 20% it only to specific Resellers and not to the whole Reseller Group for the group price only?
What you are asking is not possible with Magento out of the box.
You can overcome this by generating a coupon that you can send out by e-mail to your specific customers.
or you can try to use an extension like this.
It's not free, but from the looks of it it might get you what you need.
I'm in no way associated to the extension provider. I just found it on a simple search on the web.
You need to do some coding in order to achieve above said, following is the way it should happen.
You would need to hook into an event, ex :
Changing the price in quote while adding product to cart: magento
Also in the observer created above you need to do something like
Add custom discount order in total with button
Now whats above will do :
Let us suppose you create a general rule for 20% discount but do not relate it to any customer group.
What happen is once a product is added to a cart you can check into an Observer whether you want to provide discount to this particular customer.
If yes programmatically add coupon to the quote or order else not.
Please note : there are various other type of event for ex: after moving to checkout etc, in case you do not want to use on adding of product to cart.
hope above helps.
I'm trying to implement the check for VAT ids, and got stuck (the VIES check being a new feature in 1.7). I configured the VAT checks to assign users to certain customer groups - and this works perfectly.
I have 3 customer groups: Business In Romania, General and Business Outside Romania. What I want is to add a 24% VAT tax for the first 2 groups, and remove this tax completely for "Business outside Romania".
I can add taxes per country in Sales - Tax - Manage Tax Rates, but that doesn't help me since I need to add the basically for all countries.
To sum up, here's the question: How can I add taxes per customer group ?
Also, can I do this from the admin panel alone, or do I have to create my own module ?
Solution(s)
Follow the steps Andrew suggested
Another options works great if you want the products to be shown including VAT, and remove it when a valid VAT is added. You create a promotion that applies to the "Valid VAT" customer group, that gives a percent reduction of (1 - (1 / (YOUR_VAT / 100 + 1)))*100 (this will be an ugly number, but copy it with all the decimals). In this scenario, you may have a 0.01 error from time to time.
A) You use Customer Tax Classes.
1) Create a Custom Tax Class
2) Assign the tax class to a customer group.
3) Create a new Zone and Rate. Assign the Tax percentage you need. Make it work for EACH country you intend it to work for.
You will have to duplicate the rules unfortunately.
4) Create a new Rule via 'Manage Tax rules', assigning your new Tax Rate(s), Customer Tax class etc. Notice there's a multiselect to select the new rules you made for multiple countries.
Customers in your group will now get this Tax applied to them regardless of where the location is.
By default you are going to end up with some replication of rates due to Magento not allowing you to select "all" coutnries at once.
This can be done via a custom extension (i've done this before) but not as standard.
B) Alternatively you can change your settings in the magento admin:
Set the Tax calculation based on ORIGIN rather than destination. This may or may not work depending on what you need for your particular setp.
System > Config > Sales > Taxes > Calculation
I have a magento site in which I want to charge the customer with some extra fee per order.
This fee must be displayed under cart page & need to be added to subtotal & passed to all places including payment gateway. Any one have implemented this or is there custom module which supports this option.
You can try Magento Extra Fee Extension which allows you to apply different types of extra charges like product or category specific addditial charges, order type fee, or shipping type fee, gift wrap fee etc.
Translating fee names in different languages or charging one time setup fee is something you should look at.
Fooman has made an off-the-shelf extension that should do what you are looking for
http://store.fooman.co.nz/magento-extension-surcharge.html
If the user has an existing account balance, I'd like to give him the option to specify how much of his previous balance to apply to the item and sync this info with the cart and order. I have already implemented the user's account balance, both on the front and back end.
Would a coupon-like system work best, or should I try something else?
Thanks in advance.
I would let the customer decrease its cart total with the balance would be more simple / logic for the customer also (?)
What E-commerce solution do you use? Magento(?) If so there are coupon extensions that can handle this.
You could also build a simple balance system where users would see there balance in there account ( if such feature is implemented) or just mail them a message with a unique code that you save in DB + the value of balance then use this code as a coupon on checkout.
We have created quite a few e-commerce solutions up to date. Usually, when user balance is involved, then what you do is create two transactions referred to one invoice. In the first transaction specify the amount taken from balance, where as leave the other transaction for whatever checkout method you use. Upon callback from the checkout, see if the balance paid matches the invoice to mark it as paid respectfully.
Alternatively, you can use discount - decrease user balance and add "discount" to the order. It all depends on your accounting needs and preferences.
On Amazon they allow you to apply any unused balance to the existing order. Its when you checkout that they say you have $150 credit on your account, would you like to apply this to your order, it defaults to yes in a tick box.
Its quite neat and simple, it doesn't allow you to apply a part amount from what I've seen.
Then when you go to payment you pay $total - balance.
So if you have $200 total, the payment via credit card would be for the $50.