<?php/** * The view file of product module of chanzhiEPS. * * @copyright Copyright 2013-2013 青岛息壤网络信息有限公司 (QingDao XiRang Network Infomation Co,LTD www.xirangit.com) * @license http://api.chanzhi.org/goto.php?item=license * @author Tingting Dai * @package product * @version $Id$ * @link http://www.chanzhi.org */?><?php include TPL_ROOT . 'common/header.html.php'; include TPL_ROOT . 'common/treeview.html.php'; /* set categoryPath for topNav highlight. */js::set('path', $product->path);js::set('productID', $product->id);js::set('categoryID', $category->id);js::set('categoryPath', explode(',', trim($category->path, ',')));css::internal($product->css);js::execute($product->js);?><?php $common->printPositionBar($category, $product);?>
<?php if(!empty($product->image->list)):?>
<?php $title = $product->image->primary->title ? $product->image->primary->title : $product->name;?> <?php echo html::image($product->image->primary->middleURL, "title='Dark Blue Theme - Senior Phone' alt='Dark Blue Theme'");?>
<?php if(count($product->image->list) > 1):?>
<?php foreach($product->image->list as $image):?> <?php $title = $image->title ? $image->title : $product->name;?>
<?php echo html::image($image->smallURL, "title='Dark Blue Theme - Senior Phone' alt='Dark Blue Theme'");?>
<?php endforeach;?>
<?php endif;?>
<?php else:?>
<?php endif;?>

<?php echo $product->name;?>

    <?php $attributeHtml = ''; if($product->promotion != 0) { if($product->price != 0) { $attributeHtml .= "
  • " . $lang->product->price . ""; $attributeHtml .= " " . $lang->product->currencySymbols[$this->config->product->currency] . " " . $product->price . "
  • "; } $attributeHtml .= "
  • " . $lang->product->promotion . ""; $attributeHtml .= " " . $lang->product->currencySymbols[$this->config->product->currency] . " " . $product->promotion . "
  • "; } else if($product->price != 0) { $attributeHtml .= "
  • " . $lang->product->price . ""; $attributeHtml .= " " . $lang->product->currencySymbols[$this->config->product->currency] . " " . $product->price . "
  • "; } if($product->amount) { $attributeHtml .= "
  • " . $lang->product->amount . ""; $attributeHtml .= " " . $product->amount . " " . $product->unit . "
  • "; } if($product->brand) { $attributeHtml .= "
  • " . $lang->product->brand . ""; $attributeHtml .= " " . $product->brand . " " . $product->model . "
  • "; } if($product->color) { $attributeHtml .= "
  • " . $lang->product->color . ""; $attributeHtml .= " " . $product->color . "
  • "; } if($product->origin) { $attributeHtml .= "
  • " . $lang->product->origin . ""; $attributeHtml .= " " . $product->origin . "
  • "; } foreach($product->attributes as $attribute) { if(empty($attribute->label) and empty($attribute->value)) continue; $attributeHtml .= "
  • " . $attribute->label . ""; $attributeHtml .= " " . $attribute->value . "
  • "; } if(empty($attributeHtml)) echo '

    ' . $product->desc . '

    '; echo $attributeHtml; ?>
<?php if($product->mall):?>
<?php echo html::a($product->mall, $lang->product->buyNow, "class='btn btn-lg btn-primary' target='_blank'");?>
<?php elseif($plan->planID):?>
<?php echo html::a(helper::createLink('payment', 'createCreditCard', "productID=33"),$lang->product->buyNow, "class='btn btn-lg btn-primary'");?>
<?php endif;?>
<?php echo $lang->product->content;?>
<?php echo $product->content;?>
<?php $this->loadModel('file')->printFiles($product->files);?>
<?php echo html::a('', '', "name='comment'");?>
<?php $this->block->printRegion($layouts, 'product_view', 'side');?>
<?php include TPL_ROOT . 'common/footer.html.php'; ?>