Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $quote = $this->quoteRepository->getActive($cartId);
  2.  
  3. $quote->setStore($store);
  4.  
  5. $items = $this->quoteRepository->getActive($cartId)->getAllItems();
  6. foreach($items as $item)
  7. {
  8. $item = $quote->getItemById($item->getId());
  9. $item->setData('store_id',$storeId);
  10. $item->calcRowTotal();
  11. $item->getProduct()->setIsSuperMode(true);
  12. $item->save();
  13. }
  14.  
  15. $quote->setTotalsCollectedFlag(false)->collectTotals()->save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement