Top 10 PrestaShop Configuration Issues and their Solution

PrestaShop is an open source shopping cart e.g. anyone with a knowledge of PHP, MySQL and CSS can make changes in it to adopt it for the own purpose. PrestaShop was started in 2007 and now it’s latest version 1.7x is usable on ecommerce stores. Users have reported that still 1.7x is still not stable as compared to 1.6x i.e. users are facing bugs and errors while configuration and tweaking. Therefore, being a reputed company in PrestaShop, FMEModules always recommend its customers to stay on 1.6x until more stability will be added to the 1.7x.

Our today post is focused on solving the PrestaShop configuration issues for getting different functionalities in PrestaShop. May be you are having the same issue and solution of this tutorial may help you like a charm. So given here Top 5 PrestaShop Configuration Issues and their Solution;

Question No. 1: Hi, I want to know that what are the ways to enable error reporting in debugging mode for different versions of PrestaShop?

Answer: For PrestaShop 1.7, go to Advanced Parameters > Performance and turn in ON.

For PrestaShop 1.5.3-1.6, open file: config/defines.inc.php  (using FTP or hosting control panel)

change false-->true:

define('_PS_MODE_DEV_',false);

define('_PS_MODE_DEV_',true);

For PrestaShop 1.4-1.5.3

  • open file: config/config.inc.php  (using FTP or hosting control panel)
  • change off -->on

@ini_set('display_errors','off');

@ini_set('display_errors','on');

Note:

  • When done, don’t forget to set it OFF.
  • The better way to check errors is to sign in into your hosting area and see PHP error log there
  • You have to use a FTP program to enable the PrestaShop error reporting

Question No. 2: Hi, I am using PrestaShop 1.5.3.1 and I want to find the email addresses of customers who have bought some product from my store. Which SQL query I have to run in this case?

Answer: You can run this query anywhere you want in the database

SELECT C.email FROM ps_customer C 

INNER JOIN ps_orders O on C.id_customer = O.id_customer

INNER JOIN ps_order_detail OD on O.id_order = OD.id_order

WHERE OD.product_id =3

Change the product ID as per you own listed products i.e. use that ID for which you want to check the email address.  This query will simply return you the customer ID who have bought that product. Moreover, if you want to find email address of customers who bought other products, you can use the IN command for this purpose like this;

SELECT C.email FROM ps_customer C

INNER JOIN ps_orders O on C.id_customer = O.id_customer

INNER JOIN ps_order_detail OD on O.id_order = OD.id_order

WHERE OD.product_id IN (3,45,47,94,102)

Question No. 3: Hi, I have uploaded the CSV of images and the image files have very huge sizes. I think that PrestaShop saves these files somewhere else in its database. Can I erase the huge sized image files so that that will not slow down the website server?

Answer: Yes, you are right that PrestaShop saves these files once uploaded by you through CSV. So you can delete these files from server. However, if you want to change the images sizes, that will be not possible after deletion.

Question No. 4: Hi, I am trying to upload the image CSV files and mentioning drop box address in the image fields as I want to upload images from dropbox. This does not help me in uploading the image files. Please help me where to upload the address so that will help in image csv import?

Answer: You have to get a direct image link from dropbox. Yes, you have to paste the address in image field. Just add &raw=1 at the end of dropbox link and that will work for you.

Question No. 5: Hello, I want to change my shop to multi store. Can I use “share available quantities” without resetting the product quantities to zero.

Answer: Yes, you can do that with a simple tweak. Only you have to change reset function classes/stock/StockAvailable.php to:

public static function resetProductFromStockAvailableByShopGroup(ShopGroup $shop_group)

{

 

                             if ($shop_group->share_stock) 

                             {

$shop_list = Shop::getShops(false, $shop_group->id, true);

if (count($shop_list) > 0) {

$id_shops_list = implode(', ', $shop_list);

return Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'stock_available SET id_shop=0,id_shop_group=1 WHERE id_shop_group=0');

} } else {

return Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'stock_available SET id_shop=0,id_shop_group=1 WHERE id_shop_group=0');

}

}

 

it's working with PS 1.6

Question No. 6: Hello, I am setting up my new store. I tried to do a test purchase, signed in as a customer and sends an order. I used the contact form and used the order ID and product. But when the email received at admin address, it just contains the information of email address of client and the message. How can I get the full information?

Answer: I had the same problem with 1.5. To fix it:

  • Go to /mails/en/.
  • Open contact.html, contact.txt, contact_form.html, and contact_form.txt.
  • Add {id_order} wherever you want the order reference.

Question No. 7:Hi, I want to add the customer message that he sends at the checkout to the PDF delivery slip.

Answer: You have to use the message class. The following code in the message class will help to return the message in the delivery slip.

$result =Message::getMessagesByOrderId($order->id)

Question No. 8: Hi, I am new in PrestaShop and I want to edit the navigation bar in PrestaShop 1.7 like adding or removing the menus and sub menus.

Answer: go to modules > modules > installed modules and you will find a module "wtmegamenu" which is helpful to manage the navigation menu. For renaming the items of menu, you have to go to Go to Catalog -> Categories and do the rewriting there.

Question No. 9: Hi, I installed image mapping on my store and used the extra menu for version 1.6. I have mapped the image with the product. When I go to the category, I hover over it and link appear as a popup but It will not open on left click. However, I right click and open it in a new page, it will work so. How to solve this issue?

Answer: You have to switch "fopen" option "off" to "on" in php scripts on the server. You will find this under the setting of yours sever of hosting.

Question No. 10: Hi, I want to add a line under the shop name. How it is possible?

Answer: This is possible through editing PHP code in AddressFormat class.

Note: These questions are answered by top community developers and do not reflect FMEModules.