コード例 #1
0
ファイル: Checkout.php プロジェクト: uiDeveloper116/webstore
 /**
  * Redirect to the receipt page.
  * TODO: make work with legacy checkout
  *
  * @param Cart->linkid $strLink
  * @return void
  */
 protected static function redirectToReceipt($strLink)
 {
     if (Yii::app()->theme->advancedCheckout === true) {
         $route = 'checkout/thankyou';
     } else {
         $route = 'cart/receipt';
     }
     if (Yii::app()->user->getState('sharedssl') && Yii::app()->isCommonSSL) {
         Yii::app()->user->setState('cartid', null);
         //If we have created a login on checkout that should survive, route through login first
         //on original URL. Otherwise, we can just to straight to the receipt
         if (Yii::app()->user->getState('createdoncheckout') == 1) {
             Yii::app()->user->setState('createdoncheckout', 0);
             //In case we submit on the same login later
             $strIdentity = Yii::app()->user->id . ",0,cart,receipt," . $strLink;
             Yii::log('Routing to receipt via common login: '******'info', 'application.' . __CLASS__ . "." . __FUNCTION__);
             $redirString = _xls_encrypt($strIdentity);
             $url = Yii::app()->controller->createAbsoluteUrl('commonssl/sharedsslreceive', array('link' => $redirString));
         } else {
             $url = Yii::app()->controller->createAbsoluteUrl($route, array('getuid' => $strLink));
         }
         $url = _xls_url_common_to_custom($url);
         Yii::app()->controller->redirect($url);
         return;
     }
     if (isset($_POST['noredirect'])) {
         return;
     }
     Yii::app()->controller->redirect(Yii::app()->controller->createAbsoluteUrl($route, array('getuid' => $strLink)));
 }
コード例 #2
0
								<b><?php 
echo Yii::t('email', 'Total');
?>
</b>
							</td>
							<td align="right" style="color:#111111;font-family:'Lucida Grande','Lucida Sans', Verdana, sans-serif;font-size: 13px;line-height:30px;">
								<b><?php 
echo _xls_currency($cart->total);
?>
</b>
							</td>
						</tr>
						</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<td bgcolor="#f8f8f8" style="padding:15px 15px 15px 15px;color:#111111;font-family:'Lucida Grande',
													 'Lucida Sans', Verdana, sans-serif;font-size: 12px;line-height:1.5em; border: 1px solid #dddddd;">
					<?php 
echo Yii::t('email', 'This email is a confirmation for the order. To view details or track your order, click on the visit link:');
?>
<br/>
					<?php 
echo CHtml::link(_xls_url_common_to_custom(Yii::app()->controller->createAbsoluteUrl('cart/receipt', ['getuid' => $cart->linkid])), _xls_url_common_to_custom(Yii::app()->controller->createAbsoluteUrl('cart/receipt', ['getuid' => $cart->linkid])), array('target' => '_blank', 'style' => 'color: #3287cc;text-decoration: none;'));
?>
				</td>
			</tr>

<?php 
$this->endContent();