本文整理匯總了PHP中ShoppingCart::total方法的典型用法代碼示例。如果您正苦於以下問題:PHP ShoppingCart::total方法的具體用法?PHP ShoppingCart::total怎麽用?PHP ShoppingCart::total使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShoppingCart
的用法示例。
在下文中一共展示了ShoppingCart::total方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testComputesReducedVatForTheRightCountry
public function testComputesReducedVatForTheRightCountry()
{
$shoppingCart = new ShoppingCart(new Austria());
$article = new Article(new ArticleName('Test'), new ArticleDescription(''), new Euro(1000), new ArticleTypeReduced());
$shoppingCart->add($article);
$shoppingCart->add($article);
$this->assertEquals(new Money(2200, new Currency('EUR')), $shoppingCart->total());
}
示例2: TOTAL
<img class="cerrar" src="assets/images/cerrar.png" alt="">
</p>
</a>
</td>
<?php
if ($i == 0) {
?>
<!--COLUMNA TOTAL (no se repite rowspan = cantidad de items) -->
<td class="total col-Total" rowspan="<?php
$carrito->cantidad();
?>
">
<div class="block-num">
<p class="num "><?php
$carrito->total();
?>
</p>
</div>
</td>
<!--END / COLUMNA TOTAL -->
<?php
$i++;
}
?>
</tr>
<!--end / item-->
<?php
}
?>