Forums / All Other Contributions/Addons / creinold Pinterest Button Addon

creinold Pinterest Button Addon

Started by creinold on 10 Mar 2012, 1:00 AM · Views: 14,601

Results 41 to 60 of 98
16 Mar 2012, 9:04 PM
#41
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

creinold Pinterest Button Addon

creinold:

addThis code: Was something I created real fast. I never tested it. You were my guinea pic... ;) LOL I need to play with it later. I don't use addThis on my site. You can remove it till I figure it out better...

to remove, delete:

<a class="addthis_button_pinterest" pi:pinit:url="<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>" pi:pinit:media="<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>" pi:pinit:description="<?php echo stripslashes(strip_tags($products_description)); ?>" pi:pinit:layout="horizontal">

> 
> my pinterest codes:
> You need to put the javascript_main.php codes back in too... ;)

Thanks again for all your help! :D
16 Mar 2012, 9:04 PM
#42
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

I think i know what causing the image not to show... are you using some kind of image manager?

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

16 Mar 2012, 9:05 PM
#43
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

I think i know what causing the image not to show... are you using some kind of image manager?

Yeah Image Handler 3.

16 Mar 2012, 9:10 PM
#44
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

I will have to look into how it pulls the image file. The url to the image my sql query pulls is the standard zen cart image.

ie the url would look like this: http://frompropertorocker.com/images/medium/new-arrivals/Blue_BlockLetters_MED.jpg

image handler url looks more like: http://frompropertorocker.com/bmz_cache/a/ab9eb6130ec263f0af489a9e87d9b094.image.250x184.jpg

Ill have download image handler later and look into how it generates it image codes.

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

16 Mar 2012, 9:11 PM
#45
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

I will have to look into how it pulls the image file. The url to the image my sql query pulls is the standard zen cart image.

ie the url would look like this: http://frompropertorocker.com/images/medium/new-arrivals/Blue Block Letters_MED.jpg

image handler url looks more like: http://frompropertorocker.com/bmz_cache/a/ab9eb6130ec263f0af489a9e87d9b094.image.250x184.jpg

Ill have download image handler later and look into how it generates it image codes.

Sounds good! Thanks again!

16 Mar 2012, 9:13 PM
#46
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

Also please make sure when you upload images they don't have any spaces in the name IE:

Blue Block Letters.jpg should be Blue_Block_Letters.jpg or similar....

It will mess up url coding...

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

16 Mar 2012, 9:14 PM
#47
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

You welcome... You are almost there just got to get your images working now. =)

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

16 Mar 2012, 9:14 PM
#48
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

Also please make sure when you upload images they don't have any spaces in the name IE:

Blue Block Letters.jpg should be Blue_Block_Letters.jpg or similar....

It will mess up url coding...

I will fix those right away. :) Thanks for the heads up.

17 Mar 2012, 4:24 AM
#49
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

Okay let see if this fixes the image issue:

change:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

to:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

17 Mar 2012, 5:10 AM
#50
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

Okay let see if this fixes the image issue:

change:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> <div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div> <!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> ``` > > > to: > ``` <!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> <div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div> <!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> ```

Nope :(

17 Mar 2012, 5:15 AM
#51
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

Okay. I'll figure it out. Just have to figure out how image handler 3 pulls from the bmz cache.

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

17 Mar 2012, 5:16 AM
#52
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

Okay. I'll figure it out. Just have to figure out how image handler 3 pulls from the bmz cache.

Sounds good!

18 Mar 2012, 12:32 AM
#54
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

still working on the fix... sorry busy day, but I haven't forgot. =)

Not a problem! Take your time. :)

18 Mar 2012, 2:48 AM
#55
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

try this:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_large; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

18 Mar 2012, 12:58 PM
#56
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

try this:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> <div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_large; ?>&description=<?php echo stripslashes(strip_tags($products_description)); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div> <!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> ```

Thank you but it still didn't work.

18 Mar 2012, 4:10 PM
#58
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

Grrrr. ;)

LOL! I bet you are pulling your hair out right about now.

19 Mar 2012, 4:08 PM
#59
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

Okay lets try this... add this to the bottom of jscript_main.php

<?php
if (isset($_GET['products_id'])) { // use products_image if products_id exists
$pinterest_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
$pt_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $pinterest_image->fields['products_image'];
}
?>

Then change ths in tpl_product_info_display.php:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes($products_description); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

to this:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo $pt_image; ?>&description=<?php echo stripslashes($products_description); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creinold_SBA5.0_alpha_version1.5_for_zencart_V1.5.0.zip

19 Mar 2012, 4:13 PM
#60
nolsowski avatar

nolsowski

Inactive

Join Date:
Aug 2010
Posts:
324
Plugin Contributions:
0

Re: creinold Pinterest Button Addon

creinold:

Okay lets try this... add this to the bottom of jscript_main.php

<?php if (isset($_GET['products_id'])) { // use products_image if products_id exists $pinterest_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'"); $pt_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $pinterest_image->fields['products_image']; } ?>
> 
> Then change ths in tpl_product_info_display.php:
> ```
<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->
<div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>&description=<?php echo stripslashes($products_description); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div>
<!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) -->   

to this:

<!--Bof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> <div id="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php echo zen_href_link(FILENAME_PRODUCT_INFO); ?>&media=<?php echo $pt_image; ?>&description=<?php echo stripslashes($products_description); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></div> <!--eof creinold Pinterest Modifications, (You can move this anywhere you like the Pin it Button to show up on Product Info page.) --> ```

The image works now but my pin it button is gone and so is the description.