当前位置: 首页>>代码示例>>PHP>>正文


PHP CheckoutCart::getAdvancedCheckoutCart方法代码示例

本文整理汇总了PHP中mage\checkout\test\page\CheckoutCart::getAdvancedCheckoutCart方法的典型用法代码示例。如果您正苦于以下问题:PHP CheckoutCart::getAdvancedCheckoutCart方法的具体用法?PHP CheckoutCart::getAdvancedCheckoutCart怎么用?PHP CheckoutCart::getAdvancedCheckoutCart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mage\checkout\test\page\CheckoutCart的用法示例。


在下文中一共展示了CheckoutCart::getAdvancedCheckoutCart方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAssert

 /**
  * Assert that after adding products by sku, wrong requested quantity error message appears.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         $currentMessage = $checkoutCart->getAdvancedCheckoutCart()->getFailedItemErrorMessage($product);
         \PHPUnit_Framework_Assert::assertContains(self::ERROR_QUANTITY_MESSAGE, $currentMessage);
         \PHPUnit_Framework_Assert::assertContains(sprintf($this->allowedQtyMessage, $product->getStockData()[$this->saleQtyType]), $currentMessage);
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:15,代码来源:AbstractAssertRequestedQtyFailMessage.php

示例2: processAssert

 /**
  * Assert that requested quantity is not available error message is displayed after adding products to cart by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         $currentMessage = $checkoutCart->getAdvancedCheckoutCart()->getFailedItemErrorMessage($product);
         \PHPUnit_Framework_Assert::assertContains(self::ERROR_QUANTITY_MESSAGE, $currentMessage);
         \PHPUnit_Framework_Assert::assertContains(sprintf(self::LEFT_IN_STOCK_ERROR_MESSAGE, $product->getStockData()['qty']), $currentMessage);
     }
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:15,代码来源:AssertQtyIsNotEnoughFailMessage.php

示例3: processAssert

 /**
  * Assert that product has tier price message appears after adding products by sku to shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         $messages = $checkoutCart->getAdvancedCheckoutCart()->getTierPriceMessages($product);
         $tierPrices = $product->getTierPrice();
         \PHPUnit_Framework_Assert::assertTrue(count($messages) === count($tierPrices), 'Wrong qty messages is displayed.');
         foreach ($tierPrices as $key => $tierPrice) {
             $price = (bool) strpos($messages[$key], (string) $tierPrice['price']);
             $priceQty = (bool) strpos($messages[$key], (string) $tierPrice['price_qty']);
             $savePercent = (bool) strpos($messages[$key], $this->getSavePercent($product->getPrice(), $tierPrice));
             \PHPUnit_Framework_Assert::assertTrue($price and $priceQty and $savePercent, 'Wrong tier price message is displayed.');
         }
     }
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:21,代码来源:AssertProductTierPriceMessage.php

示例4: processAssert

 /**
  * Assert that requested qty does not meet the increments error message is displayed after adding products by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         \PHPUnit_Framework_Assert::assertEquals(sprintf(self::QTY_INCREMENTS_ERROR_MESSAGE, $product->getStockData()['qty_increments']), $checkoutCart->getAdvancedCheckoutCart()->getFailedItemErrorMessage($product));
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertQtyIncrementsFailMessage.php

示例5: processAssert

 /**
  * Assert that sku not found error message is displayed after adding products to shopping cart by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         \PHPUnit_Framework_Assert::assertEquals(self::ERROR_MESSAGE, $checkoutCart->getAdvancedCheckoutCart()->getFailedItemErrorMessage($product));
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertSkuNotFoundFailMessage.php

示例6: processAssert

 /**
  * Assert that specify products options link is displayed after adding products to cart by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         \PHPUnit_Framework_Assert::assertTrue($checkoutCart->getAdvancedCheckoutCart()->specifyProductOptionsLinkIsVisible($product), "Specify the product's options link is not visible.");
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertSpecifyProductOptionsLink.php

示例7: processAssert

 /**
  * Assert that notice is present that product with enabled MAP.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         \PHPUnit_Framework_Assert::assertTrue($checkoutCart->getAdvancedCheckoutCart()->isMsrpNoticeDisplayed($product), 'Notice that product with enabled MAP is absent.');
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertMsrpNotice.php

示例8: processAssert

 /**
  * Assert that out of stock error message is displayed after adding out of stock products to cart by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         \PHPUnit_Framework_Assert::assertContains(self::ERROR_MESSAGE, $checkoutCart->getAdvancedCheckoutCart()->getFailedItemErrorMessage($product), 'Wrong error message is displayed.');
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertProductIsOutOfStockFailMessage.php


注:本文中的mage\checkout\test\page\CheckoutCart::getAdvancedCheckoutCart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。