“Purchase completed” tag

 

Questo articolo è attualmente disponibile in inglese e spagnolo. Puoi fare riferimento a questa documentazione mentre arriva nella tua lingua.

The "purchase completed" tag is a snippet of HTML code used to describe a completed purchase.

  

This article is part of the guide to creating a custom integration.
If your integration is via a module, this tag will be added to your ecommerce platform automatically.

 

What is this tag and where is it used?

The "cn_purchase" tag must be inserted on the first page visited after a purchase. Usually, this page will be the purchase confirmation page.

 

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.

 

If you want to know more about the "Product Basket Item" object, check out this article.

The properties to be included in the tag are:

Name

Required

Type

Multiple

Description

total_quantity

Yes

integer

No

Total number of products in the cart (including duplicates).
For example: if a cart has three units of one product and seven of another, total_quantity will be equal to 10.

total_price

Yes

decimal

No

Total amount of the purchase.

purchase_date

No

string

No

Date of purchase. Awaiting ISO_8601 form.

product_basket_item

No

Product Basket Item

Yes

Items contained in the cart, together with their quantity and the amount.

purchase_id

Yes

string

No

Unique purchase identifier.

cart_id

No

string

No

Unique identifier of the cart from which this purchase originated.

 

Although optional, we recommend using the “cart_id” field to change the status of the cart to purchased and avoid incorrect Abandoned Cart events.

 

Example

Once the properties are included, the tag will look like this:

<div class="cn_purchase " style="display:none">
<span class="cart_id">crt8679803</span>
<span class="purchase_id">prchs5241</span>
<span class="purchase_date">2017-09-29 14:12:37.430Z</span>
<span class="total_quantity">3</span>
<span class="total_price">180.75</span>
<span class="payment_method">Credit card</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>

 

 

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:

Questo articolo ti è stato utile?
Utenti che ritengono sia utile: 0 su 0