Forums / General Questions / Rich Pins

Rich Pins

Views: 1,763

Results 1 to 4 of 4
28 May 2013, 4:53 PM
#1
never2cute avatar

never2cute

New Zenner

Join Date:
Dec 2008
Posts:
5
Plugin Contributions:
0

Rich Pins

Hi, everyone!:smile:

I have a couple of questions about rich pins...

  1. Is there a plugin for adding products as Rich Pins to Pinterest? I searched but I didn't find anything...
  2. If there is no plugin, what's the best way to implement this? I know Pinterest says oEmbed or Semantic Markup...

Any help is appreciated! Please bear with me as I am not good at coding... yet. :D Thank you so much!

1 Jun 2013, 9:36 AM
#2
wulf359 avatar

wulf359

New Zenner

Join Date:
Feb 2008
Posts:
44
Plugin Contributions:
0

Re: Rich Pins

I've been asked by a friend to work on this and so far I've come up with the following chunk of code that gets dropped into the html_header.php file right under the <title> tag

So far it's going alright and works enough to get validated however, I have a problem getting the image pulled and I am stumped on what to put in there to call it so it shows up.... if anyone can chime in and help it would be greatly appreciated.

Other then that I have to get the product availability done and it should be good to go

This was taken from: http://htmyell.com/autofacebookog-open-graph-for-zen-cart/ and for the most part works as I said and should work with Facebook as well.

//START OF AOG
$store_name = "My Online Store"; //e.g. "Samanthas Power Tools", or "Gus' China Shop".
$store_url = "http://www.yourwebsite.com"; //url to your store (no trailing '/')
$product_type = "product"; //type of product you're selling (see tutorial)
$use_addr = 0; //use address? if yes, set $use_addr = 1; (no quotes). edit lines 31-34.
$use_email = 0; //use email address? if yes, set $use_email = 1; (no quotes) edit line 37.
$use_phone = 0; //use phone number? if yes, set $use_phone = 1; (no quotes) edit line 40.
 
//if $use_addr is set to 1;
$street = "124 Your Street";  //change to your street address.
$city = "Your City"; //your city
$state = "FL"; //Your State. Facebook exaple uses abbreviation.
$zip = "32503"; //you're zip/postal code.
$country = "USA"; //your country. Facebook example uses acronym.
 
//if $use_email is set to 1;
$email_address = "[email protected]"; // your email
 
//if use_phone is set to 1
$phone_number = "+1-800-555-1234"; //format: +country code - area code - number.
 
//no need to edit below this line:
extract($product_info_metatags->fields);
extract($category_metatags->fields);
$prod_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

//get defined image or default
$myImage= zen_get_products_image((int)$_GET['products_id']);
$img = simplexml_load_string($myImage);
$img = $img['src'];
if($this_is_home_page){ $depends = $store_name; $product_type = "website"; }
else if ($categories_name){  $depends = $categories_name; $product_type = "website";  }
else if ($products_name){ $depends = $products_name; }
else { $depends = META_TAG_TITLE; $product_type = "website"; }
//print_r($product_info_metatags);
//END OF AOG
 ?>
<!-- START OF AOG TAGS -->
4 Jul 2013, 9:53 PM
#3
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Rich Pins

Wulf359:

I've been asked by a friend to work on this and so far I've come up with the following chunk of code that gets dropped into the html_header.php file right under the <title> tag

So far it's going alright and works enough to get validated however, I have a problem getting the image pulled and I am stumped on what to put in there to call it so it shows up.... if anyone can chime in and help it would be greatly appreciated.

Other then that I have to get the product availability done and it should be good to go

Hi Wulf,

Did you ever get this fully working? If so, would you be willing to share how you achieved it?

Thanks

23 Sep 2013, 4:52 AM
#4
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Rich Pins

this appears to be working well but it's quickly filling up my cache folder with php warnings. any ideas of what might be causing this?

[22-Sep-2013 16:37:35 America/Los_Angeles] PHP Warning: extract() expects parameter 1 to be array, null given in /home/me/public_html/includes/templates/new/common/html_header.php on line 51
[22-Sep-2013 16:37:35 America/Los_Angeles] PHP Warning: extract() expects parameter 1 to be array, null given in /home/me/public_html/includes/templates/new/common/html_header.php on line 52

lines 51 and 52 are:

extract($product_info_metatags->fields);
extract($category_metatags->fields);

i should add i'm using 1.3.9h, if that matters?