Archive for the ‘PrestaShop’ Category

 

PrestaShop 1.6 – unable to remove product from cart [solution]

If it’s not possible to remove an item from the cart in PrestaShop 1.6, try this solution:

Advanced settings -> Performance -> Move JavaScript to the end = NO

The problem seems to occur in Chrome and Microsoft Internet Explorer but not in other browsers like Firefox for example.

Share

Posted by on May 20th, 2017 No Comments

PrestaShop and PayPal payment error after checkout – 699 kr was paid instead of 699 kr [solved]

A client running PrestaShop 1.6.1.13 with PayPal payment module version 3.11.4 had problems after checkout of orders with an error message saying “699 kr was paid instead of 699 kr”. It turned out it was a rounding error where PrestaShop and PayPal use different methods of calculating the rounding.

The solution suggested was:

  • Go to preferences -> General
  • Rounding rule: Round to infinity when the value is halfway (recommended)
  • Rounding Type: Rounding for each element

This solved part of the problem. However, the client applied a store wide discount of 30%, causing a product (for example) costing 999 kr to checkout at 699 kr. To be precise, 999 kr minus 30% discount is 699,30 kr, but the 0,30 was rounded off. The same problem as mentioned above occured even when putting one piece of this item in the cart and checking it out.

It turned out that the theme used (jms_homewares version 1.0) only display prices in full kronor, without any decimals, independent of the settings regarding decimals in the Preferences -> General tab. In this case the settings was set to display 2 decimals. Setting it to 0 decimals solved the problem. I should mention that I am not sure if this is standard behavoiur of jms_homewares or if it has been modfied by the website developer. However, in this case setting it to display 0 decimals made everyting work without errors.

Share

Posted by on May 20th, 2017 No Comments

PrestaShop PHP error Cannot redeclare class BlowfishCore on Ubuntu 14.04 server [solution]

Edit /etc/php5/cgi/conf.d/05-opcache.ini. Add:

opcache.enable=0
opcache.enable_cli=0

Share

Posted by on August 26th, 2015 No Comments

Change sorting / position of products in PrestaShop featured section on the start page

  1. In the PrestaShop backoffice (admin), go to Catalog -> Products
  2. Above the product list, tick the “Filter by category”
  3. Select the “Home” category in the category list that drops down under the “Filter by category”
  4. Now far to the right you will find a “Position” column where you can use the arrows to move the products up and down
Share

Posted by on January 4th, 2015 No Comments

Copy of PrestaShop default-bootstrap theme from 1.6.0.6 doesn’t display submenus after upgrade to 1.6.0.9

I made a customized theme by copying the PrestaShop default-bootstrap theme in version 1.6.0.6. After an upgrade to 1.6.0.9 the theme will no longer show the dropdown submenus.

The reason is that after the upgrade, the default-bootstrap has been updated but my customized copy hasn’t causing some needed JS files not being loaded.

The quickest solution is to go into Advanced Parameters -> Performance and enable Move JavaScript to the end

 

I found information about the problem here.

 

Share

Posted by on September 6th, 2014 No Comments

Multiple attributes / combinations in PrestaShop

Here is the documentation on how to add attributes / combinations to a product in PrestaShop -> http://doc.prestashop.com/display/PS16/Managing+Product+Attributes

If you plan on using multiple attributes for a product, like size and colour, do use the combinations generator and select both the possible sizes and colours at the same time. If you add them by hand one by one you risk ending up with a scenario where only the first attribute is visible in the shopping cart and on the resulting order (like the size but not the colour), i.e. you will have to contact the customer to ask about the other attribute(s).

By using the generator PretaShop will create the all the necessary combinations for you, i.e. size 1 + colour 1, size 2 + colour 1, size 1 + colour 2, size 2+ colour 2 and so on.

 

Share

Posted by on August 25th, 2014 No Comments

PrestaShop categories block empty after migrating from osCommerce

To migrate an osCommerce webshop to PrestaShop 1.5 I used the migration module from Presto Changeo. It worked just as specified, importing categories, products and customers from a running osCommerce webshop. One important thing before you start is that the module will empty all your existing customers, categories and products in your PrestaShop so make shure you are using it on a new shop.

I’ve been working on the PrestaShop installation for a while so it was not a fresh 1.5 install but had been upgraded from 1.3 to 1.4 and then 1.5 (yes it has not been in production before). This is probably the cause of my problems that occured.

The module works fine even if the osCommerce is running on a different servern than the PrestaShop. I small php file must be uploaded on the server running the osCommerce. The import can take several hours especially if there are many products and images. The script can be running in the background emailing you the progress each 5 minutes. If the mail stops coming or you get an error 500 when running in the foreground you simply must go into the module and click resume each time an error 500 occurs until the import is completed.

After the import I could see the categories, products and customers in the back office but the front office blockcategories didn’t show any products. I found that the problem probably was caused by the support for multistore introduced in PrestaShop 1.5.

Solution: 

  1. You need to access the PrestaShop MySQL databas using phpMyAdmin.
  2. Open the table ps_categories. The id_category 1 is the root category. Find which id the home category has (it will have the field is_root_category set to 1). The home category is probably id_category 2.
  3. Open the table ps_configuration and find the key PS_ROOT_CATEGORY and make shure it has value ‘1’ (the id_category of the root category).
  4. Find the key PS_HOME_CATEGORY and make shure it has the value of id_category for the home category, probably ‘2’.
  5. Go to the back office, in the preferences menu go to the general settings. Activate multi store.
  6. In the advanced parameters menu, go to Multi store. 
  7. Click on the default group and edit your store. Select the Home category as Root category. Save the store.
  8. Go back in the preferences menu general settings and disable the multi store.

Now the categories should display in the blockcategories in the front office. 

Share

Posted by on August 30th, 2013 2 Comments

PrestaShop subcategories not visible in blockcategories

PrestaShop subcategoriesAfter upgrading to PrestaShop 1.5.3 (and 1.5.4) the subcategories where not showing up anymore in the categories block. The solution was quite simple: 

Just deinstall the categories block in the modules section and then install it again. After reinstalling, it will probably be necessary to adjust the block position. 

Share

Posted by on April 15th, 2013 1 Comment

Getting “An error occurred while updating object. lang ()” in PrestaShop

If you get the error message "An error occurred while updating object. lang ()" when updating a language in PrestaShop, this is caused when the system doesn’t have permissions to write in the .htaccess-file in your root directory.

If the file does not exist, just create an empty .htaccess-file and make sure it is writeable by the user running the webserver process, for example by issuing: 

chmod 666 .htaccess

Share

Posted by on June 3rd, 2011 4 Comments

Moving a PrestaShop 1.4 webshop

 When moving a PrestaShop version 1.4 webshop to a new domain name (from a development server to a live site for example) you must do the following: 

  1. Make sure all directories are writeable according to the PrestaShop installation instructions.
    Don’t forget that the files in config directory must be writeable as well as the entire cache directory structure. All files and directories in tools/smarty/compiletools/smarty/cache, tools/smarty_v2/cache and smarty_v2/compile must also be writeable.
    Internal server error 500 is a sign that these directories or files are not writeable.
  2. Update the file config/settings.php regarding PS base URI (if that will change) and the database settings.
  3. After importing the database on the new server use a tool like phpMyAdmin to access the database.
  4. Login to the Back Office of your shop on the new domain and go to Settings -> SEO & URLS and update the domain name for the shop (two fields). If this is not successful use the steps 5-7, otherwise go to step 8.
  5. Find a table named ps_configuration.
  6. Find the records PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL
  7. Update the values with your new domain name. You should enter just the domain name, no leading http:// or trailing path to subirectories (if your shop is located in a subdirectory, that should be entered in the PS base URI in step 1).
  8. If you use .htaccess and robots.txt files, go to Tools -> Generators and regenerate them.

 

Share

Posted by on May 9th, 2011 No Comments