Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $params = array(
- 'product' => $productIds,
- 'qty' => 1
- );
- $_product = $this->_productRepository->getById($productIds);
- //echo "<pre/>"; print_r($_product->getData()); exit;
- $_product->setPrice(0);
- $this->_cart->addProduct($_product,$params);
- $this->_cart->save();
Add Comment
Please, Sign In to add comment