public function getProduct(ConnectionInterface $con = null, $locale = null) { $product = parent::getProduct($con); $translation = $product->getTranslation($locale); if ($translation->isNew()) { if (ConfigQuery::getDefaultLangWhenNoTranslationAvailable()) { $locale = Lang::getDefaultLanguage()->getLocale(); } } $product->setLocale($locale); return $product; }
/** * @param CartItem $cartItem The cartItem object to add. */ protected function doAddCartItem($cartItem) { $this->collCartItems[] = $cartItem; $cartItem->setProductSaleElements($this); }
/** * @param CartItem $cartItem The cartItem object to add. */ protected function doAddCartItem($cartItem) { $this->collCartItems[] = $cartItem; $cartItem->setCart($this); }