1
Magento CE ver。 1.7.0.2试图计算Magento中的单个项目的销售税,而不显示包括税的价格
我试图从我们的Magento商店获取一些订单数据以集成到我们的其他商业软件中。在我的情况下,我需要计算单个项目的价格加税。 产品目录中的产品价格设置为包括或两者都(在系统>配置>销售>税收)。我如何计算某件商品的税额,同时让网站的显示价格不含税?
$customer_tax_class = Mage::getModel('tax/calculation')->getRateRequest()->getCustomerClassId();
$_product = Mage::getModel('catalog/product')->loadByAttribute('sku',$skunumber);
$my_price = Mage::helper('tax')->getPrice($_product, $_product->getPrice(), true, $shippingAddress, $billingAddress, $customer_tax_class);
我也尝试用这个代替,但我仍然得到的价格不含税(除非我改变上述显示设置):
$_finalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice(), true, $shippingAddress, $billingAddress, $customer_tax_class);
我知道那一定是可能的,因为Magento的数字出您下订单时需要缴税。任何帮助将不胜感激。