The “Product Basket Item” object in cart tags

The "Product Basket Item" object is a list of data (array) used to define a Product together with a quantity and a total price, in shopping carts and purchases.

 

What is it and where to use this object?

The class "product_basket_item" must be inserted in the cart and purchase made.

 

Properties

There will be a tag with the class "product_basket_item" for each different item, describing each one along with its quantity and the total amount it adds up to.

A "Product Basket Item" includes all the properties that a Product can have, in addition to:

Name Required Type Multiple Description
quantity Yes integer No Total number of products in this Product Basket Item.
price Yes decimal No Total amount of the products in this Product Basket Item.

 

Example:

Once the object is included, the tag containing it will look like this:

<div class="cn_cart" style="display:none">
...
<div class="product_basket_item">
<span class="quantity">10</span>
<span class="price">91.5</span>
<span class="url">http://example.org/products/pr6658</span>
<span class="product_id">pr6658</span>
<span class="name">Ratón Microsoft basic</span>
<span class="image_url">http://example.org/img/products/pr6658.jpg</span>
<span class="unit_price">9.15</span>
</div>
</div>
 
 

Congratulations!
You’ve reached the end of the tutorial.

  

Do you have questions?
Don’t forget, our Connectif specialists are here to help you. To contact them, just open a Support ticket by clicking the blue “Help” button on your dashboard.


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Was this article helpful?
0 out of 0 found this helpful