136 lines
4.9 KiB
PHP
Executable file
136 lines
4.9 KiB
PHP
Executable file
<div class="products view">
|
|
<h2><?php __('Product');?></h2>
|
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Principle'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $html->link($product['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $product['Principle']['id'])); ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['title']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Description'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['description']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Part Number'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['part_number']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cost Price Each'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['cost_price_each']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Our Discount'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['our_discount']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Packing Each'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['packing_each']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shipping Weight Each'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['shipping_weight_each']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shipping Cost Each'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['shipping_cost_each']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Duty'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['duty']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Sellprice Each'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['sellprice_each']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Notes'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $product['Product']['notes']; ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('Edit Product', true), array('action'=>'edit', $product['Product']['id'])); ?> </li>
|
|
|
|
</ul>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php __('Product Options');?></h3>
|
|
<?php if (!empty($product['ProductOption'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Title'); ?></th>
|
|
<th><?php __('Description'); ?></th>
|
|
<th><?php __('Cost Price'); ?></th>
|
|
<th><?php __('Our Discount'); ?></th>
|
|
<th><?php __('Packing Each'); ?></th>
|
|
<th><?php __('Shipping Weight Each'); ?></th>
|
|
<th><?php __('Shipping Cost Each'); ?></th>
|
|
<th><?php __('Duty'); ?></th>
|
|
<th><?php __('Sell Price'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($product['ProductOption'] as $productOption):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $productOption['title'];?></td>
|
|
<td><?php echo $productOption['description'];?></td>
|
|
<td><?php echo $productOption['cost_price'];?></td>
|
|
<td><?php echo $productOption['our_discount'];?></td>
|
|
<td><?php echo $productOption['packing_each'];?></td>
|
|
<td><?php echo $productOption['shipping_weight_each'];?></td>
|
|
<td><?php echo $productOption['shipping_cost_each'];?></td>
|
|
<td><?php echo $productOption['duty'];?></td>
|
|
<td><?php echo $productOption['sell_price'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'product_options', 'action'=>'view', $productOption['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'product_options', 'action'=>'edit', $productOption['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('controller'=> 'product_options', 'action'=>'delete', $productOption['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $productOption['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Product Option', true), array('controller'=> 'product_options', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php if($number_of_files == 1) {
|
|
__($number_of_files.' Attachment in this Product');
|
|
}
|
|
else {
|
|
__($number_of_files.' Attachments in this Product');
|
|
}
|
|
?>
|
|
<?php echo $html->image('document.png'); ?></h3>
|
|
<?php echo $this->element('product_attachment_table', $files); ?>
|
|
</div>
|
|
|