Guest User

Untitled

a guest
Jan 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $specialId = 123;
  2. $customOptions[$specialId] = "Special instruction custom option";
  3.  
  4. // $imageId = 124;
  5. // $url = 'http://example.com/url/to/image.png';
  6. // $customOptoins[$imageId] = $url;
  7.  
  8. $params = [
  9. 'product' => $product_id, //product Id
  10. 'qty' => $qty, //quantity of product
  11. 'options' => $customOptions //custom options
  12. ];
  13.  
  14. $this->_cart->addProduct(
  15. $_product,
  16. $params
  17. );
Add Comment
Please, Sign In to add comment