<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.3
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(!empty($this->row->prices) && !$this->params->get('catalogue')){
$url = '';
$ajax = 'return hikashopModifyQuantity(\''.$this->row->product_id.'\',field,1,0);';
if($this->row->product_sale_end && $this->row->product_sale_end<time()){
?>
<span class="hikashop_product_sale_end">
<?php echo JText::_('ITEM_NOT_SOLD_ANYMORE'); ?>
</span>
<?php
}elseif($this->row->product_sale_start && $this->row->product_sale_start>time()){
?>
<span class="hikashop_product_sale_start">
<?php
echo JText::sprintf('ITEM_SOLD_ON_DATE',hikashop::getDate($this->row->product_sale_start,$this->params->get('date_format','%d %B %Y')));
?>
</span>
<?php
}else{
if($this->row->product_quantity==-1){
?>
<span class="hikashop_product_stock">
<?php
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$ajax,'',$this->row->product_max_per_order);
}elseif($this->row->product_quantity>0){
?>
<span class="hikashop_product_stock">
<?php
echo JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity);
echo '<br/>';
$config =& hikashop::config();
if($config->get('button_style','normal')=='css'){
echo '<br />';
}
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$ajax,'',$this->row->product_max_per_order);
}else{
?>
<span class="hikashop_product_no_stock">
<?php
echo JText::_('NO_STOCK');
}?>
</span>
<?php
}
}
?>
<br/>