I have used this event for add product with a custom price: checkout_cart_product_add_after
its working fine for cart page. but when I redirect to checkout page then my custom product price has replaced with the original price which is already set in admin.
is there any way to save this custom price for place order whole process?
i used below code for add product with custom price :
$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();
is there any event to save this custom price for end of order? and which one code I used for that?