Hi Xavier,
I finally made it work
I'll explain more details just for reference of other people on the forum.
1. Like Xavier said you have to use the correct view. I thought the code should be added in the "product / show_default" view but i was totally wrong. Modify the code in the view you use.
2. This is the code to cut off "offers" microdata when the product has no price for "product / show_tabular" view, plus adding contact button for price request in that case:
<?php
if (!empty($this->element->prices)) {
?>
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<?php
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
</span>
<?php } else {
echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid) . '\';return false;');
} ?>
<br />
3. Unfortunately another problem occured. I had additional microdata attributes added in the end of the file, right after the
hikashop_product_bottom_part div (read the whole topic):
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part show_tabular">
.......
</div>
<div>
<span hidden itemprop="name"><?php echo $this->element->product_page_title; ?></span>
<span hidden itemprop="model"><?php echo $this->element->product_model; ?></span>
<span hidden itemprop="mpn"><?php echo $this->element->product_mpn; ?></span>
<span hidden itemprop="manufacturer"><?php echo $this->element->product_microdata_manufacturer; ?></span>
</div>
The problem is that when the product has no price the rest of the additional attributes are also gone. If I move the div with the additional microdata attributes anywhere after the first code, the one for cutting off the "offers"microdata, another problem arises. It would be either for the products with prices or for the products without prices. Or for both of them.
To fix that I had to move the additional microdata attributes div just before the code for cutting off the "offers"microdata:
<div>
<span hidden itemprop="name"><?php echo $this->element->product_page_title; ?></span>
<span hidden itemprop="model"><?php echo $this->element->product_model; ?></span>
<span hidden itemprop="mpn"><?php echo $this->element->product_mpn; ?></span>
<span hidden itemprop="manufacturer"><?php echo $this->element->product_microdata_manufacturer; ?></span>
</div>
<?php
if (!empty($this->element->prices)) {
?>
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<?php
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
</span>
<?php } else {
echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid) . '\';return false;');
} ?>
<br />
I don't know what was the problem. I didn't have time to spend on it and even if I had maybe I wouldn't find out.

Once again this code is for "product / show_tabular" view. Attached is my working file if someone want to dig into it.