Thursday 11 June 2015

How to configure Prestashop to work with another domain?

Prestashop, like many other applications out there, works based on a domain name. In case you wish to use your Prestashop application with a different domain you should change the PS_SHOP_DOMAIN and

how to add new link/block in navigation bar/

Navigation menu is controlled by top horizontal menu module, there are way of add , remove menu item like page, categories and costume links.

How to On Error reporting of prestashop v1.6 v1.5 v1.4 v1.3

if your website encountering some problems (white page, prestashop internal server error, some other problems) it's necessary to turn on error reporting. With this feature you will see what exactly doesnt work and

Generate the .htaccess file with PrestaShop’s back office, to get Friendly URL

if your website encountering some problems (white page, prestashop internal server error, some other problems) it's necessary to turn on error reporting. With this feature you will see what exactly doesnt work and

Add a link or an image to customize the mails sent to your customers

PrestaShop enables you to automatically send a large number of mails to your customers (order confirmations, site subscriptions, out of stock notifications, etc.). It might be useful to customize these mails: adding images, links to

Issue log in after deleting the English language pack

If you deleted the English language pack from your shop install, you can have issues connecting to your back-office again.

How to Enable Prestashop Error Messages?

Locate on your computer, or directly from your web server’s FTP, the file config/config.inc.php in your store’s directory, and scroll down to line 28:

How to Create a New Page or Template?

You can also create your own .tpl file (located in your theme directory), where you can insert your own HTML tags, and create a .php page (at the root of your shop) which will call the .tpl file.
Here is an example:
First, your_page.php:
<?php
include(dirname(FILE).’/config/config.inc.php’);
include(dirname(FILE).’/header.php’);
$smarty->display(PS_THEME_DIR.’your_page.tpl’);
include(dirname(FILE).’/footer.php’);
?>
With that, your_page.tpl contains your HTML code.

How to change the maximum size of uploaded files in PrestaShop?

To change the maximum size of the uploaded files in your server, you have to edit the php.ini file for your PHP install. This can only be done if you do have access to your server’s PHP configuration files. If not, ask your host.

How to add a link or an image to customize the mails sent to customers?

