04.07.2014 Views

DEVELOPER’SGUIDE1.5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.belvg.com - Ecommerce Solutions and third party software integration<br />

Creating a new tax:<br />

Configuring tax options<br />

• The basic methods that work with taxes:<br />

• Cart:: getTaxesAverageUsed($id_cart) - obtains the average cost of delivery for the current<br />

quote (future order)<br />

• Tax:: getCarrierTaxRate($id_carrier, $id_address = null) – Returns the carrier tax rate<br />

• Tax:: getProductEcotaxRate($id_address = null) – Returns the ecotax tax rate<br />

• Tax:: getProductTaxRateViaRules($id_product, $id_country, $id_state, $zipcode) – Return<br />

the product tax rate using the tax rules system<br />

• Tax:: getTaxIdByName($tax_name, $active = 1) – Return the tax id associated to the specified<br />

name<br />

The final order amount is calculated by the following method:<br />

Cart:: getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null,<br />

$id_carrier = null, $use_cache = true)<br />

This takes into account the tax rules, the cost of delivery, discounts and so on.<br />

25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!