ibexa

Path

ez publish / technical manual / 3.8 / features / vat charging system / displaying vats on the actu...


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Displaying VATs on the actual site

The next subsections explain the way in which the VATs are displayed on the actual site in case of using the "VAT per product" and/or "Country dependent VAT" approach.

VAT per product

Let's say that a fixed rate of VAT is assigned to each product. When a user is viewing a product page, the system displays price including VAT for this product. A user can add products to his shopping basket where the VAT percentage will be displayed for each product. A user should click the "Checkout" button to make an order.

After clicking the "Checkout" button a user will be asked to specify his/her name, email, country and other details needed for customer account and this particular order. This information is handled by the shop account handler that is specified under the "[AccountSettings]" section of the "settings/shopaccount.ini" configuration file. Choosing a country is usually required (this behavior does not depend on the "RequireUserCountry" INI setting described in the "VAT settings" section).

Information about the specified country will be stored in the system together with the customer's order. A customer is determined by his unique email, i.e. orders with different emails will belong to different customers. The customer's account contains information about the country that was specified in the first order made by this customer. Please note that a customer account is a special data structure that is used in the webshop system and is not connected with the actual user object.

If you have added an attribute of the country datatype to your user class then it is possible to assign a country to a user. This can be done automatically when the user makes his first order if the attribute identifier is specified it in the "UserCountryAttribute" INI setting. Please note that this functionality is generally unneeded for "VAT per product" approach and thus it is disabled if no VAT handler is enabled. Moreover, the system will not automatically change the user's country if it is already set (the user's country can be set when filling in the user registration form, editing the user object or choosing a country from the toolbar).

Country dependent VAT

Let's say that you use the "country dependent VAT" approach, your user class contains an attribute of the country datatype and its identifier is specified in the "UserCountryAttribute" INI setting.

When a user is viewing a product page, the system will display price including VAT for this product. A user can add products to his shopping basket where the VAT percentage will be displayed for each product. After clicking the "Checkout" button a user will be asked to specify his/her name, email, country and other details needed for customer account and this particular order. The system will automatically re-calculate VATs using the best matching VAT rules for the specified country and include these VATs into the final product prices that are displayed on the "Confirm order" page.

If a country is assigned to a user, the system will calculate the amount of VAT for a product being viewed using the best matching VAT rule for user country and product category. If a user selects another country after clicking the "Checkout" button (not the country assigned to this user), this country will not be assigned to the user but will be used only for this particular order.

If no country is assigned to a user then the amount of VAT for a product being viewed will be calculated using the default VAT rule. The country specified by user after clicking the "Checkout" button will be automatically assigned to this user.

Svitlana Shatokhina (11/05/2006 12:46 pm)

Svitlana Shatokhina (12/05/2006 12:56 pm)


Comments

There are no comments.