Post by Grigt » Tue Apr 01, 2014 8:01 am

How can I put back the social media icons on the product description page so customers can share the item/page if they want to? I had someone remove them for me and now I want to try to put them back myself. Thanks.

New member

Posts

Joined
Sat Mar 15, 2014 8:49 am

Post by BlueLotusStudio » Tue Apr 01, 2014 10:03 am

I don't know what version you are running, so my code may be different from yours. In your original oc (if you don't have a backup of the original, download it from the oc website) go to catalog/view/theme/yourtheme/template/product.tpl and locate the code for "review status." It should look something like:

Code: Select all

<?php if ($review_status) { ?>
      <div class="review">
        <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
In my file, it's around line 235. Directly below it, insert your code for the social buttons. It should look something like (I have modified the pinit button):

Code: Select all

<div class="share"><!-- AddThis Button BEGIN -->
          <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a> <a class="addthis_button_pinterest" pi:pinit:url=<?php echo $breadcrumb['href']; ?> pi:pinit:media=<?php echo $thumb; ?> pi:pinit:layout="none"></a> </div>
          <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> 
          <!-- AddThis Button END --> 
        </div>
Just a suggestion for future changes: rather than deleting code, I always comment it out. That way if it causes problems at some point, or I change my mind, all I have to do is remove the comment tags.

http://www.bluelotustreasures.com
oc v1.5.6.1 with vq_mod - clean install
Current extensions: currency drop down; usps fix; vqmodmanager; sliding shopping cart; multiple flat rate options; braintree payment gateway; ajax quick checkout; show voucher theme pictures


User avatar
Active Member

Posts

Joined
Fri Feb 28, 2014 8:15 am
Location - Maryland

Post by Grigt » Wed Apr 02, 2014 4:02 am

Thanks BlueLotusStudio. I will try that.

New member

Posts

Joined
Sat Mar 15, 2014 8:49 am

Post by GameLand19 » Thu Feb 14, 2019 3:52 am

i don't have product.tpl, how to resolve this

User avatar
New member

Posts

Joined
Mon Feb 12, 2018 7:21 pm

Post by GameLand19 » Wed Feb 20, 2019 4:14 pm

In 3.0.2 is "product.twig"

User avatar
New member

Posts

Joined
Mon Feb 12, 2018 7:21 pm
Who is online

Users browsing this forum: Semrush [Bot] and 62 guests