Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
_shoppingStep_4.php
1 <?php
2 /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  *
10  */
11 ?>
12 
13 <?php
14 
15 $form = $this->beginWidget('CActiveForm',
16  array('id'=>'order-finish-form',
17  'enableAjaxValidation'=>true,
18  )
19  );
20 ?>
21 <div class="row">
22 
23 <table width="100%" cellspacing="0" cellpadding="0" class="items">
24  <colgroup>
25  <col width="10%">
26  <col width="65%">
27  <col width="10%">
28  <col width="10%">
29  </colgroup>
30  <tr>
31  <th class="item_quantity"> <?php echo Item::model()->getAttributeLabel('quantity'); ?></th>
32  <th class="item_title"> <?php echo Item::model()->getAttributeLabel('title'); ?></th>
33  <th class="item_price"> <?php echo Item::model()->getAttributeLabel('price'); ?></th>
34  <th class="item_sum"> <?php echo ShoppingcartModule::t('Total'); ?></th>
35  </tr>
36  <?php
37  $sum = 0;
38  foreach($this->items as $i=>$item):
39  $sum += $item->price * $item->quantity;
40  ?>
41  <tr>
42  <td class="item_quantity"><?php echo $item->quantity ?></td>
43  <td class="item_title">
44  <a <?php if($this->link_items_to_page){echo "href='".$item->referrer."'";} ?>>
45  <?php echo $item->title; ?>
46  </a>
47  </td>
48  <td class="item_price"><?php echo ($item->price != 0)?Item::addCurrency($item->price):ShoppingcartModule::t('free'); ?></td>
49  <td class="item_sum"><?php echo ($item->price != 0)?Item::addCurrency(($item->price * $item->quantity)):ShoppingcartModule::t('free'); ?></td>
50  </tr>
51  <?php endforeach; ?>
52  <tfoot>
53  <td colspan="3" class="total_title"><?php echo ShoppingcartModule::t('Total'); ?></td>
54  <td class="item_sum"><?php echo Item::addCurrency($sum + Yii::app()->getModule('shoppingcart')->shipping_costs); ?></td>
55  </tfoot>
56 </table>
57 
58 </div><!-- row - items table -->
59 
60 <div class="row block">
61  <label><?php echo $this->order->getAttributeLabel('shipping_info'); ?></label>
62  <div class="row">
63  <?php echo $this->shipping_info; ?>
64  </div>
65 </div>
66 
67 <div class="row block">
68  <label><?php echo $this->order->getAttributeLabel('payment_info'); ?></label>
69  <div class="row">
70  <?php echo $this->payment_info; ?>
71  </div>
72 </div>
73 
74 <?php if(Yii::app()->user->getState('step_2')==true): ?>
75 <div class="row block">
76 <label><?php echo ShoppingcartModule::t('User Info') ?></label>
77 <table class="user" width="500">
78  <colgroup>
79  <col width="50%"><col width="50%">
80  </colgroup>
81 <?php foreach($this->user->attributes as $fieldName => $field):
82  if(substr($fieldName,-2) == 'id' || empty($field)) continue; ?>
83  <tr>
84  <td class="label"><?php echo $this->user->getAttributeLabel($fieldName); ?></td>
85  <td class="value"><?php echo $field; ?></td>
86  </tr>
87 <?php endforeach; ?>
88 </table>
89 </div>
90 <?php endif; ?>
91 
92 <div class="row block captcha">
93  <?php
94  if (!(!CCaptcha::checkRequirements() || !Yii::app()->user->isGuest || !Yii::app()->getModule('shoppingcart')->captchaEnabled)):
95  $this->widget('CCaptcha',array('captchaAction' => '/shoppingcart/shoppingcart/captcha' , 'buttonLabel'=>ShoppingcartModule::t('Get a new code')));
96  echo $form->textField($this->order, 'verifyCode');
97  echo $form->error($this->order,'verifyCode');
98  else:
99  echo $form->hiddenField($this->order, 'verifyCode');
100  endif;
101  ?>
102 </div>
103 
104 <input type="hidden" name="step" value="<?php echo $this->step ?>">
105 
106 <div class="row controls">
107  <?php echo CHtml::submitButton(ShoppingcartModule::t('Finish')); ?>
108 </div>
109 
110 <?php $this->endWidget(); ?>
111