PrestaShop enables you to automatically send a large number of mails to your customers (order confirmations, site subscriptions, out of stock notifications, etc.). It might be useful to customize these mails: adding images, links to survey forms or information pages (blogs, news, etc.).
Let’s say your company wants to customize the e-mail sent automatically to customers after a purchase, in order to redirect them to a survey form.
To add a link in the mails sent to your English-speaking customers, you have to:
1. Go to the /mails/en directory from your shop root.
2. Edit the HTML template relative to the mail you want to modify: for instance, order_conf.html is the e-mail sent for new orders.
3. Insert the link to the survey right in the HTML code (static):
<a href=”http://www.myshop.com/survey.php”>Click here if you want to participate to our survey !</a>
or a dynamic link with your logo:
<a href=”{shop_url}” title=”{shop_name}”><img alt=”{shop_name}” src=”{shop_logo}” style=”border:none;”></a>
4. (Optional) To change the default color (which is pink: #DB3484), change the hexadecimal value to your preferred color value.
5. Save the file.
Now the link will be added in every new mail sent after a purchase.

How to the error message display on in case of unexpected blank pages?

In prestashop  back-office and/or front-office start displaying a blank page  or incomplete page regularly without any error message, it is necessary to activate the display of the PHP errors in order to understand the problem.
This is done in your PrestaShop installation's /config/defines.inc.php file. You should edit the following line:
define('_PS_MODE_DEV_', false);
...and change it into:
define('_PS_MODE_DEV_', true);
Now browse your store's pages again. PrestaShop will display all the relevant error messages (if any), which should help you solve the issue.
Once the issue has been fixed, you must revert your changes: edit the /config/defines.inc.php file again and put false back as the value for the_PS_MODE_DEV_ constant.

How to regenerating a password manually in prestashop

As situations where nothing happens when you request a new password, and it doesn't work. There can be a number of reasons why this would happen, but the important thing is to be able to log in prestashop user and admin again.
This is will require you to access your database, using phpMyAdmin for instance.
You will have to follow the following procedure:
  1. Open the /config/settings.inc.php file, from your shop's root directory. Find the line containing "_COOKIE_KEY_". Copy the cookie content (without the quotes): it is the MD5 for your original password.
  2. You now need to generate a new MD5 hash for your password:
    1. Go to http://www.miraclesalad.com/webtools/md5.php.
    2. Paste the value of "_COOKIE_KEY_" in the text-field, and right after it, add your desired password. For instance, xykxB41JrEacRIoZxDioPNRmKeuO3ixCLygNxBAkeOkAHf2YUVESuT9jMYPASSWORD, where the cookie ends with T9j, and the desired password is MYPASSWORD (it can be anything you want).
    3. Click on the "md5" button: this will produce a MD5 hash of the text-field's content. Copy it.
  3. You now need to put this hash into your database:
    1. Open you shop's database using phpMyAdmin. If you don't know how to use phpMyAdmin, ask your webmaster, or your host.
    2. Open the pw_employee table, find the row corresponding to your account (it should feature your first name, last name, and e-mail address), and click its "Edit" button.
    3. Find the passwd field, and paste in the MD5 that you just generated.
  4. Log in to your back-office with the email listed in the same table, and the desired password that you used above (MYPASSWORD). This will generate a new cookie key.
If it still doesn't work, use phpMyAdmin to access the ps_shop_url table and check the value of the main shop, whose id is 1. It should contain the shop's file path:
  • If your shop is at the root of the server, this variable should contain "/".
  • If your shop is in a sub-directory, it should contain it. For instance, if it's at "http://www.mywebsite/shop/", then the variable should contain "/shop/".
If all fails, contact the PrestaShop support team at http://support.prestashop.com/en/.

How to Debug in Prestashop - Blank page problem after install Prestashop 1.5 ?

For Debug Prestahop 1.5, set the define variable _PS_MODE_DEV_  set to 'true' on line 28 in file config/defines.inc.php. 

/* Debug only */
define('_PS_MODE_DEV_', true); 

Then,  refresh  website to see debug information. See below:  

Warning: base64_decode() has been disabled for security reasons
/home/pioneerm/public_html/prest/classes/Rijndael.php on line 35
  
its mean that, function base64_decode() should be enabled. Just contact hosting provider to confirm enabling this function

How to edit the php.ini file to fix the white screen error

  1. step 1: Log into your cPanel interface.
  2. step 2: Once in the cPanel, click on the File Manager icon located in the Files category.
  3. step 3: Once in the File Manager navigate to the folder where PrestaShop is installed. This is normally the public_html folder.
  4. step 4: Locate and then open the php.ini file for editing.
  5. step 5: Scroll or search through the file and locate the memory_limit setting. It is normally set to 32M, which means 32 MB. Change the setting to something larger, say 128M.

How to create multiple shops and sub shop

Managing Multiple Shops

Multiple shop and sub shop both are same procedure 

One of the main features of PrestaShop 1.5 is called "multistore", meaning the ability to manage multiple shops from the same back-office.
Thanks to this feature, you can manage many customized shops, which share many common elements. For more efficiency, you can even create groups of shops.

How to decide if you need the multistore feature

You may find yourself wanting to use the multistore feature, when in fact it is not necessary. For instance, if you want a multilingual shop, or if you need to use more than one currency, or if you would like to have a different graphic template for each category.
Here are two questions that you should ask yourself before deciding to enable the multistore feature:
  1. Do you want your shops to have a different price for the same product (besides special discounts for a client or group of clients).
    If the answer is 'yes', then you need to use the multistore feature.
  2. When a client buys from one shop, would you want him or her to not have access that shop's order history and invoices from the other shop (even if the client have the same login credentials on both shops).
    If the answer is 'yes', then you need to use the multistore feature: the shops will not share their carts and orders, and customers putting items in their cart for shop 1 will not see these items in their cart for shop 2.
If the answer is 'no' to both questions, then the multistore feature is not for you.

One back-office to rule them all

When the multistore feature is enabled for your PrestaShop 1.5 installation, many aspects of PrestaShop become customizable on a per-shop or per-shop-group basis.