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


PHP Cart::getTotalCart方法代码示例

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


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

示例1: content_566852ec2a27e8_16495607

    function content_566852ec2a27e8_16495607($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_escape')) {
            include '/srv/www/helveti/helveti.cz/tools/smarty/plugins/modifier.escape.php';
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array('path', null, null);
        ob_start();
        echo smartyTranslate(array('s' => 'Bank-wire payment.', 'mod' => 'bankwire'), $_smarty_tpl);
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['tpl_dir']->value . "./breadcrumb.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>



<?php 
        $_smarty_tpl->tpl_vars['current_step'] = new Smarty_variable('payment', null, 0);
        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['tpl_dir']->value . "./order-steps.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>


<?php 
        if ($_smarty_tpl->tpl_vars['nbProducts']->value <= 0) {
            ?>
	<p class="warning"><?php 
            echo smartyTranslate(array('s' => 'Your shopping cart is empty.', 'mod' => 'bankwire'), $_smarty_tpl);
            ?>
</p>
<?php 
        } else {
            if ($_smarty_tpl->tpl_vars['cart']->value->id && Cart::getTotalCart($_smarty_tpl->tpl_vars['cart']->value->id)) {
                ?>
	<table id="cart_summary" class="std table-bordered">
		<tr>
			<th class="cart_product first_item">Produkt</th>
			<th class="cart_description item">Popis</th>
			<th class="cart_ref item">Dostupnost</th>
			<th class="cart_unit item">Cena za kus</th>
			<th class="cart_quantity item">Množství</th>
			<th class="cart_total item">Celkem</th>
		</tr>
	<?php 
                $_smarty_tpl->tpl_vars['cart_info'] = new Smarty_variable($_smarty_tpl->tpl_vars['cart']->value->getSummaryDetails(), null, 0);
                ?>
	<?php 
                $_smarty_tpl->tpl_vars['jeVN'] = new Smarty_variable(0, null, 0);
                ?>
		<tr></tr>
	<?php 
                $_smarty_tpl->tpl_vars['product_cart'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['product_cart']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['cart_info']->value['products'];
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['product_cart']->key => $_smarty_tpl->tpl_vars['product_cart']->value) {
                    $_smarty_tpl->tpl_vars['product_cart']->_loop = true;
                    ?>
		<tr>
			<td class="cart_product"><img src="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getImageLink($_smarty_tpl->tpl_vars['product_cart']->value['link_rewrite'], $_smarty_tpl->tpl_vars['product_cart']->value['id_image'], 'kosik_default'), ENT_QUOTES, 'UTF-8', true);
                    ?>
" alt="<?php 
                    echo smarty_modifier_escape($_smarty_tpl->tpl_vars['product_cart']->value['name'], 'htmlall', 'UTF-8');
                    ?>
"  /></td>
			<td class="cart_description"><p class="s_title_block"><?php 
                    echo $_smarty_tpl->tpl_vars['product_cart']->value['name'];
                    ?>
</p></td>
			<td class="cart_ref"><?php 
                    ob_start();
                    echo Product::skladovost($_smarty_tpl->tpl_vars['product_cart']->value['id_product'], "skladem");
                    $_tmp1 = ob_get_clean();
                    if ($_tmp1) {
                        ?>
Skladem<?php 
                    } else {
                        ?>
do 14 dní<?php 
                    }
                    ?>
</td>
			<td class="cart_unit">
				<span class="price"><?php 
                    if (isset($_smarty_tpl->tpl_vars['product_cart']->value['is_discounted']) && $_smarty_tpl->tpl_vars['product_cart']->value['is_discounted']) {
                        ?>
//.........这里部分代码省略.........
开发者ID:h0n24,项目名称:leodig,代码行数:101,代码来源:db4e837cc3d8a681b95da3828fbd42948ac144fe.file.payment_execution.tpl.php

示例2: getOrderTotalUsingTaxCalculationMethod

 public static function getOrderTotalUsingTaxCalculationMethod($id_cart)
 {
     return Cart::getTotalCart($id_cart, true);
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:4,代码来源:Cart.php

示例3: content_5669fd30b3cda5_34839293

    function content_5669fd30b3cda5_34839293($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_escape')) {
            include '/srv/www/helveti/helveti.cz/tools/smarty/plugins/modifier.escape.php';
        }
        ?>


<style>
.module-add_gopay_new-validation .celkem_kosik{
    float: right;
    width: 304px;
    text-align: center;
    color: #636363;
    font-size: 24px;
    font-weight: 400;
    margin-top: 25px;
}
.module-add_gopay_new-validation .celkem_kosik .cena_celkem {
    color: #e97b74;
    font-size: 26px;
    font-weight: 700;
}
</style>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array('path', null, null);
        ob_start();
        echo smartyTranslate(array('s' => 'Shipping', 'mod' => 'add_gopay_new'), $_smarty_tpl);
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['tpl_dir']->value . "./breadcrumb.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>



<?php 
        $_smarty_tpl->tpl_vars['current_step'] = new Smarty_variable('payment', null, 0);
        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['tpl_dir']->value . "./order-steps.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>


<?php 
        if ($_smarty_tpl->tpl_vars['nbProducts']->value <= 0) {
            ?>
	<p class="warning"><?php 
            echo smartyTranslate(array('s' => 'Your shopping cart is empty.', 'mod' => 'add_gopay_new'), $_smarty_tpl);
            ?>
</p>
<?php 
        } else {
            ?>
<form id="gopay-payment-button" action="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value->getModuleLink('add_gopay_new', 'validation', array(), true);
            ?>
" method="post">
<input type="hidden" name="confirm_gopay" value="1" />
<input type="hidden" name="inline" value="<?php 
            echo $_smarty_tpl->tpl_vars['INLINE_MODE']->value;
            ?>
">
<input type="hidden" name="fee" value="<?php 
            echo $_smarty_tpl->tpl_vars['fee']->value;
            ?>
" />
<input type="hidden" name="feeWithTax" value="<?php 
            echo $_smarty_tpl->tpl_vars['feeWithTax']->value;
            ?>
" />
<input type="hidden" name="paymentChannel" value="<?php 
            echo $_smarty_tpl->tpl_vars['paymentChannel']->value;
            ?>
" />
<input type="hidden" name="paymentSwift" value="<?php 
            echo $_smarty_tpl->tpl_vars['paymentSwift']->value;
            ?>
" />

<?php 
            if ($_smarty_tpl->tpl_vars['cart']->value->id && Cart::getTotalCart($_smarty_tpl->tpl_vars['cart']->value->id)) {
                ?>
	<table id="cart_summary" class="std table-bordered">
		<tr>
			<th class="cart_product first_item">Produkt</th>
			<th class="cart_description item">Popis</th>
			<th class="cart_ref item">Dostupnost</th>
			<th class="cart_unit item">Cena za kus</th>
//.........这里部分代码省略.........
开发者ID:h0n24,项目名称:leodig,代码行数:101,代码来源:7494e1a050c1b84d35ffdfb03bbcc05352084870.file.validation.tpl.php

示例4: getOrderTotalUsingTaxCalculationMethod

 public static function getOrderTotalUsingTaxCalculationMethod($id_cart)
 {
     $context = Context::getContext();
     $context->cart = new Cart($id_cart);
     $context->currency = new Currency((int) $context->cart->id_currency);
     $context->customer = new Customer((int) $context->cart->id_customer);
     return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING);
 }
开发者ID:zangles,项目名称:lennyba,代码行数:8,代码来源:AdminCartsController.php

示例5: content_546106947e9c75_38515798


//.........这里部分代码省略.........
            echo smartyTranslate(array('s' => 'Shrnutí'), $_smarty_tpl);
            ?>
</span></span><span class="step-po"></span>
	</li>
	
</ul>
<!-- /Steps -->
<?php 
        }
        if ($_smarty_tpl->tpl_vars['current_step']->value != 'summary' && $_smarty_tpl->tpl_vars['page_name']->value != 'module-bankwire-payment' && $_smarty_tpl->tpl_vars['page_name']->value != 'module-cashondelivery-validation' && $_smarty_tpl->tpl_vars['page_name']->value != 'order-confirmation') {
            ?>
<div class="infobox-kosik-container">
	<div id="info_box_kosik" class="box_kosik">
		<fieldset>
		<legend>Potřebujete poradit?</legend>
		<div id="kontaktni_boxik">
			<table>
				<tr>
					<td id="box_fotka"><img src="<?php 
            echo $_smarty_tpl->tpl_vars['img_dir']->value;
            ?>
/helveti/robert.jpg" alt="Fotografie Robert Pospíšil"></td>
					<td id="box_popis">
						<span id="box_jmeno">Robert Pospíšil</span><br/>
						<span id="box_email"><i class="fa fa-envelope"></i> <a href="mailto:info@helveti.cz"><span class="txt">info@helveti.cz</span></a></span><br/>
						<span id="box_tel"><i class="fa fa-phone"></i> <span class="txt">+420 774 744 763</span></span>
					</td>
				</tr>	
			</table>
		</div>
		</fieldset>
	</div>
	<?php 
            if ($_smarty_tpl->tpl_vars['cart']->value->id && Cart::getTotalCart($_smarty_tpl->tpl_vars['cart']->value->id)) {
                ?>
		<div id="rekapitulace_box_kosik" class="box_kosik">
			<fieldset>
			<legend>Rekapitulace objednávky</legend>
			<table class="rekapitulace_zbozi">
		<?php 
                $_smarty_tpl->tpl_vars['cart_info'] = new Smarty_variable($_smarty_tpl->tpl_vars['cart']->value->getSummaryDetails(), null, 0);
                ?>
		<?php 
                $_smarty_tpl->tpl_vars['product_cart'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['product_cart']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['cart_info']->value['products'];
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['product_cart']->key => $_smarty_tpl->tpl_vars['product_cart']->value) {
                    $_smarty_tpl->tpl_vars['product_cart']->_loop = true;
                    ?>
			<tr>
				<td class="rekapitulace_produkt">
					<span class="rekapitulace_nazev"><?php 
                    echo $_smarty_tpl->tpl_vars['product_cart']->value['name'];
                    ?>
</span>
				</td>
				<td class="rekapitulace_pocet">
					<?php 
                    echo $_smarty_tpl->tpl_vars['product_cart']->value['cart_quantity'];
                    ?>
 ks 
				</td>
				<td class="rekapitulace_cena">
开发者ID:h0n24,项目名称:leodig,代码行数:67,代码来源:a3ff76ed8800f461a11e8de95479f5262fd0af5c.file.order-steps.tpl.php


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