Zen Cart Logo
Forums / All Other Contributions/Addons / "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

"Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Views: 16,533

Results 61 to 76 of 76
23 May 2013, 10:23 AM
#61
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

"Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Question 2.

For the sidebox addthis button.

Can that be configured so that it only shows on the sidebox of the product pages, and not the home page ?

I want to place a separate code on the home page so that when users like the page, it links back to the facebook page of the site ? If so, how is it achieved ?

Thanks,
Mike

25 May 2013, 10:26 PM
#62
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

CybaGirl:

I ended up taking out the Facebook code that was included in this mod and replaced it with code from another Facebook mod I found elsewhere and that stopped the errors for me. Plus the Facebook code I am using now has a couple of other features over the one included in this mod if my memory serves me right.
.

Can I ask which other FB Mod you used ?

Thanks,
Mike

19 Nov 2013, 1:48 PM
#63
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

kamion:

Would something like this work?

if(isset($product_info_metatags->fields) && !empty($product_info_metatags->fields)) {
extract($product_info_metatags->fields);
}
if(isset($category_metatags->fields) && !empty($category_metatags->fields)) {
extract($category_metatags->fields);
}


Thank you for this.

I just installed the opengraph stuff and noticed my cache folder was filling up (50k files).

This code resolved the issue for me.
19 Nov 2013, 2:05 PM
#64
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Limitless:

Thank you for this.

I just installed the opengraph stuff and noticed my cache folder was filling up (50k files).

This code resolved the issue for me.

You're welcome. :) Glad it helped you.

20 Nov 2013, 12:55 AM
#65
joseph_heinen avatar

joseph_heinen

New Zenner

Join Date:
Jun 2007
Posts:
65
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

kamion:

You're welcome. :) Glad it helped you.

Where exactly do you put this code? TIA

20 Nov 2013, 2:54 AM
#66
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Joseph Heinen:

Where exactly do you put this code? TIA

It replaces the two extract() calls in:

includes/templates/<your template>/common/html_header.php

21 Nov 2013, 1:20 AM
#67
joseph_heinen avatar

joseph_heinen

New Zenner

Join Date:
Jun 2007
Posts:
65
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

kamion:

It replaces the two extract() calls in:

includes/templates/<your template>/common/html_header.php

Thanks!
But I have one little problem. I know very little about coding, so could you post a before and after?

I tried replacing

extract($product_info_metatags->fields);
extract($category_metatags->fields);
with
if(isset($product_info_metatags->fields) && !empty($product_info_metatags->fields)) {
extractCOLOR=#007700;
}
if(isset(
$category_metatags->fields) && !empty($category_metatags->fields)) {
extractCOLOR=#007700;
} [/COLOR][/COLOR]

but I am still getting these errors (BTW I turned off logging)

[20-Nov-2013 20:16:40] PHP Warning: extract() [<a href='function.extract'>function.extract</a>]: First argument should be an array in /common/html_header.php on line 50
[20-Nov-2013 20:16:40] PHP Warning: extract() [<a href='function.extract'>function.extract</a>]: First argument should be an array in /common/html_header.php on line 51
[20-Nov-2013 20:16:40] PHP Warning: error_log(/var/log/www/zen/page_parse_time.log) [<a href='function.error-log'>function.error-log</a>]: failed to open stream: Permission denied in /public_html/catalog/includes/modules/footer.php on line 19

21 Nov 2013, 2:04 AM
#68
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Doesn't look like you modified your templates html_header.php file, but the default one.

21 Nov 2013, 2:14 AM
#69
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Not sure why these errors are now popping up.

[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in /common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): prop="image" src="images/large/gs/mecgpicmgcgov40n.jpg" alt="Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): 40n.jpg" alt="Mecgar 1911 .40 S&W 8 Standard Nickel" title=" Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
21 Nov 2013, 2:16 AM
#70
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Joseph Heinen:

Thanks!
But I have one little problem. I know very little about coding, so could you post a before and after?

I tried replacing

with

but I am still getting these errors (BTW I turned off logging)

I think with for your permission denied error, you might just need to touch /var/log/www/zen/page_parse_time.log to create it or manually create it and make sure apache (or whatever account that is running webserver) can modify that file.

21 Nov 2013, 2:40 AM
#71
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Limitless:

Not sure why these errors are now popping up.

[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in /common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): prop="image" src="images/large/gs/mecgpicmgcgov40n.jpg" alt="Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): 40n.jpg" alt="Mecgar 1911 .40 S&W 8 Standard Nickel" title=" Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
[20-Nov-2013 19:10:55] PHP Warning: simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63


I can't remember what my error message was, but I added a line before the call to simplexml_load_string. You can try it:

$myImage = zen_get_products_image((int)$_GET['products_id']);
$myImage = str_replace(" ", "", $myImage);
$img = simplexml_load_string($myImage);

21 Nov 2013, 4:00 AM
#72
joseph_heinen avatar

joseph_heinen

New Zenner

Join Date:
Jun 2007
Posts:
65
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Limitless:

Doesn't look like you modified your templates html_header.php file, but the default one.

Nope the changes are in my template

21 Nov 2013, 5:35 AM
#73
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

kamion:

I can't remember what my error message was, but I added a line before the call to simplexml_load_string. You can try it:

$myImage = zen_get_products_image((int)$_GET['products_id']);
$myImage = str_replace(" ", "", $myImage);
$img = simplexml_load_string($myImage);


I think that did it.
21 Nov 2013, 5:43 AM
#74
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Spoke too soon. Same error.

This is what I have :

//get defined image or default
$myImage= zen_get_products_image((int)$_GET['products_id']);
$price= zen_get_products_base_price((int)$_GET['products_id']);
$stock= zen_get_products_stock((int)$_GET['products_id']);
$myImage = str_replace(" ", "", $myImage);
$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 AutoOpenGraph ####################

5 Sep 2014, 2:16 PM
#75
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

I tried substituting the lines for the extract but it's a no go - still getting extract() expects parameter 1 to be array for those lines. Has anyone solved this problem?

2 Jan 2015, 5:00 PM
#76
michaelchu avatar

michaelchu

Zen Follower

Join Date:
Nov 2011
Posts:
121
Plugin Contributions:
0

Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

Is anyone supporting this plugin anymore? If so, please let me know if there is an incompatibility issue with image handler. It seems that none of the functions can pull the product image at all.