Author: admin

  • Prestashop 1.6 Remove backoffice module update notifications listing

    Modules are updated according to prestashop core file updates. However the currently installed shop may not be compatible with the latest module updates. To prevent accidentally breaking the shop due to incompatible module updates,
    Go to Administration Preferences to disable Automatically check for module updates

    The following help to remove the update notification listing doesn’t remove the module button highlight but it is good enough for now.

    Source: http://www.prestashop.com/forums/topic/319074-solvedhow-to-remove-bo-module-update-notifications/

    I remove the next code from <admin directory>/themes/default/template/controllers/modules/page.tpl:

    Lines 70 to 80

    ****************************************************************************************************

    {if $upgrade_available|@count}
    <div>
    {l s=’An upgrade is available for some of your modules!’}
    <ul>
    {foreach from=$upgrade_available item=’module’}
    <li><a href=”{$currentIndex|escape:’html’:’UTF-8′}&amp;token={$token|escape:’html’:’UTF-8′}&amp;anchor={$module.anchor|escape:’html’:’UTF-8′}”><b>{$module.displayName|escape:’html’:’UTF-8′}</b></a></li>
    {/foreach}
    </ul>
    </div>
    {/if}

    ****************************************************************************************************

  • Prestashop 1.6: Delete all sample data

    1) Remove statistics information from dashboard.
    Click NO to ‘Demo Mode’ on your Dashboard. It’s on the lower right hand side.

    2) Remove all sample and demo orders, catalog etc from the database
    Go to the “Modules > Modules” page.
    Find the “Database Cleaner” module and click its “Install” button.
    You are directly taken to its configuration page (if not, click its “Configuration” button).
    Read and accept the warning, then click the “Delete Catalog” button: it will delete all your products and their attributes, manufacturers, etc.
    Read and accept the warning, then click the “Delete Orders & Customers” button: it will delete all your customers and their orders, carts, etc.
    Click the “Check & fix” button to refine your database integrity constraints.
    Click the “Clean & optimize” button to reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the tables.

    THERE IS NO WAY BACK. Be sure to only click these buttons if you do intend to wipe your database from its default content.

    Source: http://www.prestashop.com/forums/topic/320579-delete-all-sample-data/

  • Prestashop: Free modules

    A list of useful sites that provide free modules. List will be updated as and when I find new ones.

    From Prestashop community
    1) [Free module] display multilingual HTML texts everywhere
    http://www.prestashop.com/forums/topic/172429-free-module-display-multilingual-html-texts-everywhere/

    List of valuable and proven free modules for PrestaShop
    http://www.prestashop.com/forums/topic/233442-free-modules-list-only-valuable-and-proven-solutions-31032014/

    Websites:

    http://www.presto-changeo.com/en/7-prestashop-free-modules
    http://nemops.com/prestashop-101-series/
    http://store.nemops.com/5-free-modules
    http://nemops.com/category/tutorials/tips/

    http://www.prestascope.com/en/
    1) Slideshow LITE
    Link: http://www.prestascope.com/en/free-prestashop-modules/11-slideshow-lite.html
    Description: This Prestashop free module display a simple slideshow on your homepage. Demonstration available on product page.

    2) WordPress in Prestashop
    Link: http://www.prestascope.com/en/free-prestashop-modules/18-module-wordpress-in-prestashop.html
    Description: Module to display in a side block of your shop a customized list of the last articles from a WordPress blog. Best solution to easily create content for your shop and improve your SEO.

    3) Newsletter block subscribers
    Link: http://www.prestascope.com/en/free-prestashop-modules/20-module-newsletter-subscribers.html
    Description: List, manage and export all visitors that have subscribe to your newsletter via the front-office block

    4) Last customers block
    Link: http://www.prestascope.com/en/free-prestashop-modules/21-prestashop-last-customers-block.html
    Description: This module displays a block listing your last customers. Module parametrizable in your shop administration (format of each customer line, optional country flag)

    5) PDF Invoice Plus
    Link: http://www.prestascope.com/en/free-prestashop-modules/24-pdf-invoice-plus.html
    Description: Administration module to add a custom text (plain or HTML) at the bottom of all your PDF invoices or PDF delivery slips. It’s an easy way, for example, to add legal notes to all your invoices.

    6) Shop Scheduler LITE
    Link: http://www.prestascope.com/en/free-prestashop-modules/25-shop-scheduler-lite.html
    Description: There is a free version of this module Shop Scheduler LITE and a paid version Shop Scheduler PRO. This modules allows you to schedule the display of multi-languages HTML texts anywhere in your store. You can also copy complex visual items from your theme like column blocks, product pages tabs, … A must-have to communicate with your visitors: announce special operations, add visual elements or simply tell them you are on vacation!

    7) Clean carts
    Link: http://www.prestascope.com/en/free-prestashop-modules/12-clean-carts.html
    Description: Clean unused carts from database to speed-up web pages display. Check carts contents using multi-criteria search (customer, amount, number of products, carrier, dates, …) Convert carts into validated orders to finalize orders in error (sometimes, bad validations could happen with payment modules)

    8) Pack export
    Link: http://www.prestascope.com/en/non-free-prestashop-modules/23-pack-export-customers-orders.html
    Description: The best pack to export your orders and customers datas as CSV files to be used in Excel.

  • Fonts: Identify, download free TrueType, OpenType fonts

    Download free fonts
    http://ufonts.com/

    Identity a font by uploading an image
    http://www.myfonts.com/WhatTheFont

    “All the fonts you’ll ever need” SXSW 2011 Presentation – David Kadavy

    Home Page


    All of the fonts you’ll ever need
    Adobe Garamond (Humanist)
    Arial (Realist)
    Baskerville (Realist)
    Bodoni (Geometric)
    Futura (Geometric)
    Georgia (Realist)
    Gill Sans (Humanist)
    Helvetica (Realist)
    Lucida Grande (Humanist)
    Museo Slab (Humanist)
    Palatino (Humanist)
    Rockwell (Geometric)
    Tahoma (Humanist)
    Trebuchet MS (Humanist)
    Verdana (Humanist)

  • Google Map: Find the longtitude and latitude of a location

    Updated: http://www.latlong.net/

    Useful page http://universimmedia.pagesperso-orange.fr/geo/loc.htm

    This page uses the Google Maps API to find out accurate geographical coordinates (latitude and longitude) for any place on Earth.

    It provides two ways to search, either by moving around the map and zooming in, or by typing an address if the place is unknown.

  • Server: Wampserver error 403 on named virtual hosts outside of www

    Installed the latest wampserver 2.5 and setup the virtual host files.

    For virtual hosts config, added these lines into
    conf/extra/httpd-vhosts.conf

    Solution: http://stackoverflow.com/questions/15717739/wamp-server-virtual-hosts-configuration

    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80

    Encountered Forbidden error 403 when I typed in the URLs.

    Solution: http://stackoverflow.com/questions/10859271/wampserver-403-on-named-virtual-hosts-outside-of-www

    # Deny access to the entirety of your server’s filesystem. You must
    # explicitly permit access to web content directories in other
    # <Directory> blocks below.
    #

    <Directory />
    AllowOverride none
    Require all denied
    </Directory>

    Since it is a local testing machine, I figured following this step would be ok even though on a live machine it would be insecure.

    There is an alternative answer that doesn’t require “allow all” in the source link.

    After commenting out, faced another issue Internal Server Error
    Solution: http://serverfault.com/questions/529007/apache-htaccess-ifmodule-not-allowed-here

    # Added to allow .htaccess in individual local site folders to override

    <Directory />
    AllowOverride ALL
    </Directory>

  • Tips to Optimise your php.ini File for PrestaShop

    PrestaShop system requirements Summary:
    Web server: Apache 1.3, Apache 2.x, Nginx or Microsoft IIS
    PHP 5.4+
    MySQL 5.0+
    PHP memory_limit 2048M
    upload_max_filesize 100M
    max_execution_time 1000
    post_max_size 100M
    max_input_time -1

    PHP extensions: GD, cURL, SimpleXML, SOAP
    To improve performances: MemCached, mcrypt PHP extension

    Source: http://www.prestatraining.com/12-tips-to-optimise-your-php-ini-file-for-prestashop/

    Memory and Size Limits

    There are times when you may encounter an error because you’ve exceeded a PHP limit that is set on your server.  You can increase these limits in your php.ini file.

    Tip: One common limit that is exceeded is the memory limit.  One case where you may encounter this limit is when you upload a full-resolution image and PHP is unable to load the entire image into memory.  In this case, you could manually reduce the size of the image before uploading it, or you could increase the memory limit by searching for and changing the memory_limit setting in php.ini, or add it if it doesn’t exist:

    ; Set memory limit in megabytes
    memory_limit = 128M

    If you are using shared hosting, which is common with inexpensive hosting packages, try to set the smallest limit you can that stops the memory limit error.  If you set the memory limit too high, it is possible for inefficient code to use up too much memory and cause performance issues for other users on your server.  In that case, your host may shut down your account until you reduce your memory usage.

    If you find yourself needing a high memory limit, it may be better for you to upgrade to a virtual private server (VPS) or a dedicated server so that you don’t have to share the server’s RAM.  You can then increase the RAM as high as you like, as long as it doesn’t exceed the total RAM that is available in the server.

    Tip: The other common limit that is exceeded is the maximum execution time.  One case where you may encounter this limit is when you import a large number of products.  Once the maximum execution time has elapsed, PHP will stop the script and display an error message.  You can increase the maximum execution time by searching for and changing the max_execution_time setting in php.ini, or add it if it doesn’t exist:

    ; Set maximum execution time in seconds
    max_execution_time = 120

    Like the memory limit, if you are using shared hosting, you should try to set the shortest time you can that stops the timeout error.  If you set the maximum execute time too high, it is possible for inefficient code to cause many PHP scripts to be running at the same time for an extended period, using up a lot of the server’s resources.  In that case, your host may shut down your account until you reduce the number of PHP scripts that are running.

    If you find yourself needing a high maximum execution time, it may be better for you to upgrade to a VPS or a dedicated server so that you don’t have to share the server’s resources.

    Tip: When uploading a large product image, you may also encounter the maximum file upload size limit.  In this case, you could manually reduce the size of the image, or you could increase the maximum file upload size by searching for and changing the upload_max_filesize setting in php.ini, or add it if it doesn’t exist:

    ; Set maximum file upload size in megabytes
    upload_max_filesize = 32M

    Set the value to the size of the largest product image or downloadable product you expect to upload through the Back Office.  That way, you will get an error message if you accidentally upload a product image that is too high resolution.  It is best to resize product images to the resolution they are displayed in the Fancybox before uploading to minimise the amount of disk space used on the server.  Downloadable products should also be compressed as ZIP files to reduce the amount of space used.

    Tip: Two more limits that may be encountered are the maximum post size and maximum input time.  One case where you may encounter these limits is when you are saving a large number of module translations.  In this case, you will need to increase the maximum post size and maximum input time by searching for the post_max_size and max input time settings in php.ini, or adding them if they don’t exist:

    ; Set maximum post size in megabytes
    post_max_size = 32M

    ; Set maximum input time in seconds
    max_input_time = 180

    If you are using shared hosting, you should try to set the smallest values you can that stop the error messages.  A value that is too high may use up too much disk space or other resources on the server, causing performance issues for other users on your server.

  • PrestaShop 1.3 BackOffice login refresh issue

    Took over an ecommerce project running PrestaShop 1.3.

    The BackOffice’s unexplained admin login time-out issue was driving me crazy. Tried many solutions to optimise the various settings to no avail. Finally found this solution below which finally worked.

    Solution discovered by http://www.gibni.com/solved-prestashop-backoffice-login-refresh

    Steps here:

    In the file “login.php” under your BackOffice’s folder, on line 55, you have:

    $cookie = new Cookie(‘psAdmin’, substr($_SERVER[‘PHP_SELF’], strlen(__PS_BASE_URI__), -10));

    where the “-10″ value corresponds to the number of letters of “prestashop”, set it to the number of letters of your store’s sub-directory name and your will be back in business again.

    For example:
    if your store is located at: http://www.yourdomain.com/store/
    the word “store” contains 5 letters, so the line 55 in login.php should become:

    $cookie = new Cookie(‘psAdmin’, substr($_SERVER[‘PHP_SELF’], strlen(__PS_BASE_URI__), -5));

  • Language: English Chinese translation for sports terms

    Good list of translations by Baidu users for reference.
    http://wenku.baidu.com/view/f2da5d25bcd126fff7050b59.html

    And Wiki Chinese
    http://zh.wikipedia.org/wiki/%E8%8A%B1%E6%A0%B7%E6%BB%91%E5%86%B0%E7%9A%84%E8%B7%B3%E8%B7%83%E5%8A%A8%E4%BD%9C

  • What To Do When Your Website Goes Down

    Before raising the alarm, do a check to find out if the website is really down by testing the link at http://downforeveryoneorjustme.com/

    Check these useful sites and links to diagnose website down issues in order to arm ourselves with enough information to ask hosting providers to do something about it when they aren’t being very helpful.

    1) Smashing Magazine step-by-step guide:
    http://www.smashingmagazine.com/2010/12/13/what-to-do-when-your-website-goes-down/

    2) Hostgator detailed a good explanation and useful links to 2 free online network tools to aid in dianostics:
    http://support.hostgator.com/articles/hosting-guide/lets-get-started/dns-name-servers/where-can-i-view-if-my-name-servers-were-setup-correctly-and-what-ips-they-currently-use

    3) Online tools
    Leaf DNS http://leafdns.com/
    Network-Tools.com (for advanced users) http://network-tools.com/

    4) VirusTotal
    Created by the guys at Google, an online too that checks for virus that may have brought down the website.
    https://www.virustotal.com/en/