Change tax percent in magento 1.8 - php

In app/code/local/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php,
_totalBaseCalculation has a function where it sets tax percent,
$item->setTaxPercent($rate).
However I wish to set tax percent to (rate +y(any number)).
When I do this, there is no change in quote item data in sales_flat_quote_item. Is tax percent inserted from somewhere else???

Simply set tax rates of your wish in Backend at
Sales->Tax->Manage Tax Rates

Related

eBay API to get Total Amount using GetOrders by PHP

Right now, I am using GetOrders to launch all my orders to my database. Normally, it works fine. I can get the total amount(includes item price and tax) by using:
$totalAmount = $order->AmountPaid;
However, when I tried to import an International Order, the amount was wrong.
The thing is: I only charged him $102.90, but the amount here gives me $157.62
Does anyone know how can I get the total price, which under the "Total" column, in eBay? What kind of value I need to use? Or maybe how to calculate the price for international order?
There few fields related to order price
OrderArray.Order.AmountPaid
This value indicates the total amount of the order. This amount includes the sale price of each line item, shipping and handling charges, shipping insurance (if offered and selected by the buyer), additional services, and any applied sales tax. This value is returned after the buyer has completed checkout (the CheckoutStatus.Status output field reads 'Complete').
OrderArray.Order.Total
The Total amount equals the Subtotal value plus the shipping/handling, shipping insurance, and sales tax costs.
OrderArray.Order.Subtotal
The subtotal amount for the order is the total cost of all order line items. This value does not include any shipping/handling, shipping insurance, or sales tax costs.
I would suggest you try Order.Total for receive price of the order.

Details don't match amount total when using taxes

I'm using Paypal to process payments.
The subtotal (without taxes) for the purchase is 132.94$. My customers are in Canada and I need to multiply a tax percent to that subtotal in order to get the real total.
The tax percent is 1.14975, but Paypal doesn't accept a tax percent with more than two decimals, so it rounds it to 1.15.
Here's the code that I use to setup the payment :
// Not shown- create an ItemList, add Item's to it
// ...
$details = new Details;
$details->setSubtotal(132.94);
$details->setTax(1.14975);
$amount = new Amount;
$amount->setCurrency('CAD');
$amount->setTotal(152.88); // 132.94 * 1.15
$amount->setDetails($details);
// ...
// Not shown - create the transaction, try to create the payment
However, when I try to send the information to Paypal, I get this error :
Transaction amount details (subtotal, tax, shipping) must add up to specified amount total
I tried dumping out $amount to see what it contains, and here's what I see :
Why does it tell me that the details don't add up to the amount? Am I missing something here? If I multiply the subtotal by the tax, I get the total for the amount, they do match up.

Add additional fee on the total shipping fee

Is there a way (a snippet) to add an extra fee on the total shipping fee. Want to add an extra $1.00 (for box cost) on the total shipping fee.
Instead of making it visible on front-end I just want to make that extra fee hidden and add it on the total shipping cost.
Say
Subtotal : $5.00
Shipping : $3.00 (total shipping is $2.00 + my extra $1.00 fee)
Total = $8.00
If you prefer not to use a plugin, it looks like you will need to edit includes/class-wc-shipping.php Line 317.
It appears that $this->shipping_total += $rate->cost; on Line 317 calculates the shipping total on a per-package basis (this is in a loop).
After the loop completes, you'll need to add your fee:
The code added on Line 327, $this->shipping_total += 1;, adds an additional, hidden fee to the total cost.
To add a hidden fee to the shipping line item, edit includes/class-wc-cart.php Line 1387 from:
To...
This accounts for the AJAX call that drives shipping cost calculation.
It looks like the WooCommerce Extra Fee Options PRO plugin fills this need, so yes it is possible.

Magento rounding issue on Grand Total

I'm having a strange issue on Magento Grand Total.
I have a product of 99.99€ (inc. tax). The tax is 23% rate.
I have created a Promo Code to have 25% discount on that product.
I've set up the Tax Calculation Method based on the Row Total
I've set up the Apply Customer Tax to be after discount
I've set up the Apply Discount on Prices to be including tax.
The problem comes when I add the product and put a promo code, that created a change on 0.01€. Changing the precision to 4 or the rounding to 4 sometimes solves the issue but creates issues with payment gateways.
The cart page shows the following info:
Subtotal Excl Tax - 81.29
Subtotal Incl Tax - 99.99
Discount - 25.00
Tax - 14.02
Grand Total - 74.98
The grand total should be 74.99€ (99.99€ from the product - 25.00€ from the discount).

Changing currency in cart column unit price excluse tax error when currency converted

I've two store view, one in EUR (primary currency) and the other in Dollar.
Tax is 21% for both stores, included in product price.
In the cart, if I change the store to the Dollar store view, column "Unit Price (Excl. Tax)" isn't correctly calculated. It seems that only on this field currency conversion is done two times.
This is the content of the store
http://dl.dropbox.com/u/546584/cart_problem_DOLLAR.png
http://dl.dropbox.com/u/546584/cart_problem_EUR.png
Some one can halp me solve this problem?
I've done a lot of debug but can't bring myself out of the tunnel.
Tkis!
If the store is saving the prices incl. tax, then You'd be careful when calculating the price excl. the tax.
If the tax is 21%, then the price incl. tax is 121% of the price excl. tax, thus the price excl. tax should be calculated like $priceExclTax = $priceInclTax / 1.21;.
Download version 1.7.0.2
Copy to local
Mage_Tax_Model_Sales_Total_Quote_Subtotal
That should fix your problem

Categories