0

Hi everyone I am designing a commerce Laravel site in which you can define different product types with custom attributes and have products and their variations.

I have a question: When you select a variation of a product and add it to cart its simple but, What If I want products to have some options that add an additional price (but don't add a separate sku for it): like including cable for a electronic device, including a wooden spoon for honey, gift wrapping or special packaging. Even guarantee options or subscription options (3 month, 6 month, ...) which I think I must define on a separate service list in order to edit prices globally.

I don't know how to add a product with these options to cart. If you could give me a hint it will be very helpful

Please consider somethings that don't need inventory or consider services: you buy a table and finishing on edges can be different (for example rounding the edges), or cutting service in a product which is a Yes or No option that add extra cost to it, examples like this

Sorry for the long question Many thanks in advance


Edit: I have implemented the variation/sku system, I'm looking for logic for adding extra options of product to cart. Thanks.

Emma
  • 23
  • 6
  • There are quite a lot of opinions and approaches on how you could design your database. [This question](https://stackoverflow.com/questions/24923469/modeling-product-variants) and [this question](https://dba.stackexchange.com/questions/123467/schema-design-for-products-with-multiple-variants-attributes) seem similar and might be a good place to start. – Peppermintology Oct 09 '22 at 07:02
  • @Peppermintology Thanks for your reply, I have implemented the variation of products using JSON columns (over EAV model). But I want to add some options that add extra cost for the product (not for variations) and I dont know how can I pass the selected sku with these options to cart. I am looking for a way to Add a variation to cart with some optional options (I dont want to make new skus for each option): for example optional guarantee or extra cutting that add cost. – Emma Oct 09 '22 at 07:38
  • It is difficult to provide meaniful suggestions without more detail and example (even psuedo) code. Can you add anything like this in your question? – Peppermintology Oct 09 '22 at 08:20

0 Answers0