Blog

  • Prestashop 1.6 Upgrading from old version, product images not showing

    Solution: http://www.prestashop.com/forums/topic/271091-images-not-showing-after-upgrading-1550
    Preferences > Images
    1) Set Use the legacy image filesystem to YES
    2) Click Move images
    Wait for the process to complete.
    3) Set Use the legacy image filesystem back to NO

    Should solve the problem of missing images.

  • Prestashop 1.6: enable collation_database for creating tables

    DB tables created with a collation different than the database collation
    http://www.prestashop.com/forums/topic/363458-fresh-install-doesnt-prestashop-respect-the-existing-database-collation/
    Solution: http://forge.prestashop.com/browse/PSCSX-3486

  • Web design: Image optimisation online (animated gif)

    Two good sites to optimize large animated gif files
    https://compressor.io/compress
    http://ezgif.com/optimize

  • Prestashop: Category Quantity Discount

    Apply Quantity Discounts across all products in a category
    Prestashop 1.2 – 1.3 Source: http://www.prestashop.com/forums/topic/75558-mod-quantity-discounts-for-all-the-products-in-the-same-default-category/
    Prestashop 1.4 – 1.6 Source: http://www.prestashop.com/forums/topic/140803-free-module-category-quantity-discount-apply-quantity-discounts-across-all-products-in-a-category/

    Quantity discount is calculated based on the price of product. For promotion mechanics below, if we use the built-in sale price function for 1 product, the quantity discount will be calculated based on the discounted price of 1 product.
    Purchase 1 items 10% off
    Purchase 2 items 15% off
    Purchase 3 items 20 % off
    Purchase 4 items 25 % off
    Purchase 5 items 30% off
    Purchase 6 items 35% off

    So we disable the admin check for minimum more than 1 quantity in order to allow creating quantity discount % for purchase of 1 product.
    change: admin/tabs/AdminProducts.php

    elseif (!($quantity_discount = intval(Tools::getValue(‘quantity_discount’))) OR $quantity_discount <= 1) $this->_errors[] = Tools::displayError(‘quantity is required and must be superior of 1’);

    to

    elseif (!($quantity_discount = intval(Tools::getValue(‘quantity_discount’))) OR $quantity_discount <= 0) $this->_errors[] = Tools::displayError(‘quantity is required and must be superior of 0’);

  • Printing paper quality gsm explained

    10–35 gsm tissue paper
    35–70 gsm lighter textweight
    70–100 gsm medium textweight
    100–120 gsm heavy textweight/light cardstock
    120-150 gsm regular cardstock
    150-200 gsm heavy cardstock
    >200 gsm super heavy cardstock

    Source: https://answers.yahoo.com/question/index?qid=20080715103223AARVYHb

  • CSV to SQL Converter

    Microsoft excel can’t seem to export csv with double quotes anymore =_=, can’t import csv directly using phpmyadmin.

    Found this really site that helps to make the conversion from csv to mysql statements.

    http://www.convertcsv.com/csv-to-sql.htm

  • mysql: Change character encoding for database and tables

    http://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8

    Use the ALTER DATABASE and ALTER TABLE commands.

    ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;
    ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    If not possible,
    Export structure and data with phpmyadmin
    Custom – display all possible options
    Database system or older MySQL server to maximize output compatibility with: MYSQL40
    Syntax to use when inserting data: include column names in every INSERT statement (Example: INSERT INTO tbl_name (col_A,col_B,col_C) VALUES (1,2,3))
    After export, remove all TYPE=InnoDB from the text file (.sql)
    Create new database in utf8_unicode_ci;
    Import the .sql file and tables created will inherit utf8_unicode_ci.

  • Excel: Delete blank rows quickly, change numbers to text

    Source: http://www.theexceladdict.com/_t/t031008.htm

    Change number to text
    Format Cells > Number > Custom > 0

    Suppose you receive a list of data that contains blank rows that you want to remove without affecting the order of the list. This technique will allow you to delete all rows that have blank cells in a particular column. Here’s the fastest way to do it.

    1. First, before you make any drastic changes to any workbook always make sure you have a backup copy or a recently saved copy in case you need to restore the original data .
    2. Now, select the cells in one column from the top of your list to the bottom.
    3. Make sure that all the blank cells in this selected range are the rows you want to delete.
    4. Press the F5 key on your keyboard (or select Edit, Goto).
    5. Click the Special… button.
    6. Click the Blanks option and click OK. This will select all blank cells in the range you had previously selected.
    7. Now choose Edit, Delete, select the Entire Row option and click OK.
  • Prestaship 1.3 Force default currency for checkout

    Source: http://www.prestashop.com/forums/topic/9473-module-force-currency/

    Note: Error in amount shown in store owner email but is correct in customer email. Use with caution.

    in init.php before:

    $currency = Tools::setCurrency();

    add:

    $cookie->id_currency = intval(Configuration::get(‘PS_CURRENCY_FRONT_DEFAULT’));

    in admin/tabs/AdminCurrencies.php after:

    ‘PS_CURRENCY_DEFAULT’ => array(‘title’ => $this->l(‘Default currency:’), ‘desc’ => $this->l(‘The default currency used in shop’), ‘cast’ => ‘intval’, ‘type’ => ‘select’, ‘identifier’ => ‘id_currency’, ‘list’ => Currency::getCurrencies()),

    add:

    ‘PS_CURRENCY_FRONT_DEFAULT’ => array(‘title’ => $this->l(‘Default currency front:’), ‘desc’ => $this->l(‘The default currency used in front shop’), ‘cast’ => ‘intval’, ‘type’ => ‘select’, ‘identifier’ => ‘id_currency’, ‘list’ => Currency::getCurrencies()),

    Next go to admin->payment->currencies and set up your default shop currency. Customer CAN change the currency if needed.

  • WordPress plugins: downloading old versions

    Go to the plugin page hosted at wordpress.org

    https://wordpress.org/plugins

    Click on the Developer tab and you’ll find the list of previous releases.