Friday, April 30, 2010

PrestaShop Tips - How to setup favicon

What is a favicon?

A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16×16, 32×32 or 64×64 pixel square icon associated with a particular website or webpage.

A web designer can create such an icon and install it into a website (or webpage) by several means, and most graphical web browsers will then make use of it. Browsers that provide favicon support typically display a page's favicon in the browser's address bar and next to the page's name in a list of bookmarks. Browsers that support a tabbed document interface typically show a page's favicon next to the page's title on the tab. Some programs allow the user to select an icon of his own from the hard drive and associate it with a website.

How to setup

Here is the instruction to setup a favicon for your PrestaShop.

  • Create a favicon use any tools you have like PhotoShop.

    You can use some free online tools or service like
    Event Paint which is Windows included tool is able to do that. Just save it with extention "ico".

    Make sure you the size is 16 x 16 pixels

  • Login to PrestaShop back office as admin.

  • Select Preference Tab

  • Select Apperance Sub-Tab

  • select the favicon file you just selected at Favicon property

  • Click Save

  • You are done.
    See sample at:

    Please also note:
    1. It takes for a while for your favicon to show up on your browsers. (like 1 hour?)
    2. It is better to clear your browser's cache to force your browser to download your new favicon.

    PrestaShop Tips -- How to setup Google Analytics

    Google Analytics (GA) is a free service offered by Google that generates detailed statistics about the visitors to a website. Its main highlight is that the product is aimed at marketers as opposed to webmasters and technologists from which the industry of web analytics originally grew. It is the most widely used website statistics service[1], currently in use at around 57% of the 10,000 most popular websites

    Google public instructions on how to seup Google Analytics in any of your web sites. I have tried to setup myself for my PrestaShop on footer.tpl file based on Google's instructions, but it doesn't work and broke my page and my footer does not showup at all.

    Finnaly I found out that in PrestaShop, there is an module included for Google Analytics. What you have to do it just install it and configure it.

    Here is there instruction to do this:

    1. Login as admin to your back office of PrestaShop
    2. Click Modules tab
    3. Search the page or go to "stat" section of the page to find "Google Analytics" module
    4. Click Install if it is not installed
    5. Click after you install it.
    6. Input your site ID of Google Analytics and save it.
    Example of ID: "UA-16143639-1"

    See sample at:

    Saturday, April 17, 2010

    PrestaShop Tips - How to BCC (blind carbon copy ) all emails to shop owner or specific email address

    In some cases, the shop owner would like to see all emails to be BCC blind carbon copied). In this case, you will need to following code to implement this.

    If you are using PrestaShop 1.3x
    Modify following file

    Modify file name:

    Location 1:
    at oringal line 50 , adding following one line (2nd line is existing)
    $to_list->addBcc($configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME']);
    $to_plugin = $to[0];

    Location 2:
    at original line 54, comment out existing lines and add following lines
    //$to_plugin = $to;
    //$to = new Swift_Address($to, $toName);

    $to_list = new Swift_RecipientList();
    $to_list->addTo($to, $toName);
    $to_list->addBcc($configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME']);

    $to_plugin = $to;
    $to = $to_list;

    If you are using PrestaShop 1.4x
    it is very simple, you only need to create a override of Mail class

    1. create a new file with name Mail.php at following location.


    2. copy following code and paste it into the new created file

    class Mail extends MailCore
    public static function Send($id_lang, $template, $subject, $templateVars, $to, $toName = NULL, $from = NULL, $fromName = NULL, $fileAttachment = NULL, $modeSMTP = NULL, $templatePath = _PS_MAIL_DIR_, $die = false)
    //send to customer
    $ret = parent::Send($id_lang, $template, $subject, $templateVars, $to, $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die);

    //send to Shop Owner
    parent::Send($id_lang, $template, $subject, $templateVars, Configuration::get('PS_SHOP_EMAIL'), $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die);

    //return result
    return $ret;

    Now a ready-made file (PrestaSgop 1.4x only) are available to download from

    PrestaShop Tips - Setting for rounding price

    Here is a tips on how to set price rounding in PrestaShop.

    If you want your price to be rounded or if you don't want your price to be rounded, please following below instructions.

    0. Login to back office as Administrator
    1. Choose Payment Tab
    2. Choose Curenct SubTab
    3. For each currency, edit to modify following properties
    A. Formatting
    B. Decimal

    PrestaShop Tips - Customiize Paypal payment page to use your own logo and image without https

    If you are running eCommerce shopping cart or online shop software like PrestaShop and you are using Paypal, but you don't have HTTPs, in that case you will not able to customize Paypal payment page to use your header image or logo.

    But I found a very tricky way to do customize Paypal payment to use your own logo or header image. Here is how to do:

    [Prepare your logo and get an URL with https]
    First, you will have to get your logo or page header image done. Then upload your image to any website with HTTPS (SSL) enabled that you have access. And get the URL of your logo or header image.

    If you don't have any website to upload, you create an account at Microsoft Windows Live account, then create a Shared Album at Windows Live Photos, and upload your image there and share your image with public. So you will get an URL of your image.

    Note: By default, the URL might be non https, but it works with https too.

    [At your Paypal Account]
    1.From the Account Overview page, click on the Profile sub-tab

    2.Click on the Custom Payment Pages link under the Selling Preferences heading.
    This will take you to the Custom Payment Page Styles page.

    3.From this page, you can Add, Edit, Preview, and Remove page styles,
    as well as make any page style your Primary style

    [At your PrestaShop]
    4 If your image URL is a Shared image from WIndows Live Photos , then the URL might be too long to fit in your Paypal setting page.(It does not allow very long image URL). In that case, you can have it set up at your PrestaShop Paypal module screen.

    You can see the sample by going yo paypal payment page at: