Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

add an ADDTHIS social bookmark link to your products Rate Topic   - - - - -

 
  • Catch1fish
  • Member
  • Members
  • Join Date: 26-May 09
  • 82 posts

Posted 17 June 2009 - 11:35 PM #1

Having read the other addthis social bookmark threads, they just didnt do what I wanted so I muddled through to insert an addthis link next to each product

After much trial an error (very new to this cs-cart_super_fangled_software) I did this:

duplicated the file
/skins/[I]yourskin[/I]/customer/blocks/wrappers/mainbox_general.tpl

calling it
mainbox_products.tpl

edited the mainbox_products.tpl by inserting the link code after line 7

logged into the admin sections I changed the design > blocks > products > central content to mainbox_products.tpl

and hey presto! an addthis link below each product title

Would welcome comments from some of the more seasoned cs-carters out there if there is a 'correct' way of doing this

Attached Thumbnails

  • addthis_example.jpg

cs-cart V2.1.4

 

Posted 18 June 2009 - 06:32 AM #2

Excellent work there catch1fish.
I'll implement this when I get around to having some time to develop ;)
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • miracles
  • Senior Member
  • Members
  • Join Date: 19-Sep 07
  • 1533 posts

Posted 25 June 2009 - 06:51 AM #3

Thanks mate, but how should i give some space from top of the image.

Attached Thumbnails

  • share.jpg

CS-CART 3.0.6 GRENADE

Please vote for CDN Add-on

For SEO Article Submission, Forum Profile Links, Web 2.0 links, contact me through PM.

 
  • Catch1fish
  • Member
  • Members
  • Join Date: 26-May 09
  • 82 posts

Posted 06 July 2009 - 09:53 PM #4

Thanks mate, but how should i give some space from top of the image.


{* $Id: mainbox_general.tpl 7166 2009-03-31 13:29:22Z zeke $ *}
{if $anchor}
<a name="{$anchor}"></a>
{/if}
<div class="mainbox-container">
	{if $title}
	<h1 class="mainbox-title"><span>{$title}</span></h1>
<p>
<!-- AddThis Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php?v=250&pub=#####" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-bookmark-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=#####"></script>
<!-- AddThis Button END -->
</p>
	{/if}
	<div class="mainbox-body">{$content}</div>
</div>

I just stuck my link in between some para tags <p></p>
cs-cart V2.1.4

 
  • Yeikov
  • Junior Member
  • Members
  • Join Date: 12-Dec 08
  • 24 posts

Posted 31 December 2009 - 05:20 PM #5

thanks for sharing

 
  • Brennie369
  • Senior Member
  • Members
  • Join Date: 17-Mar 08
  • 831 posts

Posted 13 March 2010 - 06:39 PM #6

I don't have a BLOCKS folder in my skins/myskin/customer/ folder & I also tried searching for mainbox_general.tpl but couldn't find it. Is there another way to use this?

UPDATE: Disregard. I just placed my code in skins/customer/product_pages/product_details.tpl & it works fine. I can even put it exactly where I want it to appear on the page.

CS-Cart 4.9.3 SP1


 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 13 March 2010 - 06:49 PM #7

I don't have a BLOCKS folder in my skins/myskin/customer/ folder & I also tried searching for mainbox_general.tpl but couldn't find it. Is there another way to use this?

This change is for version 2. Look for something comparable in /skins/YOURSKIN/customer/addons/listmania/listboxes.

Bob
CS-Cart 2.0.14 (testing)

 
  • AmitP
  • Senior Member
  • Members
  • Join Date: 08-Feb 10
  • 510 posts

Posted 16 March 2010 - 10:28 AM #8

this now appears to not work on 2.0.13, does anyone know how to get it done now?

Cheers

 
  • Raeandy
  • Member
  • Members
  • Join Date: 21-Aug 07
  • 54 posts

Posted 18 March 2010 - 10:28 AM #9

this now appears to not work on 2.0.13, does anyone know how to get it done now?

Cheers


With some playing I placed it right at the top of the tpl and directly under :

{* $Id: mainbox_products.tpl 8967 2010-03-02 09:04:29Z angel $ *}

Cheers
PS: I only just found this code tonight and like it so much that I applied it to my "All pages" central block, so it doesn't just appear in the products.

 
  • AmitP
  • Senior Member
  • Members
  • Join Date: 08-Feb 10
  • 510 posts

Posted 10 August 2010 - 11:05 PM #10

I still can't get this to work how i like it, id like it sittin under the picture if possible, I have instead added it as a html block on the right of the page
VPS 2.0GHz + 1GB RAM

 
  • elmer328
  • Member
  • Members
  • Join Date: 12-Jan 09
  • 59 posts

Posted 08 September 2010 - 04:24 PM #11

Just want to give this a bump. I don't know what the problem is. Running 2.0.14 and when I insert the code, the product details page goes completely blank as do the side columns.

I've done this before with another snippit of code that we use for click-to-call and it works fine. I'm stumped. Any help is appreciated.
- Jeff

 

Posted 08 September 2010 - 05:44 PM #12

Excellent, thx for this!!

 
  • websmart
  • Junior Member
  • Members
  • Join Date: 11-Feb 10
  • 78 posts

Posted 03 November 2010 - 06:45 PM #13

Hi,
I've followed the instructions on how to add "addthis" snipet, everything works except when I click on share with facebook it does not display the product image, instead it displays a side banner image from the right column!!
Could you suggest a fix?
You can take a look at it here.
http://alturl.com/woogj

Thanks

 
  • wls
  • Junior Member
  • Members
  • Join Date: 21-Oct 09
  • 28 posts

Posted 28 December 2010 - 06:44 AM #14

Frankly, I'm pretty new to CS-Cart and I didn't follow the above method. So... I just went into the Design tab, Blocks, and the page I wanted the AddThis info on. In my case I put it on the All Pages section.

Click on Add Block, give it a name "AddThis", content HTML block, and then paste in the code that you got from AddThis when you set up the block.

This code:

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_print"></a>
<a class="addthis_button_compact"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=XXXX"></script>
<!-- AddThis Button END -->


will get you this
Posted Image

Set group as Right Column (left col, etc) and wrapper (I used /mainbox_simple.tpl).

And Voilá, you now have social bookmarks that work on every page.

 
  • Virtualburn
  • Junior Member
  • Members
  • Join Date: 26-Jan 11
  • 19 posts

Posted 02 February 2011 - 12:53 AM #15

Great addition to the site as it includes all the sharing sites I can think of.

I found a nice place to add this is just under the 'Add to cart' & 'Add to Wishlist' links. The one I chose fits quite nicely.

~ domain.co.uk/skins/yourskin/customer/common_templates/product_data.tpl
~ Line 104

[B]{/hook}[/B]
 
 <!--add_to_cart_update_{$obj_prefix}{$obj_id}-->
 
 <!-- AddThis Button BEGIN -->
 <div class="addthis_toolbox addthis_default_style " [COLOR=Red]style="padding-top: 10px"[/COLOR] >
 <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
 <a class="addthis_button_tweet"></a>
 <a class="addthis_counter addthis_pill_style"></a>
 </div>
 <script type="text/javascript"   src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4d3c1e8757fd81eb"></script>
 <!-- AddThis Button END -->
 
 [B]</div>[/B]
I've added the padding just to bring it down a touch.
<!-- if ( google result == 0) then | ask = post.Message("help") | if (ask == FIX) then | post.Exit(); | end | else | rtfm.Exit(); | end -->

 
  • johnny_n
  • Junior Member
  • Members
  • Join Date: 26-Apr 11
  • 23 posts

Posted 23 May 2011 - 12:51 PM #16

If you're trying to track clickbacks and you're getting the following error:

Fatal error: Smarty error: [in top.tpl line 33]: syntax error: unrecognized tag: "data_track_clickback":true (Smarty_Compiler.class.php, line 440) in /home/xxxyyyzzz/public_html/dreamsoy/classes/templater/Smarty.class.php on line 1095


Here's your fix:

http://www.addthis.c...&st=0&sk=t&sd=a

After pasting the code from AddThis, you need to surround the line with {literal} tags:

{literal}
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
{/literal}



 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 218 posts

Posted 24 January 2012 - 08:58 PM #17

Great addition to the site as it includes all the sharing sites I can think of.

I found a nice place to add this is just under the 'Add to cart' & 'Add to Wishlist' links. The one I chose fits quite nicely.

~ domain.co.uk/skins/yourskin/customer/common_templates/product_data.tpl
~ Line 104

[B]{/hook}[/B]

<!--add_to_cart_update_{$obj_prefix}{$obj_id}-->

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style " [COLOR=Red]style="padding-top: 10px"[/COLOR] >
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript"   src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4d3c1e8757fd81eb"></script>
<!-- AddThis Button END -->

[B]</div>[/B]
I've added the padding just to bring it down a touch.


This works like a charm, however, for facebook if there's a picture in the main description I think it grabs that one instead of the item picture. This is exactly what I was looking for though..

I'm just testing cs-cart with the free version right now so I don't have ssl activated, does using these addthis buttons cause problems (give warnings) or do they disappear when SSL is activated.

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 218 posts

Posted 25 January 2012 - 08:52 PM #18

Great addition to the site as it includes all the sharing sites I can think of.

I found a nice place to add this is just under the 'Add to cart' & 'Add to Wishlist' links. The one I chose fits quite nicely.

~ domain.co.uk/skins/yourskin/customer/common_templates/product_data.tpl
~ Line 104

[B]{/hook}[/B]

<!--add_to_cart_update_{$obj_prefix}{$obj_id}-->

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style " [COLOR=Red]style="padding-top: 10px"[/COLOR] >
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript"   src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4d3c1e8757fd81eb"></script>
<!-- AddThis Button END -->

[B]</div>[/B]
I've added the padding just to bring it down a touch.


When I do this, it also appears in Product Grid View, which is pretty ugly. Couldn't figure out how to get it below the add to cart button without this extra unwanted bonus effect. I've settled for up top below the catalog number for now.

 
  • colortone
  • Senior Member
  • Members
  • Join Date: 31-Jan 10
  • 368 posts

Posted 25 January 2012 - 11:47 PM #19

If you want it in the detail page, I think this code should be inside the tag "product-info" on the "default_template.tpl" file located at "skins/your-skin/customers/blocks/product_templates" folder. Try to place right before closing the tag </>

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 218 posts

Posted 26 January 2012 - 07:12 PM #20

If you want it in the detail page, I think this code should be inside the tag "product-info" on the "default_template.tpl" file located at "skins/your-skin/customers/blocks/product_templates" folder. Try to place right before closing the tag </>


Perfecto! Thank you!