예제 #1
0
<?php

$cartScenario = Shipping::getSelectedCartScenarioFromSessionOrShoppingCart();
// The calling code has the option of providing a differently configured
// _promocodeinput. Here is a sensible default.
if (isset($partialPromoCodeInput) === false) {
    $partialPromoCodeInput = $this->renderPartial('ext.wscartmodal.views._promocodeinput', array('modelId' => 'Checkout', 'updateCartTotals' => true, 'reloadPageOnSuccess' => false), true);
}
?>

<div class="summary">
	<?php 
if (Yii::app()->user->hasFlash('taxModeChange')) {
    ?>
		<div class="pricechange">
			<?php 
    echo Yii::app()->user->getFlash('taxModeChange');
    ?>
		</div>
	<?php 
}
?>
	<h2><?php 
echo Yii::t('checkout', "Order Summary");
?>
</h2>
	<table>
		<tbody>
		<tr>
			<th><?php 
echo Yii::t('checkout', "Subtotal");
예제 #2
0
 /**
  * Ajax receiver function to remove the promocode on the modals and new
  * checkout page.
  */
 public function actionRemovePromoCodeModal()
 {
     Yii::app()->shoppingcart->removePromoCode();
     // The option is provided to update the cart scenarios stored in the
     // session. This is a performance optimization that allows the
     // front-end to request updated cart totals separately using the
     // shipping estimator.
     if (Yii::app()->getRequest()->getPost('updateCartTotals') === 'true') {
         Shipping::updateCartScenariosInSession();
     }
     // If the cart scenarios are updated, we can return a version of
     // the shoppingcart with the newly updated totals.
     $formattedShoppingCart = static::formatCartScenarioWithCartItems(Shipping::getSelectedCartScenarioFromSessionOrShoppingCart());
     $this->renderJSON(array('removeResult' => array('action' => 'success'), 'shoppingCart' => $formattedShoppingCart));
 }