Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Pinterest

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-10-2012, 05:54 PM
 
MSfan MSfan is offline
 

Advanced Member
  
Join Date: Nov 2011
Posts: 56
 

Default Pinterest

I know a number of you have probably never heard of pinterest.com... I've only heard about it recently. It is a website where members can 'pin' images of things they like (visual bookmarks). It seems a bit like 'liking' something on Facebook, but members see visual representations of each thing they've pinned, and they can group them into categories. It is integrated with Facebook and Twitter somehow. I'm still learning about it, but it seems like a great way to get exposure to your ecommerce site.

If members 'pin' an item from your store, it's kind of like free publicity. Not only will the member see/remember it, but their followers will see it as well. But how can I modify my files so it will include this in the product description (dynamically)? It needs a URL and an image for each product. Would someone know how to write the php that pulls this info?

Here is a (non X-cart) store that has the Pin It button on their products. http://www.youcanmakethis.com/products/holidays/baking-memories-tea-towel-gingerbread-design.htm

Sorry if I've posted in the wrong forum... please move if needed.

Thanks
__________________
v4.4.4 Pro
Reply With Quote
  #2  
Old 01-10-2012, 10:17 PM
  Toora Designs's Avatar 
Toora Designs Toora Designs is offline
 

eXpert
  
Join Date: Aug 2011
Location: California USA
Posts: 281
 

Default Re: Pinterest

That is really interesting

You can see here http://help.qtmsoft.com/index.php?title=X-Cart:Adding_Facebook_Like_button_to_your_X-Cart_store the way QT adds the facebook mod there and I think you can edit the same files

here is a code for pin interest http://pinterest.com/about/goodies/

If you need professional help let me know
__________________
If you need professional help on your x-cart site or any website.
Feel free to PM me or Skype me to discuss your project.
Reply With Quote
  #3  
Old 01-11-2012, 01:19 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Pinterest

Quote:
Originally Posted by MSfan
how can I modify my files so it will include this in the product description (dynamically)? It needs a URL and an image for each product.
Here is a Smarty code snippet for 4.3 used with addthis that might point you in the right direction:
PHP Code:
{if $main eq "product"}
    {
assign var=piniturl value="http://`$config.Company.company_website``$smarty.server.REQUEST_URI`"}
    {
assign var=pinitmedia value=$product.images.T.url}
{elseif 
$main eq "catalog" and $current_category.category}
    {
assign var=piniturl value="http://`$config.Company.company_website``$smarty.server.REQUEST_URI`"}
    {if 
$current_category.icon_url}
        {
assign var=pinitmedia value=$current_category.icon_url}
    {/if}
{/if}
<
class="addthis_button_pinterest"{if $piniturlpi:pinit:url="{$piniturl}"{/if}{if $pinitmediapi:pinit:media="{$pinitmedia}"{/if} pi:pinit:layout="horizontal"></a
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following 2 users thank cherie for this useful post:
bobweasel (02-13-2012), MSfan (01-11-2012)
  #4  
Old 01-11-2012, 01:41 PM
 
MSfan MSfan is offline
 

Advanced Member
  
Join Date: Nov 2011
Posts: 56
 

Default Re: Pinterest

Oh wow, thank you! That got me 99% of the way there. The only thing missing is a description when the pinterest pop up comes up. It would be nice to pre-populate it with the name of the product.
__________________
v4.4.4 Pro
Reply With Quote
  #5  
Old 01-11-2012, 01:58 PM
  Toora Designs's Avatar 
Toora Designs Toora Designs is offline
 

eXpert
  
Join Date: Aug 2011
Location: California USA
Posts: 281
 

Default Re: Pinterest

For name you could use
Code:
{$product.producttitle|default:$product.product|escape}
__________________
If you need professional help on your x-cart site or any website.
Feel free to PM me or Skype me to discuss your project.
Reply With Quote
  #6  
Old 01-11-2012, 02:29 PM
 
MSfan MSfan is offline
 

Advanced Member
  
Join Date: Nov 2011
Posts: 56
 

Default Re: Pinterest

Get this, I've been testing with cherie's code for the last 20 minutes or so.... and somebody already repinned my test pin (which was of the 3 diamond princess cut ring that comes with the demo). That is too funny! Here I thought nobody sees my site since I'm just in test mode and it reached an audience before I even intended. The power of social media...

Anyway, thanks for the code for the product title. I found part of that (just without the default value). However I can't seem to add it to the url.

I was able to populate a variable like this:
{assign var=pinitdesc value=$product.producttitle}

I tried adding this to the <a> tag:

{if $pinitdesc} pi:pinit:description="{$pinitdesc}"{/if}

but it doesn't work.. it doesn't add it to the url. However, if I hardcode &description=this%20%is%20a%20test to the url, it works fine. I guess "pi:pinit:description" isn't the right syntax.
__________________
v4.4.4 Pro
Reply With Quote
  #7  
Old 01-11-2012, 02:46 PM
  Toora Designs's Avatar 
Toora Designs Toora Designs is offline
 

eXpert
  
Join Date: Aug 2011
Location: California USA
Posts: 281
 

Default Re: Pinterest

Code:
{assign var=pinitmedia value=$product.images.T.url} {assign var=pinitmedia value=$product.producttitle}

Something like that
__________________
If you need professional help on your x-cart site or any website.
Feel free to PM me or Skype me to discuss your project.
Reply With Quote
  #8  
Old 01-11-2012, 02:54 PM
 
MSfan MSfan is offline
 

Advanced Member
  
Join Date: Nov 2011
Posts: 56
 

Default Re: Pinterest

Thanks - I'm able to populate the variable okay (I basically did a print statement to validate). It's adding it to the hyperlink tag that is the issue

I tried this but it does not work. I'm guessing there is an error with the part in red. I must not be using the correct syntax.

Code:
<a class="addthis_button_pinterest"{if $piniturl} pi:pinit:url="{$piniturl}"{/if}{if $pinitmedia} pi:pinit:media="{$pinitmedia}"{/if} {if $pinitdesc} pi:pinit:description="{$pinitdesc}"{/if} pi:pinit:layout="horizontal"></a>
__________________
v4.4.4 Pro
Reply With Quote
  #9  
Old 02-13-2012, 01:35 PM
 
bobweasel bobweasel is offline
 

Member
  
Join Date: Oct 2010
Posts: 19
 

Default Re: Pinterest

Quote:
Originally Posted by MSfan
I tried this but it does not work. I'm guessing there is an error with the part in red. I must not be using the correct syntax.

Code:
<a class="addthis_button_pinterest"{if $piniturl} pi:pinit:url="{$piniturl}"{/if}{if $pinitmedia} pi:pinit:media="{$pinitmedia}"{/if} {if $pinitdesc} pi:pinit:description="{$pinitdesc}"{/if} pi:pinit:layout="horizontal"></a>

Did you figure this out yet? I'm stuck with the same problem. I need to populate the Product Title in the description, but can't figure out how!
__________________
Version: 4.6.1
Reply With Quote
  #10  
Old 02-14-2012, 06:22 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Pinterest

Try this for the product detail page:

Code:
<a href="http://pinterest.com/pin/create/button/?url={php}echo urlencode('http://www.yoururlhere.com' . $_SERVER['REQUEST_URI']);{/php}&media={$product.tmbn_url}&description={$product.producttitle}" class="pin-it-button" count-layout="horizontal">Pin It</a> <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote

The following 2 users thank balinor for this useful post:
heather@MX1 (04-12-2012), Yvonnewilt (02-15-2012)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:33 AM.

   

 
X-Cart forums © 2001-2020