Microdata error on product module

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
9 years 4 months ago #239270

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Crome

In case i have ralated product (content module) in product layout, Google microdata for price give me error.

If there is no related products, all is ok. I think that itemprop price should not be in module on product detail layout.

Attachments:
The following user(s) said Thank You: vanway

Please Log in or Create an account to join the conversation.

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #239276

Hi,

Thank you for your feedback.
Change the line:

echo '<span class="'.implode(' ',$classes).'" itemprop="price" content="'. $price->price_value_with_tax .'">';
to:
$attributes = '';
			if(!empty($this->element->product_id)){
				$round = $this->currencyHelper->getRounding($price->price_currency_id, true);
				$attributes = ' itemprop="price" content="'. $this->currencyHelper->round($price->price_value_with_tax, $round) .'"';
			}
			echo '<span class="'.implode(' ',$classes).'"'.$attributes.'>';
in the file "listing_price" of the view "product" via the menu Display>Views and that will fix the problem.

The following user(s) said Thank You: vanway

Please Log in or Create an account to join the conversation.

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
9 years 4 months ago #239323

Problem solved. Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.039 seconds
Powered by Kunena Forum