Start a new topic
Answered

Special variation on product page

Hello,

I need you to know if what I need to carry out is possible or not with Virto Commerce. In the product selection, I need to insert a select box to allow the user to choose an album. (image). 

The aim is to allow the customer to choose an album and to apply treatments to the images inside.


But now, i'd like to know How can I add this item in the model to write it into the MiniCart and into the shopping cart?


In the virto-commerce.js file, I see we can change the VirtoCommerce.url to add my parameter but i think it's not the good way.



02.png
(85.1 KB)
01.png
(75.6 KB)

Best Answer

The options should be automatically added by CartHelper class. Check the method called CartHelper.CreateLineItem, it has a line that add LineItemOption. You can also override that class and add options yourself based on parameters passed.


Answer

The options should be automatically added by CartHelper class. Check the method called CartHelper.CreateLineItem, it has a line that add LineItemOption. You can also override that class and add options yourself based on parameters passed.

 Thanks a lot, all work well.

Login or Signup to post a comment