Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
_shoppingStep_1.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 echo CHtml::beginForm(); ?>
14 
15 <table width="100%" cellspacing="0" cellpadding="0" class="items">
16  <colgroup>
17  <col width="10%">
18  <col width="65%">
19  <col width="10%">
20  <col width="10%">
21  <col width="5%">
22  </colgroup>
23  <tr>
24  <th class="item_quantity"><?php echo Item::model()->getAttributeLabel('quantity'); ?></th>
25  <th class="item_title"><?php echo Item::model()->getAttributeLabel('title'); ?></th>
26  <th class="item_price"><?php echo Item::model()->getAttributeLabel('price'); ?></th>
27  <th class="item_sum"><?php echo ShoppingcartModule::t('Total'); ?></th>
28  <th></th>
29  </tr>
30  <?php
31  $sum = 0;
32  foreach($this->items as $i=>$item):
33  $sum += $item->price * $item->quantity;
34  ?>
35  <tr>
36  <td class="item_quantity">
37  <?php
38  echo CHtml::activeTextField($item,"[{$i}]quantity",array('class'=>'quantity positiveNumbersOnly', 'maxlength'=>3));
39  ?>
40  </td>
41  <td class="item_title">
42 
43  <?php
44  if($this->link_items_to_page){
45 
46  echo CHtml::link($item->title,
47  ($item->item_referrer)?$item->item_referrer: $item->referrer,
48  array('class'=>'metanavlink all-items-link'));
49 
50  }else{
51  echo $item->title;
52  }
53 
54  ?>
55  </td>
56  <td class="item_price"><?php echo ($item->price != 0)?Item::addCurrency($item->price):ShoppingcartModule::t('free'); ?></td>
57  <td class="item_sum"><?php echo ($item->price != 0)?Item::addCurrency(($item->price * $item->quantity)):ShoppingcartModule::t('free'); ?></td>
58  <td class="item_del"><div class="cross">
59  <?php
60  echo CHtml::Link('X', Yii::app()->createUrl('shoppingcart/item/remove',array('id'=>$item->id)),array('class'=>'metanavlink'));
61  ?>
62  </div></td>
63  </tr>
64  <?php endforeach; ?>
65  <tfoot>
66  <td colspan="3" class="total_title"><?php echo ShoppingcartModule::t('Total'); ?></td>
67  <td class="item_sum"><?php echo Item::addCurrency($sum); ?></td>
68  <td></td>
69  </tfoot>
70 </table>
71 
72 <input type="hidden" name="step" value="<?php echo $this->step ?>">
73 
74 <div class="row controls">
75  <?php echo CHtml::submitButton(ShoppingcartModule::t('Next')); ?>
76 </div>
77 
78 <?php echo CHtml::endForm(); ?>