Share This Problem

Hi,



We have added the Share This ([url]http://www.sharethis.com/[/url]) buttons to everyone of our products. The problem we are having is a blank line is added above our chart checkout icon at the top of the page.



Has anyone else had this problem? If so how do you sort it out?



Kind Regards,

Gobbo!!!

Sounds like you put it in the wrong place.

It wasn’t me it was CS-Cart.

Then you need to ask them. We cannot help if we don’t know where it was placed.

But I do, as it was I how placed them.



They sent me this:-



In order to place these buttons under the product description on the product details page, you should do the following:


  1. Create the following directories path in the root directory of your CS-Cart installation:



    skins/NAME_OF_YOUR_SKIN/customer/addons/my_changes/hooks/index




  2. Create the “scripts.override.tpl” file in the “skins/NAME_OF_YOUR_SKIN/customer/addons/my_changes/hooks/index” directory with the following content:



    {literal}

{/literal}





3) Save the file.

4) Open the “default_template.tpl” file located in the “skins/NAME_OF_YOUR_SKIN/customer/blocks/product_templates” directory of your CS-Cart installation.

5) Replace the following part of code:






with this one:







6) Save the file.

If you made changes in a template but they are not displayed, please try cleaning up the template cache. In order to do it open this link in your browser: [url]http://www.your_domain.com/admin.php?cc[/url] where "www.your_domain.com" is the address of your store and where admin.php is a script file for the administration panel of your store that was renamed for security reasons.

NOTE: Before cleaning the templates cache you should be logged in to the administration panel of your store.



Does that help you?

Sorry I can not be of better use but I am trying to sort out a Wordpress problem with my site.

A little better. Can you provide a link?

The script is being placed in the header whereas it should be in the body. I don’t know the exact code ShareThis provided but I think I would try setting it up as a block under Product pages.

Hi,



I have followed your advice and have now placed it in a block, and it is much better and easier to edit.



So thanks, your hint was a big help.



But I still have the blank line, AAAAAGGGGHHHHHHH!!!



Tool, I guess you can’t help us out?



If not does anyone else have a solution?



Kind Regards,

Gobbo

Did you remove all of the previous code? Did you clear cache?

Hi,



I had to keep the following:-



'1) Create the following directories path in the root directory of your CS-Cart installation:



skins/NAME_OF_YOUR_SKIN/customer/addons/my_changes/hooks/index





2) Create the “scripts.override.tpl” file in the “skins/NAME_OF_YOUR_SKIN/customer/addons/my_changes/hooks/index” directory with the following content:



{literal}


{/literal}'



As, I take it, the ‘Share This’ buttons would not work.



Or, do you mean I should put this into the block too?



Kind Regards,

Gobbo

Ok, we have placed all the code in the block, it seems to work fine.



I removed all the code from the other files and renamed scripts.override.tpl, so it can not be accessed by the server.



I cleared the cache and the blank line is still there.



Also as the ‘Share This’ buttons are in a block they appear on every screen. How can we make them only appear with products?



Kind Regards,

Gobbo

I don’t remember the link to your site but it was a meta tag that was causing the blank line. The meta tag needs to be removed.



Apparently you created the block under “All pages” when you should have created under “Product page” only.

I have the Add This button to (it’s the same as Share this, links your web to every social network, adds it to favorites, etc. etc.), but I just putted it in a block and that’s it, nothing more to it!



An example of the code is:



Bookmark and Share





You just need to create a banner with this code (or any other code that you have) and then create a block and putt this banner inside. That's it. The AddThis site is [url]www.addthis.com[/url] if you want to check it out. ;)

Hello,

I tried “share this” after reading this post. It worked when putting into a block, but for some reason, the header was expanded by one or two lines and made it too wide. Could not fix it and removed the share this code.

I then used the service that E.Qi.Librium mentioned, from addthis.com, which essentially is the same as share this. I put the code in a block and put it in a html block in the central content on the products page. It shows up right above the product image. This is where I wanted it. I did not use the banner method. I don’t have a problem the addthis code as I did with share this. Just one note of caution, I did start to modify the code by adding other services. When I had too many the left column blocks disappeared. I guess nothing is perfect when code can interfere with other existing code.

Bob

E.Qi.Librium,



How do you put a banner in a block? I take it you mean you make a banner in CS-Cart?



Kind Regards,

Gobbo

Yes Gobbo, I use this method, first I put any kind of code that I want into "Content/ Banners, and then, in design/ blocks I create a block and insert the banner of my choise inside. But this is how I do it, I guess there are other ways, I use this way because its more practicall for me as I can activate and deactivate the banners (that are not banners at all).

E.Qi.Librium,



But how do you insert a banner into a block??



Gobbo

Go to the product/page click on “Blocks”, Click on “Add Banners”

First you create a text banner where you put whathever html or java code you want, then, you go to design/blocks and add a new block like, for example, in home page. In this block where it puts “block content” you put “banners” and then you choose its position, etc. and that’s it, you have a block with the choosen banner (or better, the piece of code) inside.

Got it, thanks to you both.