Pinterest Rich Pins

  • Posts: 49
  • Thank you received: 1
9 years 9 months ago #206365

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.27
-- Browser(s) name and version -- : Firefox 36.0.4
-- Error-message(debug-mod must be tuned on) -- : N/A

Hi,

This isn't necessarily a problem. I do have a questions though. Pinterest recently unveiled Rich Pins. Rich Pins allow users to "pin" products from a website and get real-time pricing, availabilty, etc. It requires the use of OG tags or meta tags on the individual product page.

Here is the meta tags example:

<meta property="og:title" content="Name of your product" />
<meta property="og:type" content="product" />
<meta property="og:price:amount" content="1.00" />
<meta property="og:price:currency" content="USD" />

The only way I can even think to add something like this to individual products is in the description. However, Hikashop/Joomla strips the tags out upon saving. Even when using Sourcerer to insert the code.

Any ideas on how/where to accomplish this?

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

  • Posts: 49
  • Thank you received: 1
9 years 9 months ago #206370

Please disregard the above question. I've found a solution. ITPMeta Extension for Joomla:

extensions.joomla.org/extension/itpmeta

Just install the package, then enable the plugin. Once inside the component, make sure to update the library for it. Seems like this will work!

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

  • Posts: 83671
  • Thank you received: 13545
  • MODERATOR
9 years 9 months ago #206368

Hi,

These tags are meta tags, and thus need to be added in the header of the page, not in the middle of it.
The title and type tags (and others like the URL, the image, etc) are actually already added to the header of the product pages by the HikaShop social networks plugin if you have the Facebook like button activated as Facebook require them for their like button.
So you would just have to add the amount and currency tags and it should work.
The best would be to modify the file plugins/system/hikashopsocial/hikashopsocial.php and add the extra meta tags to the ones already added by the plugin.

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

  • Posts: 31
  • Thank you received: 2
8 years 11 months ago #239087

What did you put for "content" in the price field to get it to pull global content from hikashop?

Last edit: 8 years 11 months ago by drfenning.

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

  • Posts: 83671
  • Thank you received: 13545
  • MODERATOR
8 years 11 months ago #239102

Hi,

The price is not loaded in the social plugin. So you would first need to call the getPrices function of the class.currency of HikaShop on $element and then you could get the price from

$element->prices[0]->price_value

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

  • Posts: 31
  • Thank you received: 2
8 years 11 months ago #239311

thanks, but this is greek to me. :S

is this within hikashop code or in the ITP meta "content" field?

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

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

Hi,

This is within HikaShop code, more precisely in the "hikashopsocial" plugin.
It require PHP knowledges.

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

  • Posts: 24
  • Thank you received: 0
7 years 9 months ago #273282

Hi there, I know this is an old post, but relevant still... I followed the instructions in

/plugins/system/hikashopsocial/hikashopsocial.php

and added the new lines

if(isset($types[ (int)$plugin->params['fb_type']]))
    			$this->meta['property="og:type"']='<meta property="og:price:amount" content="$element->prices[0]->price_value" /> ';
if(isset($types[ (int)$plugin->params['fb_type']]))
    			$this->meta['property="og:type"']='<meta property="og:price:currency" content="USD" /> ';
But for some reason still is not acknowledging the information for Pinterest Rich Pins... thoughts?

Last edit: 7 years 9 months ago by nicolas.

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

  • Posts: 83671
  • Thank you received: 13545
  • MODERATOR
7 years 9 months ago #273302

Hi,

If you've added your code in the same function where you have the others $this->meta meta data variables that are set, note that they will only be added if you have the facebook button display enabled in the settings of the plugin.
Would that be the reason ?
Also, the lines

if(isset($types[ (int)$plugin->params['fb_type']]))
means that your meta data will only be added if you've selected a type in the type setting of the plugin. So please check on that or remove these "if"

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

Time to create page: 0.096 seconds
Powered by Kunena Forum