Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to add social media icons in the footer...

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 02-20-2016, 08:06 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default How to add social media icons in the footer...

Just in case anyone finds this useful. Yes, we use the "Go Social" module which adds a few social "like" buttons to the products, but for starters, it doesn't have Instagram which is way bigger than Pinterest these days. It also doesn't give you a simple link to your social sites on the footer or header, etc. So I put this together. All it does is puts the icons down in the footer and links to each.


1) Image search Google for "social icons", you will find a zillion of them. I downloaded what I needed in 32 px X 32 px. Upload them into an /images directory somewhere. If you want want I use, then I've provided them for you here.


2) in XC5 back end, navigate to Look & Feel >> Webmaster mode - turn that on, then go down to the footer and find the /default/en/powered_by.tpl template. Open that up, and after <div class="powered-by"> add this, ( replacing "yourID" in the appropriate places):


<div class="iconrwap">
<div class="social-icons"><a href="https://www.facebook.com/yourID/" target="_new"><img border="0" src="/images/32-facebook.png" width="32" height="32" alt="*" /></a></div>
<div class="social-icons"><a href="https://www.instagram.com/yourID/" target="_new"><img src="/images/32-instagram.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://twitter.com/yourID" target="_new"><img src="/images/32-twitter.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://plus.google.com/yourID/" target="_new"><img src="/images/32-googleplus.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://www.youtube.com/channel/yourID" target="_new"><img src="/images/32-youtube-2.png" width="32" height="32" border="0" /></a></div>
<div style="clear:both"></div>
</div>


3) Look & Feel >> Custom CSS, add this:

.iconrwap {
text-align: center;
height: auto;
width: 240px;
margin-right: auto;
margin-left: auto;
margin-bottom: 40px;
}

.social-icons {
padding: 10px;
height: 36px;
width: 38px;
border: 0;
float: left;
text-align:center;
}

That's it!
Attached Thumbnails
Click image for larger version

Name:	icons.jpg
Views:	341
Size:	6.4 KB
ID:	4474  
Attached Images
    
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote

The following 3 users thank kevinrm for this useful post:
Doherty (05-25-2016), iClerisy (05-05-2016), qualiteam (02-23-2016)
  #2  
Old 02-20-2016, 08:07 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: How to add social media icons in the footer...

The YouTube icon...
Attached Images
 
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
  #3  
Old 02-20-2016, 08:10 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: How to add social media icons in the footer...

Note that since I did this, I already had 2 people subscribe to our YouTube page within 24 hours, and I hadn't had anyone subscribe to that for months previously.
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote

The following 2 users thank kevinrm for this useful post:
cflsystems (02-22-2016), qualiteam (02-22-2016)
  #4  
Old 02-22-2016, 03:19 PM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: How to add social media icons in the footer...

Great post, thank you for sharing this recipee with the X-Cart community.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #5  
Old 05-04-2016, 02:23 AM
 
Doherty Doherty is offline
 

Member
  
Join Date: Feb 2016
Location: UK
Posts: 22
 

Default Re: How to add social media icons in the footer...

Quote:
Originally Posted by kevinrm
Just in case anyone finds this useful. Yes, we use the "Go Social" module which adds a few social "like" buttons to the products, but for starters, it doesn't have Instagram which is way bigger than Pinterest these days. It also doesn't give you a simple link to your social sites on the footer or header, etc. So I put this together. All it does is puts the icons down in the footer and links to each.


1) Image search Google for "social icons", you will find a zillion of them. I downloaded what I needed in 32 px X 32 px. Upload them into an /images directory somewhere. If you want want I use, then I've provided them for you here.


2) in XC5 back end, navigate to Look & Feel >> Webmaster mode - turn that on, then go down to the footer and find the /default/en/powered_by.tpl template. Open that up, and after <div class="powered-by"> add this, ( replacing "yourID" in the appropriate places):


<div class="iconrwap">
<div class="social-icons"><a href="https://www.facebook.com/yourID/" target="_new"><img border="0" src="/images/32-facebook.png" width="32" height="32" alt="*" /></a></div>
<div class="social-icons"><a href="https://www.instagram.com/yourID/" target="_new"><img src="/images/32-instagram.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://twitter.com/yourID" target="_new"><img src="/images/32-twitter.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://plus.google.com/yourID/" target="_new"><img src="/images/32-googleplus.png" alt="*" width="32" height="32" border="0" /></a></div>
<div class="social-icons"><a href="https://www.youtube.com/channel/yourID" target="_new"><img src="/images/32-youtube-2.png" width="32" height="32" border="0" /></a></div>
<div style="clear:both"></div>
</div>


3) Look & Feel >> Custom CSS, add this:

.iconrwap {
text-align: center;
height: auto;
width: 240px;
margin-right: auto;
margin-left: auto;
margin-bottom: 40px;
}

.social-icons {
padding: 10px;
height: 36px;
width: 38px;
border: 0;
float: left;
text-align:center;
}

That's it!


Great guide, found this really easy to follow dispite not having experience in either HTML or CSS! Thank you.

Do you know how I can expand this footer? I want something that looks similar to the footer here;
https://antennademo.wordpress.com/

See how they have live updates from twitter? If this isn't achivable would something like number 13 be;
http://www.creativebloq.com/web-design/website-footers-1131597

I know it's cheeky to ask but I appreciate any help.
__________________
X-Cart Version: 5

License products:
X-Cart Gold
Product Configurator
Feature Comparison
Refine Filters
Reply With Quote
  #6  
Old 05-04-2016, 06:39 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: How to add social media icons in the footer...

Glad someone liked it. Of course you could do all kinds of things...
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote
  #7  
Old 05-05-2016, 12:00 AM
 
Doherty Doherty is offline
 

Member
  
Join Date: Feb 2016
Location: UK
Posts: 22
 

Default Re: How to add social media icons in the footer...

Quote:
Originally Posted by kevinrm
Glad someone liked it. Of course you could do all kinds of things...


Yes, but how?
__________________
X-Cart Version: 5

License products:
X-Cart Gold
Product Configurator
Feature Comparison
Refine Filters
Reply With Quote
  #8  
Old 12-21-2016, 02:03 PM
 
BrandonLR BrandonLR is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 161
 

Default Re: How to add social media icons in the footer...

For some reason, this isn't working correctly in Chrome. My browser is updated.
Works great in firefox and other browsers, but Chrome is stacking the icons vertically- even weireder...it's only happening on our homepage. All other pages (in Chrome) render correctly.
Anyone know of an easy solution?
__________________
X-Cart Business 5.4.1.29
Reply With Quote
  #9  
Old 12-21-2016, 02:30 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How to add social media icons in the footer...

Brandon,
Its hard to comment without being able to see the page. Would you mind sharing the URL where its not working?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #10  
Old 12-21-2016, 02:32 PM
 
BrandonLR BrandonLR is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 161
 

Default Re: How to add social media icons in the footer...

Quote:
Originally Posted by totaltec
Brandon,
Its hard to comment without being able to see the page. Would you mind sharing the URL where its not working?

My bad...

www.razorblade.pro
__________________
X-Cart Business 5.4.1.29
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:43 PM.

   

 
X-Cart forums © 2001-2020