Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $specialId = 123;
- $customOptions[$specialId] = "Special instruction custom option";
- // $imageId = 124;
- // $url = 'http://example.com/url/to/image.png';
- // $customOptoins[$imageId] = $url;
- $params = [
- 'product' => $product_id, //product Id
- 'qty' => $qty, //quantity of product
- 'options' => $customOptions //custom options
- ];
- $this->_cart->addProduct(
- $_product,
- $params
- );
Add Comment
Please, Sign In to add comment