Hello Nicolas,
Thanks for the code, but I have tried several times, however it does not work..below you will sere where I have inserted the 2nd piece of code you provided, but the "My Button" still does not display:
<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.4
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3
www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(!$this->params->get('catalogue')){
if(!empty($this->row->has_options)){
echo $this->cart->displayButton(JText::_('CHOOSE_OPTIONS'),'choose_options',$this->params,hikashop::completeLink('product&task=show&product_id='.$this->row->product_id.$this->itemid),'window.location = \''.hikashop::completeLink('product&task=show&product_id='.$this->row->product_id.$this->itemid).'\';return false;','');
}elseif($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices)){
$url = '';
if(empty($this->ajax)){
$this->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,$this->ajax,'',$this->row->product_max_per_order);
}elseif($this->row->product_quantity>0){
?>
<?php
echo $this->cart->displayButton(JText::_('MY_BUTTON'),'my_button',$this->params,$link,'window.location = \''.$link.'\';return false;',''); ?>
<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,$this->ajax,'',$this->row->product_max_per_order);
}else{
?>
<span class="hikashop_product_no_stock">
<?php
echo JText::_('NO_STOCK');
}?>
</span>
<?php
}
}
}
?>
<br/>