Guest User

Untitled

a guest
Mar 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. $params = array(
  2. 'product' => $productIds,
  3. 'qty' => 1
  4. );
  5. $_product = $this->_productRepository->getById($productIds);
  6. //echo "<pre/>"; print_r($_product->getData()); exit;
  7. $_product->setPrice(0);
  8. $this->_cart->addProduct($_product,$params);
  9. $this->_cart->save();
Add Comment
Please, Sign In to add comment