Hello,
Thanks for you return, we can add a correction for Google Micro Data !
It seems that Google modify Micro Data standards.
I will explain you how to correct this by modifying 4 Views.
First, go to your override views (in Main HikaShop Configuration, on Display dropdown select Views)
Look for your product view :
- show_default.php
- show_reversed.php
- show_tabular.php
- quantity.php
In product/show_default around line 70, in product/show_reversed around line 37 and in product/show_tabular around line 100 you have this :
...
//LAYOUT listing_price
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
//Currency code for Micro Data/request SQL :
$CurrId = hikashop_getCurrency();
$null = null;
$currency = $this->currencyHelper->getCurrencies($CurrId, $null);
$CurrCode = $currency[$CurrId]->currency_code;
...
Add between "
//LAYOUT listing_price" part and "
//Currency code for Micro Data/request SQL :" part this :
...
$availabilty = ($this->row->product_quantity > 0) ? 'In stock' : 'Out of stock';
echo'<span style="display:none;" itemprop="availability" content=' . $availabilty . '>' . $availabilty . '</span>';
...
To have this :
...
//LAYOUT listing_price
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
$availabilty = ($this->row->product_quantity > 0) ? 'In stock' : 'Out of stock';
echo'<span style="display:none;" itemprop="availability" content=' . $availabilty . '>' . $availabilty . '</span>';
//Currency code for Micro Data/request SQL :
$CurrId = hikashop_getCurrency();
$null = null;
$currency = $this->currencyHelper->getCurrencies($CurrId, $null);
$CurrCode = $currency[$CurrId]->currency_code;
...
And in
product/quantity, delete these lines :
around line
145 :
echo '<span style="display:none;" itemprop="availability" itemscope itemtype="
schema.org/InStock
">Out of stock</span>';
To see this :
...
?>
<div class="hikashop_product_no_stock">
<?php
echo JText::_('NO_STOCK').'<br/>';
$waitlist = $this->config->get('product_waitlist', 0);
if(hikashop_level(1) && ($waitlist == 2 || ($waitlist == 1 && (!empty($this->row->main->product_waitlist) || !empty($this->row->product_waitlist))))) {
?>
...
And around line
112 :
replace these lines :
...
echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>'
. '<span style="display:none;" itemprop="availability" itemscope itemtype="http://schema.org/InStock">in stock</span>';
...
for this :
...
echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>';
...
To have this :
...
<div class="hikashop_product_stock">
<?php
if($this->row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK')
$text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity);
else
$text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity);
echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>';
if($this->config->get('button_style', 'normal') == 'css')
echo '<br />';
...
Note : that we include this correction for futur HikaShop release.
Hope that will solve your issue.
Regards