Structured data for product pages

  • Posts: 265
  • Thank you received: 1
9 years 3 months ago #211548

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1

Hello,

My product pages aren't showing any structured data.

I have the following plugins enabled.

HikaShop Microdata on Product Page plugin
Hikashop product tag insertion plugin
HikaShop product tag translation plugin

It has worked in previous versions of hikashop and I've only just realised that theres a problem.

I followed the instructions here given by Xavier at the bottom of this post: www.hikashop.com/forum/product-category-...uct-page.html#198461

It made no difference. I do have local business data that's on all pages. I have removed this for purposes of testing, but it made no difference. Can you please help?

Thanks,
Hal

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 3 months ago #211566

Hi,

The modifications proposed by Xavier there are already included so they should not be necessary.

If you try with the default template of Joomla, do you get the microdata added ?
It could be an issue with a customization of the view done previously (or done by the template).
Did you restricted the HikaShop Microdata on Product Page plugin to only some access level, or have caching on your pages preventing you from seeing the tags after enabling the plugin ?

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

  • Posts: 265
  • Thank you received: 1
9 years 3 months ago #211587

Thank you for your reply.

I used a different template and the microdata was in fact added. How do I replicate this in my main template?

There were a couple of errors in the "Review" section of the testing:

"Author" - Missing and Required
The review has no reviewed item specified.

Many thanks,
Hal

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 3 months ago #211590

Hi,

Rename one by one the files of the folder templates/YOUR_TEMPLATE/html/com_hikashop/product/ via FTP in order to identify which one is creating the issue.
Keep it renamed to not have the issue or contact your template provider or the person who made the view override if you want to fix the override view file.

Regarding the issue with the Author missing, that's something Xavier fixed last month on our end and which will be in the next version of HikaShop. In the mean time, you can install this new version of the microdata plugin in order to add the patch for that issue:

File Attachment:

File Name: hikashoppr...ttag.zip
File Size:2 KB

Attachments:
Last edit: 9 years 3 months ago by nicolas.

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

  • Posts: 265
  • Thank you received: 1
9 years 3 months ago #211592

As an update, I have removed a customisation from product / show.php and that has resolved most of the issue.

These errors still remain however,

"Author" - Missing and Required
The review has no reviewed item specified.

Many thanks,
Hal

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

  • Posts: 265
  • Thank you received: 1
8 years 8 months ago #231658

Hello,

I've been checking my structured data and I'm getting an error "The property price is not recognised by Google for an object of type Product." Has something changed?

Please feel free to test any of my product page URL's here:

developers.google.com/structured-data/testing-tool/

Many thanks,
Hal

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

  • Posts: 13201
  • Thank you received: 2322
8 years 8 months ago #231683

Hi,

It seems that you have replace the line:

<span id="hikashop_product_price_main" class="hikashop_product_price_main">
By:
<div id="hikashop_product_price_main" class="hikashop_product_price_main">
So the code of the microdata plugin is no more handling it and so adding the "offer" property.

Please try with this version of the plugin:

File Attachment:

File Name: plg_system...3-01.zip
File Size:3 KB

Attachments:
Last edit: 8 years 8 months ago by Xavier.
The following user(s) said Thank You: Holmes-Pierce

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

  • Posts: 265
  • Thank you received: 1
8 years 8 months ago #231719

That has worked brilliantly, thanks.

Is it possible to include Brand and SKU as well?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 8 months ago #231732

Hi,

The best would be to add the following in the view "product / show_default" right after the product name div:

<span style="display: none;" itemprop="sku"><?php echo $this->element->product_code; ?></span>
<?php
if(!empty($this->element->product_manufacturer_id)){
	$categoryClass = hikashop_get('class.category');
	$manufacturer = $categoryClass->get($this->element->product_manufacturer_id);
	?><span style="display: none;" itemprop="brand"><?php echo $manufacturer->category_name; ?></span><?php
}
?>

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

  • Posts: 265
  • Thank you received: 1
8 years 8 months ago #231850

Thanks, that worked well!

There is a small issue though, it's using the SKU of the default variant. For me, that just means numbers added onto the end of the actual SKU i.e. _68. Would it be possible to use SKU of the main product?

Many thanks,
Hal

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

  • Posts: 13201
  • Thank you received: 2322
8 years 8 months ago #231869

Hi,

Yes, use this code instead:

<?php if(isset($this->element->main->product_code)){ ?>
<span style="display: none;" itemprop="sku"><?php echo $this->element->main->product_code; ?></span>
<?php }else{ ?>
<span style="display: none;" itemprop="sku"><?php echo $this->element->product_code; ?></span>
<?php } ?>

The following user(s) said Thank You: Holmes-Pierce

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

  • Posts: 265
  • Thank you received: 1
8 years 8 months ago #231953

Perfect,

Thanks for your great support!

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

  • Posts: 265
  • Thank you received: 1
8 years 8 months ago #232936

Hello,

Do you think it would be possible to only provide rating data on products that have been rated?

I have products that no one has provided a rating for yet. Using the structured data tool, these are seen as errors (see below). This has an adverse effect on display in google as it doesn't use any of the other data, such as price.

Field ratingValue may not be empty.
One of ratingCount or reviewCount must be provided.


I look forward to hearing from you.

Many thanks,
Hal

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 8 months ago #232977

Hi,

It would be complex with the current system. We're actually working on a new system to integrate the microdata directly in the views and with that it will be possible to do that.
In fact, we already have a working version of that for HikaShop 2.6.2.
However, if you have customized the product page layout, it will probably require moving the modifications on the new version of the views so that the microdata can be there.
Then, the plugin won't actually be necessary at lot to have the microdata.

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

  • Posts: 265
  • Thank you received: 1
8 years 7 months ago #235462

Hello,

Would it be possible to included the following data?

Condition: new

Many thanks,
Hal

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

  • Posts: 13201
  • Thank you received: 2322
8 years 7 months ago #235495

Hi,

Could you give us more details about this data, I don't found it on the schema.org website ?
schema.org/docs/search_results.html#q=Condition

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

  • Posts: 265
  • Thank you received: 1
8 years 7 months ago #235670

Hello Xavier,

It's an error that's coming up on my google merchant center feed. "Missing microdata for condition". There's more about it here:

support.google.com/merchants/answer/6183460?hl=en-GB

I think that it's this one:

schema.org/OfferItemCondition

Many thanks,
Hal

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

  • Posts: 13201
  • Thank you received: 2322
8 years 7 months ago #235709

Hi,

The best will be to add it in a product display view. You can add it that way:

<span itemprop="OfferItemCondition" style="display:none;">MyValue</span>

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

  • Posts: 265
  • Thank you received: 1
8 years 7 months ago #235987

Thanks Xavier,

Could you please confirm which view I would place this in?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 7 months ago #236124

Hi,

You can place this code in the "product / show_default" view directly.

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

Time to create page: 0.117 seconds
Powered by Kunena Forum