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


PHP CheckoutCart::getTotalsBlock方法代码示例

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


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

示例1: getCartPrice

 /**
  * Get cart prices.
  *
  * @param CatalogProductSimple $product
  * @param array $actualPrices
  * @return array
  */
 protected function getCartPrice(CatalogProductSimple $product, array $actualPrices)
 {
     $actualPrices['cart_item_price_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getCartItemTypePrice('cart_item_price_incl_tax');
     $actualPrices['cart_item_subtotal_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getCartItemTypePrice('cart_item_subtotal_incl_tax');
     $actualPrices['grand_total'] = $this->checkoutCart->getTotalsBlock()->getData('grand_total_incl_tax');
     return $actualPrices;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:14,代码来源:AbstractAssertTaxWithCrossBorderApplying.php

示例2: processAssert

 /**
  * Assert that grand total is equal to expected.
  *
  * @param CheckoutCart $checkoutCart
  * @param Cart $cart
  * @param Customer|null $customer
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, Cart $cart, Customer $customer = null)
 {
     if ($customer !== null) {
         $this->login($customer);
     }
     $checkoutCart->open();
     \PHPUnit_Framework_Assert::assertEquals(number_format($cart->getGrandTotal(), 2), $checkoutCart->getTotalsBlock()->getData('grand_total'));
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:16,代码来源:AssertGrandTotalInShoppingCart.php

示例3: getTotalPrice

 /**
  * Get grand total.
  *
  * @return array
  */
 protected function getTotalPrice()
 {
     $prices = [];
     foreach ($this->expectedPrices['total'] as $key => $type) {
         $prices[$key] = $this->checkoutCart->getTotalsBlock()->getData($key);
     }
     return $prices;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:13,代码来源:AssertFptApplied.php

示例4: getTotals

 /**
  * Get totals from total block in shopping cart.
  *
  * @return array
  */
 protected function getTotals()
 {
     $totals = [];
     $totals['subtotal'] = $this->checkoutCart->getTotalsBlock()->getData('subtotal');
     $totals['grandTotal'] = $this->checkoutCart->getTotalsBlock()->getData('grand_total');
     if ($this->checkoutCart->getTotalsBlock()->isVisibleShippingPriceBlock()) {
         $shippingPrice = $this->checkoutCart->getTotalsBlock()->getData('shipping_price');
         $totals['grandTotal'] = number_format($totals['grandTotal'] - $shippingPrice, 2);
     }
     return $totals;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:16,代码来源:AbstractCartPriceRuleApplying.php

示例5: processAssert

 /**
  * Assert that grand total is equal to expected.
  *
  * @param CheckoutCart $checkoutCart
  * @param Cart $cart
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, Cart $cart)
 {
     $checkoutCart->open();
     \PHPUnit_Framework_Assert::assertEquals(number_format($cart->getGrandTotal(), 2), $checkoutCart->getTotalsBlock()->getData('grand_total'));
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:AssertGrandTotalInShoppingCart.php

示例6: getTotals

 /**
  * Get totals.
  *
  * @return array
  */
 protected function getTotals()
 {
     $totalsBlock = $this->checkoutCart->getTotalsBlock();
     return $this->getTypeBlockData($totalsBlock);
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:10,代码来源:AbstractAssertTaxRuleIsAppliedToAllPrices.php


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