0

I want to add a product in cart with custom options which is not defined in product. Actually I have a options which is not exactly related to products but want to See/Link it in cart as well as checkout page.

For ex- There are my various added customers in my account which I want to purchase a same product with different qty. I defined a custom option as "Gift customer" to product, but as "Gift customer" having different values against different login users which I can not fix it.

So I want to add "Gift Customer" programmatically while adding product in cart

Hope you understand my problem.

Pravin
  • 95
  • 18

1 Answers1

1

To add custom option to items in your cart you should use

Add Custom Attribute to item - additional_options

Using Observer - checkout_cart_product_add_after

Take a look @ Magento - Quote/order product item attribute based on user input

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62