Putting your products out there for the world to see is essential, and the best way to do it is with Social MediaFacebook is the largest out there right now, and pretty much everyone you know has an account as a means to talk with friends/family, advertise, or get things out there in general. By adding a Facebook like button, you can increase your number of likes and show people that you're an established brand with engaged followers.


Applies to Version(s): 3.9.x  Series



How to turn on Facebook Like Button in the Admin

The first and easiest way to do this is by going through the Admin of the cart and turning the "like" button on. This can be done by entering the Admin of the cart and going to Marketing>Social Sharing>Social Sharing for Products. Then click Enable Facebook Like button.

enable facebook like button


Now if your cart doesn't have this option or you have done a lot of Design of Development work to your site, you will want to head over to the Developers page on Facebook


Now if you want to get a Facebook Like Button and Share option, you can continue reading on.


How to access Facebook Developer Page

Note: The next steps may no longer be applicable to the latest versions of the cart (3.8.2 - current). Also. you will need to be already logged in to your Facebook account to access this page.


Once you're logged in, you can use this link to bring you directly to the page you're looking for. Under URL to like, place the URL of your webpage where you intend to place the Facebook Like button.

URL to like


Where to find the Code for Facebook like button

Scroll down a bit to find and click the Get Code button.

get code button


A window will pop out showing a code that you will need to copy and paste on the Cart Designer on the Product Pages


javascript SDK


Note: Before moving to the next step, you will want to make sure you're connected to the Facebook account that you're using for Developer. One area you may have already set this up for is by turning on Facebook Sign In


Where to add the Facebook Code

Note: The next steps may no longer applicable to the latest versions of the cart (3.8.2 - current).


Now you will want to get into the Admin of your Cart and go to the Cart Designer. Once there navigate to a product, doesn't matter which as when you add the code in, it will reflect on all product pages.


So first off we will need to take the code from the first part of the box we clicked on and shown above. This will need to be placed in the body, but before we do that we will need to find this file and make a copy of it and upload it to _custom. 


The file we're looking for is header.html. The path for that file is:


[cart root]/content/skins/WeddingAndBridal(or your current theme)/templates/layouts/zones/header.html


Make a copy of this file to your local computer and name it header.html.


file path


Now that we have made a copy to the local computer, you will want to open in a text pad and insert the code and make sure you're adding {literal} {/literal} tags before the first and last <script> tags.


insert code


Now we have this, we can upload back to our cart, but in a different path now.


 The path you will upload to is:


 [cart root]/content/skins/_custom/skin/templates/layouts/zones/


file manager - file path


Note: You can place the code anywhere you would like within the Cart, this is completely up to you


Now we have that uploaded we can now go into Cart Designer and insert the code for the Like Button and Share Button


Find any product in your cart using the Cart Designer, navigate to that Product Page, and right click and click Source Code.


source code


Once you have opened up the Source Code, scroll to the bottom and place the code after the very last </div> tag and closing {/if}.


paste code


In the highlighted code above, you can also replace the URL with a Variable for the product, that variable would look as such: {$pdroduct.url}


This will ensure you're getting that product and that product only. 


Now this has been inserted, you can click Save and you will now see your Like and Share Button as you see below:


like button on page


 


Links to Related Articles


Setting up Facebook


If you didn't get your question answered, please contact the Pinnacle Cart Support Team. To submit a ticket, go to the My Account drop-down menu at the top right of the admin area and select Support.