Developer forum

Forum » Ecommerce - Standard features » Orderlinefields on product page

Orderlinefields on product page

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

I have a couple of OrderLineFields on a product, which is mandatory, before the customer is able to add the product to the cart.

If the customer goes back to the product page from the cart, by clicking the products name, would it be possible to have the OrderLineFields prefilled, with the entered values from the product currently in the cart?

I guess I could make a NotificationSubscriber in order to save the values to a session variable or tags, before adding it to the cart, but is there another way of doing this?

--
Best regards
Kurt Moskjaer Andersen 


Replies

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Another way of achieving this, would be to output the different OrderLineFields with input fields in the cart, to let the customer change the different values and update the cart.

/Kurt

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes, or if the product template is razor, take a look at the Context.Cart for orderlines for the current product, and locate the orderlinefield values.

You can also add the information from the cart to the product using additional querystring parameters, if they are short enough, and pick it up in the product template.

Votes for this answer: 1
 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Thanks, I wasn't aware of Context.Cart :)

/Kurt

 

You must be logged in to post in the forum