Author: admin

  • Prestashop 1.6: Currency conversion issue Paypal module

    E.g. Default currency USD
    Customer shop with EUR
    Backoffice Payment setting for Paypal module: Shop Default Currency
    Paypal module Configuration options (Express Checkout shortcut (Offer your customers a 3-click checkout experience)
    Express checkout disabled/enabled no difference

    Let’s say, 100 EUR value is 150 USD

    Result:
    At Paypal checkout, 100 EUR becomes 100 USD
    For some reason, there is a bug in Paypal/PS that only changes the currency symbol to the Shop Default Currency without converting the value.

    Solution:
    Download the process.php file from Prestashop forum. It ensures Prestashop only send ONE default shop currency value to Paypal regardless of what currency customer selects (which is what I needed)
    Source: https://www.prestashop.com/forums/topic/268556-solved-currency-not-supported-in-paypal-358/page-2

    Backoffice Payment setting for Paypal module must be set to Customer currency
    Express checkout disabled/enabled no difference

  • mysql: How to copy a database in phpMyAdmin

    How to copy a database in phpMyAdmin

    This tutorial will demonstrate how to copy or duplicate a database in phpMyAdmin.

    Begin by accessing phpMyAdmin via cPanel .

    Select the database you wish to copy (by clicking on the database from the phpMyAdmin home screen).
    Once inside the database, select the Operations tab.
    Scroll down to the section where it says “Copy database to:”
    Type in the name of the new database.
    Select “structure and data” to copy everything. Alternately, you can select “Structure only” if you want the columns but not the data.
    Check the box “CREATE DATABASE before copying” to create a new database.
    Check the box “Add AUTO_INCREMENT value.”
    Click on the Go button to proceed.

    If you click on the home icon, you will notice your new database listed in the left column. If you go inside, you will see the database is a copy of the previous database.
    Source: https://my.bluehost.com/cgi/help/2154

  • Prestashop 1.6: Homepage slider not showing on mobile devices

    Homepage slider shows up on desktop version website but not on responsive default-bootstrap mobile theme. Solution is to go to the Image slider for your homepage plugin configuration and enable it for mobile devices.

    Source: https://www.prestashop.com/forums/topic/345282-my-home-page-slider-is-not-showing-on-mobile-device/ (Answer in post #8)

  • Prestashop: Paypal module v3.5.7 and up IPN validation error

    Change your IPN settings in Paypal from yoursite/modules/paypal/validation.php TO yoursite/modules/paypal/inp.php

    Source: https://www.prestashop.com/forums/topic/271627-paypal-instant-payment-notification-warning/

  • Prestashop: Allow wildcard search

    Source: https://www.prestashop.com/forums/topic/280306-native-prestashop-search-module-issuessolved-casesimprovementsother/
    The search index indexes on individual words and as it is now, wants you to give a search word from the beginning of the word.

    To fix this, we need to edit the file Classes/Search.php

    to fix this, change the code a little like this: (find the lines in the code above and add the % three times:
    
    ...
    ? ' \'%'.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
    : '\'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
    );
    
    if ($word[0] != '-')
     $score_array[] = 'sw.word LIKE \'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\'';
    ...
  • Prestashop: How to make home slider fade in version 1.6

    Open yourdomain/themes/yourtheme/js/modules/homeslider/js/homeslider.js

    and change this:

    if (!!$.prototype.bxSlider)
            $('#homeslider').bxSlider({
                useCSS: false,
                maxSlides: 1,
                slideWidth: homeslider_width,
                infiniteLoop: homeslider_loop,
                hideControlOnEnd: true,
                pager: false,
                autoHover: true,
                auto: homeslider_loop,
                speed: homeslider_speed,
                pause: homeslider_pause,
                controls: true
            });

    to this

    if (!!$.prototype.bxSlider)
            $('#homeslider').bxSlider({
                useCSS: false,
                maxSlides: 1,
                slideWidth: homeslider_width,
                infiniteLoop: homeslider_loop,
                hideControlOnEnd: true,
                pager: false,
                autoHover: true,
                auto: homeslider_loop,
                speed: homeslider_speed,
                pause: homeslider_pause,
                mode: 'fade',
                controls: true
            });

    Source: https://www.prestashop.com/forums/topic/325730-solvedhow-to-make-home-slider-fade-in-version-16/

  • Prestashop: contentBox HTML module

    Description: contentBox is a very simple, very intuitive and very powerful Prestashop Module. With contentBox you can add html blocks to prestashop, JAVASCRIPT + CSS blocks anywhere you want inside Prestashop 1.5 or Prestashop 1.6.

    Link: http://contentbox.org/

    Works great for adding content to prestashop, like organising CMS links in footer etc.

  • Prestashop 1.6: Get id_customer and getDefaultGroupId

    Source: http://stackoverflow.com/questions/16231440/how-to-get-prestashop-current-user-id
    Example:
    $id = (int)$this->context->customer->id;
    $id_default_group = Customer::getDefaultGroupId((int)$id);

  • OScommerce: Quantity Discounts by That Software Guy (CCGV error)

    Source: http://www.thatsoftwareguy.com/osc_quantity_discounts.html#CCGV

    Q: I am also using the CCGV (Coupon Code/Gift Voucher) Contribution. On the Checkout Payment Page, I get the error:

    “Fatal error: Call to undefined method ot_quantity_discount::use_credit_amount() in
    ……../httpdocs/includes/classes/order_total.php on line nnn”

    A: Make the following fix to the file includes/classes/order_total.php.
    Change

    if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class)

    to

    if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class
    && (method_exists($GLOBALS[$class], ‘use_credit_amount’)))

    The location of this line will depend on how many changes you’ve made to the file order_total.php.

  • Prestashop 1.6: how to centralise logo in new theme

    Source: http://www.prestashop.com/forums/topic/318418-solved-center-logo-in-new-theme-16/
    open header.tpl file (located in your theme dir) and remove this code:

    <div id="header_logo"><a title="{$shop_name|escape:'html':'UTF-8'}" href="{$base_dir}">
    <img src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}" width="{$logo_image_width}" height="{$logo_image_height}" />
    </a></div>

    then go to /themes/default-bootstrap/modules/blocksearch/blocksearch-top.tpl and paste code that you removed at the end of the file

    Possible issue: This edit may affect the responsive layout, leaving the logo in the middle of the screen in between Search block and Cart block.