Add Product Eight

@param Basket $basket
@return Basket
505937
private function addProductEight(Basket $basket)
    {
        $eight = $this->products->eight();

        $basket->add($eight->sku, $eight->name, $eight->price, function ($product) use ($eight) {
            $product->quantity($eight->quantity);
            $product->taxable($eight->taxable);
            $product->delivery($eight->delivery);
        });

        return $basket;
    }
586246
public function process(Basket $basket)
    {
        $meta     = $this->meta($basket);
        $products = $this->products($basket);

        return new Order($meta, $products);
    }
462126
private function addProductOne(Basket $basket)
    {
        $one = $this->products->one();

        $basket->add($one->sku, $one->name, $one->price, function ($product) use ($one) {
            $product->category($one->category);
        });

        return $basket;
    }
1222076
public function generate(Basket $basket)
    {
        $total = new Money(0, $basket->currency());

        foreach ($basket->products() as $product) {
            $total = $total->add($this->reconciler->discount($product));
        }

        if ($discount = $basket->discount) {
            $total = $this->calculateTotalWithDiscount($basket, $discount);
        }

        return $total;
    }
508293
public function createBasketAccessToken(Basket $basket, User $user)
    {
        return $this->create($user, self::TYPE_VIEW, null, $basket->getId());
    }
1320654
public function setQuickCheckoutBasket()
    {
        $oObjectFactory = $this->getObjectFactory();
        $oSession = $this->getSession();

        // Create new temp basket and copy the products to it
        $oCurrentBasket = $oSession->getBasket();
        $oSession->setVariable(self::BESTITAMAZONPAY_TEMP_BASKET, serialize($oCurrentBasket));

        //Reset current basket
        $oSession->setBasket($oObjectFactory->createOxidObject('oxBasket'));
    }
421311
public function save()
	{
		if( isset( $this->baskets[$this->type] ) && $this->baskets[$this->type]->isModified() ) {
			$this->manager->setSession( $this->baskets[$this->type], $this->type );
		}

		return $this;
	}
439676
public function add(Product $product, int $quantity)
    {
        if (!$product->isAvailable()) {
            throw new ProductNotAvailableException($product);
        }

        if (!$product->price()->hasCurrency($this->currency)) {
            throw new InvalidCurrencyException($this->currency, $product->price()->currency());
        }

        if (array_key_exists((string) $product->sku(), $this->items)) {
            $quantity += $this->items[(string) $product->sku()]->quantity();
        }

        $this->items[(string) $product->sku()] = new CartItem($product->sku(), $quantity);
    }
1210267
public function addBasketGrandTotalParams()
    {
        $basket = $this->getBasket();
        $request = $this->getPayPalRequest();

        $request->setParameter("L_PAYMENTREQUEST_0_NAME0", $this->getLang()->translateString("OEPAYPAL_GRAND_TOTAL"));
        $request->setParameter("L_PAYMENTREQUEST_0_AMT0", $this->formatFloat($basket->getSumOfCostOfAllItemsPayPalBasket()));
        $request->setParameter("L_PAYMENTREQUEST_0_QTY0", 1);
    }
925720
public static function hasBasketGotSimilarItem(self $basket, ProductVariation $variation)
    {
        /** @var BasketItem[] $basketItem */
        $basketItem = $basket->BasketItems->filter(new Equals('ProductVariationID', $variation->UniqueIdentifier));
        if (count($basketItem)) {
            return $basketItem[0];
        }
        return false;
    }
319325
public function addProduct(Icepay_Order_Product $obj) {
        if (!isset($this->_data["products"]))
            $this->_data["products"] = Array();
        array_push($this->_data["products"], $obj);
        return $this;
    }
168998
public function six()
    {
        $basket = new Basket(new UnitedKingdom);

        $basket = $this->addProductZero($basket);
        $basket = $this->addProductThree($basket);
        $basket = $this->addProductSeven($basket);

        return $basket;
    }
374056
protected function copyServices( \Aimeos\MShop\Order\Item\Base\Iface $basket, array $errors )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'service' );

		foreach( $basket->getServices() as $type => $list )
		{
			foreach( $list as $item )
			{
				try
				{
					$attributes = [];

					foreach( $item->getAttributeItems() as $attrItem ) {
						$attributes[$attrItem->getCode()] = $attrItem->getValue();
					}

					$service = $manager->getItem( $item->getServiceId(), ['media', 'price', 'text'] );
					$this->getObject()->addService( $service, $attributes );
					$basket->deleteService( $type );
				}
				catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically
			}
		}

		return $errors;
	}
126214
public function store( MShop_Order_Item_Base_Interface $basket )
	{
		$this->saveItem( $basket );

		$this->_storeProducts( $basket );
		$this->_storeCoupons( $basket );
		$this->_storeAddresses( $basket );
		$this->_storeServices( $basket );
	}
799058
public static function getCurrentBasket()
    {
        $settings = SuperCMSSession::singleton();

        try {
            $user = SCmsLoginProvider::getLoggedInUser();
            try {
                $basket = Basket::findLast(new AndGroup(
                    [
                        new Equals('UserID', $user->UniqueIdentifier),
                        new Not(new Equals('Status', self::STATUS_COMPLETED))
                    ]
                ));
            } catch (RecordNotFoundException $ex) {
                $basket = new Basket();
                $basket->UserID = $user->UniqueIdentifier;
                $basket->save();
            }

            if ($settings->basketId != $basket->UniqueIdentifier) {
                self::joinAnonymousBasketItemsToUserBasket($basket);
                self::updateSession($basket);
            }
        } catch (NotLoggedInException $ex) {
            try {
                $basket = new Basket($settings->basketId);
            } catch (RecordNotFoundException $ex) {
                $basket = new Basket();
                $basket->save();
                self::updateSession($basket);
            }
        }

        return $basket;
    }
1285502
public function add(Money $money)
    {
        $sum = $this->getAmount() + $money->getAmount();
        $this->setWhole($sum);
        $this->setFraction($sum);
        return $this;
    }
338524
protected function _addOrderArticlesToBasket($oBasket, $aOrderArticles)
    {
        // if no order articles, return empty basket
        if (count($aOrderArticles) > 0) {
            //adding order articles to basket
            foreach ($aOrderArticles as $oOrderArticle) {
                $oBasket->addOrderArticleToBasket($oOrderArticle);
            }
        }
    }