Wednesday, December 18, 2013

osCommerce. How to change a Google web font in OsCommerce

This tutorial shows how to change a Google web font in osCommerce template.


How_to_change_a_Google_web_font_Oscommerce-1


1. Lets change font for category items. Find font that used for particular text on your template using Firebug software. Information on how to use firebug you can find at Firebug. Mozilla Firefox plugin


How_to_change_a_Google_web_font_Oscommerce-2


2. Open file with the link to google font. In our template link to the google font code is located in includes\template_top.php file.


How_to_change_a_Google_web_font_Oscommerce-3


3. We need to replace this font with modified one or just add line with the new font in case original font will be used as well.


3.1. Open http://www.google.com/webfonts and select appropriate font using filters.


How_to_change_a_Google_web_font_Oscommerce-4


3.2. Pay attention to character set. Select font that supports your character set. We have selected Cyrillic Extended in order to be able to use Cyrillic fonts.


How_to_change_a_Google_web_font_Oscommerce-5


3.3. Add font to collection and click Use.


How_to_change_a_Google_web_font_Oscommerce-6


3.4. Select appropriate character set and Copy generated code.


How_to_change_a_Google_web_font_Oscommerce-7


4. Replace original code in file or just add code in case you are going to use old font as well. Modified code you can see on the screenshot below.


How_to_change_a_Google_web_font_Oscommerce-8


5. Now we need to change the font in css file. In our case superfish.css should be modified. Search appropriate code in css file.


How_to_change_a_Google_web_font_Oscommerce-9


6. Scroll down to the page with google font and copy font to your css file.


How_to_change_a_Google_web_font_Oscommerce-10


7. Modified code should look like on the screenshot below.


How_to_change_a_Google_web_font_Oscommerce-11


8. Refresh home page and check how your site looks. We have changed google font.


How_to_change_a_Google_web_font_Oscommerce-12



osCommerce. How to change a Google web font in OsCommerce

No comments:

Post a Comment