9 use Magento\Quote\Model\Quote\ItemFactory;
63 $item = $this->quoteItemFactory->create();
70 if (
$item->getId() && $product->getParentProductId()) {
94 if (
$request->getResetCount() && !$candidate->getStickWithinParent() &&
$item->getId() ==
$request->getId()) {
97 $item->addQty($candidate->getCartQty());
99 $customPrice =
$request->getCustomPrice();
100 if (!empty($customPrice)) {
101 $item->setCustomPrice($customPrice);
102 $item->setOriginalCustomPrice($customPrice);
129 $storeId = $this->storeManager->getStore($this->storeManager->getStore()->getId())
133 $item->setStoreId($this->storeManager->getStore()->getId());
merge(Item $source, Item $target)
setItemStoreId(Item $item)
init(Product $product, DataObject $request)
prepare(Item $item, DataObject $request, Product $candidate)
__construct(ItemFactory $quoteItemFactory, StoreManagerInterface $storeManager, State $appState)