Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / use/copy social media code from custom template to other templates?

use/copy social media code from custom template to other templates?

Views: 1,030

Results 1 to 3 of 3
4 Apr 2013, 5:43 PM
#1
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

use/copy social media code from custom template to other templates?

I was going to post this in the add-ons thread, but thought this would be a more appropriate place.
I have a few Zen V1.50 sites that I want to add social links to my product page, that will allow someone to share my products on their social media. It doesn't have to be just like this, but here is one that I like because it is right under the name and price, the links are a good size, and it's pretty noticeable without taking up too much room... http://www.seashellnightlights.com/index.php?main_page=product_info&cPath=2&products_id=16 . This is a website of mine in which I used the sophyblue template. These links were already built in to the template. Is that just a "standard" social media link I can get from the add-ons section?? or if it's not, can I take the code from somewhere in that sophyblue template, add it to my other custom templates, and make those links show up in the product listings page of my other websites? or add a particular folder or file somewhere in my custom template section that will tell the product page to display those links? Sophyblue template doesn't re-write any of my original zen files, so I guess it's 'telling' my product_info_page what to do??? Heck, I don't know.. but I like the fact that Sophyblue doesn't change any of the core site files because my other sites are modified. I have also seen several social media add-ons in the plugins section, but not a lot of demo's or screenshots, and not all say they will work with Zen V1.50, and I don't want it in the sidebar, and I don't want the code to change my core files if possible. I have a few sites that I want to add this to, all with custom templates. If I can't use/add the code from sophyblue, which one(s) of the plugins would be recommended to do the same or similar thing as this and work with my zen 1.5 versions that have been modified? I guess that would be a question for the add-ons thread... well anyway, I am looking for guidance as to my best approach.... Thanks!!

5 Apr 2013, 5:48 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: use/copy social media code from custom template to other templates?

Look in the /includes/templates/sophyblue/templates/ for a tpl_product_info_display.php file

You can try using this file on your other sites

Or just add this code to a copy for your template of tpl_product_info_display.php on the other sites

<!-- bof Share This Widget -->
<div id="sharethis">
<span class="st_sharethis"></span>
<span class="st_facebook"></span>
<span class="st_twitter"></span>
<span class="st_myspace"></span>
<span class="st_email" ></span>

<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
        stLight.options({
                publisher:'12345'
        });
</script>
</div>
<!-- eof Share This Widget -->
23 Apr 2013, 6:59 AM
#3
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: use/copy social media code from custom template to other templates?

Thanks Kobra.......... oh,, umm,, I mean King Kobra :flex:..... that did the trick!