[-] Core: the gift wrapping taxes is now handled by tax rules group

This commit is contained in:
Rémi Gaillard
2012-12-21 18:01:43 +01:00
parent 0e961a9ed1
commit 41ca79cc77
9 changed files with 59 additions and 38 deletions
+3 -4
View File
@@ -470,9 +470,8 @@ class ParentOrderControllerCore extends FrontController
protected function _assignWrappingAndTOS()
{
// Wrapping fees
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
$wrapping_fees_tax = new Tax(Configuration::get('PS_GIFT_WRAPPING_TAX'));
$wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100)));
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
// TOS
$cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id);
@@ -495,7 +494,7 @@ class ParentOrderControllerCore extends FrontController
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
'address_collection' => $this->context->cart->getAddressCollection(),
'delivery_option' => $this->context->cart->getDeliveryOption(null, false),
'gift_wrapping_price' => (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')),
'gift_wrapping_price' => (float)$wrapping_fees,
'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency),
'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency)));
}