2

Our client wants a specific option built in Craft Commerce. I guess is possible, but don't know how? Maybe you can help me out?

A customer selects a box: for example "giftbox custom 4" (priced $ 15). After selecting the box. The customer can pick 4 different tastes of chocolate cookies (e.g. 2 brownies, 2 white choco. etc). After picking the cookies, the client can add this to the cart.

My initial thought is to use a note fields for this, storing all the cookie data. But how can I make sure that each "giftbox custom 4" is a unique line item? Now Craft is adding all the "giftbox custom 4" together.

This is what I want to create:

2x Giftbox custom 4
Containing: 2 caramel, 2 brownies

1x Giftbox custom 4
Containing: 1 white choco, 3 caramel

2x Giftbox custom 4
Containing: 2 dark choco, 1 caramel, 1 fruit

In total there a more than 14 different giftbox sizes. Giftbox custom 2, Giftbox custom 4, Giftbox custom 6, etc.
And you can choose from > 30 different cookies

@Luke Holder: When I am using line-item options: For example: Giftbox 4 -> with options ABCD.

After submitting: they appear in my basket. Perfect, and i can change the quantity of Giftbox 4 -> with options ABCD .

But when I go back to the shop and add an extra giftbox to the cart: Giftbox 4 -> with options EFGH. Giftbox 4 -> with options ABCD are removed from my cart.

So i want the "Giftbox 4" products separated:
1x Giftbox 4 -> with options ABCD .
1x Giftbox 4 -> with options EFGH

1

Line item options are built in and are designed exactly for this use-case:

https://docs.craftcms.com/commerce/v2/adding-to-and-updating-the-cart.html#line-item-options-and-notes

  • edited my question above. – Romberto Apr 3 at 11:21
  • Ii guess something is going wrong with my local env.. Strange: I can only store 1 product in my cart. I am using the Craft Commerce demo templates for testing purposes. Update Commerce and Craft to latest version. Any clue? – Romberto Apr 3 at 21:20
0

Solved the problem. Omg, I forgot to enable Craft Commerce Pro. That's why it didn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.