Developer forum

Forum » Ecommerce - Standard features » Product field values not transfered to cart

Product field values not transfered to cart

Magni J. Hansen
Reply

I have created some order line fields in MC > Orders > Order line fields.

These fields are visible on the product page. After all fields are filled out and the product is added to the basket (get form), none of these values are available on the cart template.

 

How can these values be available on the cart object ?

 

The order line fields are also added on the top ecom group and set to be inherited on sub groups


Replies

 
Magni J. Hansen
Reply
This post has been marked as an answer

Here's the solution, not straight foreward.

 

Firstly add all your orderline fields to ecom group.

 

On product page add this to your template:

<!--@LoopStart(Product.OrderLineFields)-->
<input name="<!--@Ecom:Product.OrderLineField.InputTextFieldName-->" type="text" />
<!--@LoopEnd(Product.OrderLineFields)-->

 

On show cart page (my step 1) in cartv2 (NB: now Order:OrderLineFields):

<!--@LoopStart(Order.OrderLineFields)-->

<input name="<!--@Ecom:Order:OrderLine.OrderLineField.InputTextField.Name-->" type="hidden"

value="<!--@Ecom:Order:OrderLine.OrderLineField.Value-->" />

!--@LoopEnd(Order.OrderLineFields)--

 

These Order:OrderLineFields are also available on the order receipt. 

Votes for this answer: 0
 

 

You must be logged in to post in the forum