04.07.2014 Views

DEVELOPER’SGUIDE1.5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

A cart’s object can also be obtained from any other Prestashop php-script: Context::getContext()-<br />

>cart. And from the template: {Context::getContext()->cart}<br />

The Cart class contains the complete logic of the shopping cart, in contrast to the controller, which<br />

only indicates the path of the logic execution to the Cart model.<br />

Shopping Cart is a complex mechanism, which includes a variety of other entities that allow defining<br />

price rules, discounts, etc. Let’s describe the main of them:<br />

Cart related entities:<br />

Cart Rules – is used to apply various pricing rules on the basis of specified conditions that are<br />

associated with discounts, delivery prices and gifts. It is configured in the administrative part of the<br />

store under the following path: Price Rules -> Cart Rules. The rule will be applied if you enter a<br />

secret code (created by the admin) on the checkout page.<br />

Configuring pricing rules:<br />

21

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

Saved successfully!

Ooh no, something went wrong!