No microdata visible in HTML code

  • Posts: 41
  • Thank you received: 1
9 years 1 month ago #195118

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox 35.0.1
-- Error-message(debug-mod must be tuned on) -- : no errors

I have build my Hikashop webshop and changed some php-files (product/show_default.php). I thought microdata / Rich Snippets is standard installed in Hikashop. But it was not.
Now I installed the HikaShop Microdata on Product Page plugin and enabled it.
But microdata for product picture and prices are not vissible.

I thought this is because I changed product/show_default.php so this file automaticcaly is an override.
I checked the components/com_hikashop/views/product/tmpl/show_default.php with the override file, but can not see any changes. It looks like both files are the same.

What to do to get microdata on product page?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #195153

Hi,

Please try with that version of the plugin:

File Attachment:

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

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

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

  • Posts: 41
  • Thank you received: 1
9 years 1 month ago #195192

Thanks Xavier, this plugin works.
But... there are some errors: price is not a valid specification for the itemprop="price"
I think you only may use the value and not the whole description: Prijs (incl. BTW): € 16,50 (Prijs (excl. BTW): € 13,64

I will send a PM with link of a test product.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #195203

Hi,

To have a simple price and not the full price information, you can potentially edit the view "product / listing_price " and add a div with a specific class, like:

<div class="hikashop_product_simple_price"></div>
And put the simplified value in it, then edit the plugin and replace:
				$pattern='/class="hikashop_product_price_main"(.*)class="hikashop_product_price hikashop_product_price_0/msU';
				$replacement='class="hikashop_product_price_main" $1 itemprop="price" class="hikashop_product_price hikashop_product_price_0';
				$product_page = preg_replace($pattern,$replacement,$product_page,1);

By:
				$pattern='/class="hikashop_product_simple_price"(.*)/msU';
				$replacement='class="hikashop_product_simple_price" itemprop="price"';
				$product_page = preg_replace($pattern,$replacement,$product_page,1);

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #195354

I have the same problem: no microdata. I have installed the new plugin and now microdata are shown but 'add to cart' button and 'product quantity' fields disappear from product page.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 1 month ago #195359

Hello,
Did you use the plugin version that Xavier gave on that thread with the modification of his last message ?
Do you have the last Hikashop version ?

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #195525

Hello, I used the given plugin with last hikashop essential 2.4.0 without plugin modification.
After a day of hikashop customization I try to re-enable this plugin and now the problem is solved...

Thanks

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

  • Posts: 41
  • Thank you received: 1
9 years 1 month ago #195910

First the plugin 'Hikashop Product Tag' was working OK and the 'Add to cart' button was visible. But after a while I also did not see an 'Add to cart' button. I have searched my php-files, maybe I have changed a bit to much :blush: But this was not the cause.
Today I also disabled the plugin. Result: 'Add to cart' button is visible.
When I enable the plugin and clear the servers cache, the 'Add to cart' button disappear.

So this plugin is not a solution. (and I lost 1,5 hour searching and testing... :S )

I am using Hikashop 2.4.0 and have changed product / listing_price.php but not the changes in this thread.

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

  • Posts: 81675
  • Thank you received: 13095
  • MODERATOR
9 years 1 month ago #195922

Hi,

We found the issue and patched HikaShop. Download again the latest version install package via the menu My account>My subscriptions on our website and install it on yours via the Joomla installer and it will add the patch and it will work fine again.

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

  • Posts: 41
  • Thank you received: 1
8 years 11 months ago #202187

Ok, I have microdata in the website, but Google webmaster tools give many errors:
- Product - price : is missing and is required (260 errors)
- Review - author: is missing and is required (1307 errors)
- Review: There's not been reviewed for the review item specified

Where can I find the Hikashop Product Tag plugin. It is not in the folder plugins (I could not find it)

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

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

Hi,

Please try to use the latest version of our product tag plugin here:

File Attachment:

File Name: plg_system...5-19.zip
File Size:4 KB

Attachments:
Last edit: 8 years 11 months ago by Xavier.

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

  • Posts: 41
  • Thank you received: 1
8 years 11 months ago #202292

Thanks Xavier, I have installed the new plugin.
But still have many errors in GWT.
If I look at the HTML code of a product in Hikashop, I see this:

<div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers">
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<meta content="EUR" itemprop="priceCurrency">
<span class="hikashop_product_price_full">
<span class="hikashop_product_price hikashop_product_price_0" itemprop="price">
Prijs (incl. BTW): € 65,00
<br>
Prijs (excl. BTW): € 53,72
<br>
</span>
</span>
<span class="hikashop_product_price_per_unit"></span>
</span>
<br>
<br>
</div>

A friend of my also installed the new plugin and he gets good microdata in his HTML.

Note: I have changed product listing_price.php and other views

What to do to get good microdata?

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

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

Hi,

If you have changed the view "product / listing_price" that can potentially be the reason of that issue.

Please try to backup this view, and delete it in order to use the default one.
If it is working fine, so it come from your changes, as you can see in the plugin we are using "regex" based on the classes of the elements, so please keep these classes when editing the view :)

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

  • Posts: 41
  • Thank you received: 1
8 years 11 months ago #202405

Hello Xavier,
I have deleted the product / listing_price.php in the override HTL dir and then I got the proper microdata. After that I have looked for the diferences in my version of listing_price.php and the original. But can not find the solution.
Because I am not a PHP-programmer, this is to difficult for me.
Is there a possibility to do the changes by Hikashop-crew if I tell you what I want?

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

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

Hi,

In the view product / listing_price you just have to check that there is a span/div present with the class "hikashop_product_price_main" and inside this span/div another one with the classes "hikashop_product_price hikashop_product_price_0". If you have that, the micro data will work correctly.

This don't require PHP skills, only HTML ones :)

If you are still in trouble, you can send us a backend access via our contact form with the link to that topic in your message.

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

Time to create page: 0.108 seconds
Powered by Kunena Forum