The “Current shopping cart status” tag is a snippet of HTML code used to describe the contact’s current shopping cart.
What is this tag and where is it used?
The “cn_cart” tag should be inserted on every page whenever a change is made to the cart.
Properties
The different properties of a cart must be defined within the “cn_cart” tag as child tags, indicating the name of the property in the “class” attribute.
Each different product in the cart is indicated by a tag with the class “product_basket_item”, which includes their quantity and amount.
The properties to be included in the tag are:
Name | Required | Type | Multiple | Description |
---|---|---|---|---|
total_price |
Yes |
decimal |
No |
Total cart amount. |
product_basket_item |
No |
Yes |
Items contained in the cart, together with their quantity and the amount. |
|
cart_id |
Yes |
string |
No |
Unique identifier for the cart. |
total_quantity |
Yes |
string |
No |
Total number of products in the cart (including duplicates). |
Other considerations
You must include the cart without products tag when the cart has been emptied. This way, the cart won’t be considered abandoned when it doesn’t not contain any products.
Example
Once the properties are included, the tag will look like this:
<div class="cn_cart" style="display:none">
<span class="cart_id">crt8679803</span>
<span class="total_quantity">3</span>
<span class="total_price">180.75</span>
<div class="product_basket_item">
<span class="quantity">3</span>
<span class="price">180.75</span>
<span class="url">http://example.org/products/pr9658</span>
<span class="product_id">pr9658</span>
<span class="name">Teclado Gaming Logitech Pro v.1.5</span>
<span class="description">Teclado inalámbrico retroiluminado de alta gama, personalizable y resistente a líquidos y caídas.</span>
<span class="image_url">http://example.org/img/products/pr9658.jpg</span>
<span class="unit_price">60.25</span>
<span class="availability">InStock</span>
<span class="category">/Ordenadores/Teclados/Logitech</span>
<span class="category">/Ordenadores/Gaming</span>
<span class="tag">Azul</span>
<span class="tag">Gaming</span>
<span class="tag">Retroiluminado</span>
<span class="tag">Inalámbrico</span>
<span class="brand">Logitech</span>
<span class="review_count">9</span>
<span class="rating_value">4.5</span>
<span class="thumbnail_url">http://example.org/img/thumbnails/products/pr9658.jpg</span>
<span class="related_external_product_id">pr10636</span>
<span class="related_external_product_id">pr11939</span>
<span class="related_external_product_id">pr12653</span>
<span class="published_at">2020-05-20T15:24:20Z</span>
<span class="custom_field_1">Información personalizada de ejemplo</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.