- Posts: 49
- Thank you received: 1
Pinterest Rich Pins
- ahacreative
-
Topic Author
- Offline
Less
More
11 years 4 months ago #206365
by ahacreative
Pinterest Rich Pins was created by ahacreative
-- 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?
-- 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.
- ahacreative
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 1
11 years 4 months ago #206370
by ahacreative
Replied by ahacreative on topic Pinterest Rich Pins
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!
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.
11 years 4 months ago #206368
by nicolas
Replied by nicolas on topic Pinterest Rich Pins
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.
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.
10 years 6 months ago - 10 years 6 months ago #239087
by drfenning
Replied by drfenning on topic Pinterest Rich Pins
What did you put for "content" in the price field to get it to pull global content from hikashop?
Last edit: 10 years 6 months ago by drfenning.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #239102
by nicolas
Replied by nicolas on topic Pinterest Rich Pins
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
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
Code:
$element->prices[0]->price_value
Please Log in or Create an account to join the conversation.
10 years 6 months ago #239311
by drfenning
Replied by drfenning on topic Pinterest Rich Pins
thanks, but this is greek to me. :S
is this within hikashop code or in the ITP meta "content" field?
is this within hikashop code or in the ITP meta "content" field?
Please Log in or Create an account to join the conversation.
10 years 6 months ago #239327
by Xavier
Replied by Xavier on topic Pinterest Rich Pins
Hi,
This is within HikaShop code, more precisely in the "hikashopsocial" plugin.
It require PHP knowledges.
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.
9 years 4 months ago - 9 years 4 months ago #273282
by Masters
Replied by Masters on topic Pinterest Rich Pins
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
But for some reason still is not acknowledging the information for Pinterest Rich Pins... thoughts?
/plugins/system/hikashopsocial/hikashopsocial.php
and added the new lines
Code:
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" /> ';
Last edit: 9 years 4 months ago by nicolas.
Please Log in or Create an account to join the conversation.
9 years 4 months ago #273302
by nicolas
Replied by nicolas on topic Pinterest Rich Pins
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
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"
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
Code:
if(isset($types[ (int)$plugin->params['fb_type']]))
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds