Tag: prestashop

  • Prestashop: remove google maps from order page in backoffice

    https://www.prestashop.com/forums/topic/336592-remove-google-maps-from-order-page-in-16-slowing-down-crashing-siteserver/

    Put the modified file in the override/controllers/admin
    After that, you need to trigger the regeneration of the /cache/class_index.php file. This is done simply by deleting the file. It is the same when manually removing an override: in order to reinstate the default behavior, you must delete the /cache/class_index.php file.

    QN: Anyone know the best way to remove the google maps module lookup for the customers address in the order page in 1.6. Or a way to remove google maps all together from prestashop. We have a user in china that cannot access the order page whenever the china government tries to block google and its services (they do that every time something sensitive comes up in western news).
    ANS:

    controllers/admin/AdminOrdersController.php

    find and then comment out as follows:

    public function setMedia()
    {
    parent::setMedia();

    $this->addJqueryUI(‘ui.datepicker’);
    $this->addJS(_PS_JS_DIR_.’vendor/d3.v3.min.js’);
    // $this->addJS(‘https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false’);

    if ($this->tabAccess[‘edit’] == 1 && $this->display == ‘view’)
    {
    $this->addJS(_PS_JS_DIR_.’admin_order.js’);
    $this->addJS(_PS_JS_DIR_.’tools.js’);
    $this->addJqueryPlugin(‘autocomplete’);
    }
    }

  • Prestashop 1.7: Smarty error blank page on front end if adding new language manually

    http://forge.prestashop.com/browse/BOOM-3486

    Error: When adding a new language in the backend (localization->languages), there is no option to enter the locale, resulting in an empty locale field in the table ps_lang.
    This results in a smarty error on frontend when selecting the new language:
    {code}
    SmartyException in smarty_internal_templatebase.php line 129:
    Unable to load template file ‘\index.tpl’ {code}

    User’s suggested solution:
    As soon as I manually add a locale in the database, the error goes away.
    Table: ps_lang
    Add the missing locale to the table

    Normally adding/importing a new language should go to: Translation > Add/Update a new language (or through the localization page)
    But there are times when languages may be required to be added manually and this causes the issue.

  • Prestaship 1.6 Fix for Contact form invulnerable to spam bots

    Contact form is vulnerable to spam bot. Captcha does not help in this case.
    Fix here – https://github.com/PrestaShop/PrestaShop/pull/8168/files

    Useful information on how to build an anti spam bot contact form without captcha
    http://www.nfriedly.com/techblog/2009/11/how-to-build-a-spam-free-contact-forms-without-captchas/

    Update:
    Doesn’t work well against some automated spammers. Change the friendly url of the contact-us to something else and it stopped the spamming completely.
    https://www.prestashop.com/forums/topic/442633-add-recaptcha-to-prestashop-version-16014-for-free/?page=5
    https://www.prestashop.com/forums/topic/673164-how-do-i-integrate-recaptcha-v2-into-prestashop/?tab=comments#comment-2697948

  • Prestashop: Remove unnecessary bank details from bottom of PDF invoice

    Solution:
    unhooking the paypal module from the displayPDFInvoice hook will also work.

    If bank details are required, after unhooking, install the module from this post https://www.prestashop.com/forums/topic/119664-solved-generate-pdf-invoices-bank-wire-payment/?do=findComment&comment=2530505

    Works for Prestashop 1.6

    Source: https://www.prestashop.com/forums/topic/119664-solved-generate-pdf-invoices-bank-wire-payment/?p=2498597
    and
    https://www.prestashop.com/forums/topic/560290-upgrade-1617-problem-with-invoice-pdf-template/?p=2541899

  • Prestashop: Export Pro for products, categories, combinations (paid module)

    Recommended: https://www.prestashop.com/forums/topic/429028-module-export-pro-csv-export-products-combinations-customers-categories-orders-addresses/

    Free version with less features: https://www.prestashop.com/forums/topic/37900-free-module-products-export-module-v253-updated-23032016/

  • Prestashop: Add editable product date added field in admin (prestashop 1.6)

    Source: https://www.prestashop.com/forums/topic/126518-change-date-for-products-in-bo-date-add/?p=1947106

    Add it to line 134 of: admin folder\themes\default\template\controllers\products\informations.tlp

    The if is added in case this is a new product and there is no existing date added data

    {if $product->date_add}
    <div class=”form-group”>
    <label class=”control-label col-lg-3″></td>
    <span class=”label-tooltip” data-toggle=”tooltip”
    title=”{l s=’Change date for “product new from”.’}”>
    {$bullet_common_field} {l s=’New from’}
    </span>
    </label>
    <div class=”col-lg-3″>
    <input type=”text” id=”date_add” name=”date_add” value=”{$product->date_add|escape:html:’UTF-8′}” />
    </div>
    </div>
    {/if}

  • Prestashop: Editing orders from customers or after delivered status

    Source: https://www.prestashop.com/forums/topic/276384-solvedunable-to-modify-customer-order-from-backoffice/?tab=comments#comment-1388383

    Back Office—->Orders—>Statuses—>Preparation in Progress(Or any status which is set as default), I unchecked “Show Delivery PDF.”

    Status should not have “delivered” option.

    In table ps_order_history remove this order’s “Delivered” state

    https://www.prestashop.com/forums/topic/276384-solvedunable-to-modify-customer-order-from-backoffice/#entry1388383

    (Not sure if necessary, should test)
    In tables ps_orders/ps_order_invoice
    delivery_number change to 0
    delivery_date change to 0000-00-00 00:00:00

  • Prestashop: Diagnoising 500 internal server error

    Source: https://www.prestashop.com/forums/topic/190303-error-500-internal-server-error-on-all-pages-except-for-admin-front-page/?p=1533337

    if you’ve got internal server error = turn on error reporting – then instead of this message you will see detailed information what and where doesnt work.

    open config/defines.inc.php

    find this line define(‘_PS_MODE_DEV_’, false);
    change to look like this: define(‘_PS_MODE_DEV_’, true);

  • Prestashop 1.6: PDF invoice error in large orders

    For some reason, when there are many products in an order, the PDF invoice generated by Prestashop backoffice and user front-end does not display all the products ordered.

    In this case, there were 49 products.

    Opening the generated PDF in Acrobat Reader triggers a warning message about it unable to display correctly and other PDF readers had the same issue.

    Tried searching for solutions that suggested making changes to files in classes/pdf/PDFGenerator.php and tools/tcpdf/tcpdf.php, etc, but none worked.

    An unexpected workaround.

    After downloading the same PDF file, I used Chrome browser to open it and it displayed properly WITHIN the browser! No formatting error or missing content. I posted the same file to my gmail account and opened it without a glitch too.

    I generated another PDF file by printing the one displayed correctly by Chrome browser using PrimoPDF (http://www.primopdf.com/) and the new file worked like a charm.

    Although I didn’t find a solution to fix the issue in Prestashop, this workaround will do for now.

  • 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)