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>
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- Integration using tags, to discover all the notifications you can send from your ecommerce to Connectif and how they work.
- Integration using JavaScript events, to learn about this type of integration, which give you greater control over when and how to send events.
- Integration with Connectif via API, to synchronize contacts, products, purchases and vouchers.
- Check the integration with your ecommerce, so you can be confident that your data is syncing correctly with your Connectif account.