Prestashop incorrect order time solution 1

It won’t take long to notice that when an order is placed on your store the time of the order is incorrect, unless you live in Paris France. In Prestashop v1.2, you can go to the Preferences tab and then change the timezone at the bottom. In v1.1, you must change a line near the top of from the following to whatever timezone you want.


A list of the available timezones can be found here

Prestashop order product name summary is truncated in Admin

On the order detail page where the products are listed, you may have a some data loss. Apparently prestashop’s method of storing the selected options and values for an ordered product is to shove them all into the product name like this:

PS 100 – 1. Operating System: B. Windows 2003 – 64bit, 2. Memory: D. Additional 768MB ($60/month), 4. IP Addresses: G. 6 Additional IP Address ($6/month), 5. Control Panel: D. Plesk Unlimited domains ($20/month), 6. Additional So

Unfortunately the product name column is limited to 255 characters and we experienced some data loss as it was cut off. Oscommerce uses junction tables to associate the ordered options and values to the ordered product whereas prestashop does not.

I didn’t expect that an order system developed ten years after oscommerce would actually be a few steps behind 😉

How to delete an order with Prestashop 25

You probably found this blog post because you’re wondering the same thing I was this morning… the ability to delete an order is a very basic function and yet, I cannot find the delete button! Well, the delete button is is not a permission, but instead an option you must turn on by modifying the code. WTF!?! A lot of people that don’t speak PHP will not be happy. Anyway, the delete button will appear at the bottom of your order list by adding the following line of code in the construct of the AdminOrders class.

1. In the renamed admin directory of your store, go to tabs/AdminOrders.php.
2. Around line 28 below $this->colorOnBackground = true; , add $this->delete = true; so it looks like this –

class AdminOrders extends AdminTab
	public function __construct()
	 	$this->table = 'order';
	 	$this->className = 'Order';
	 	$this->view = 'noActionColumn';
		$this->colorOnBackground = true;
		$this->delete = true;

Prestashop “an error occurred while updating object cms”

A blank error could appear when you use the CMS editor in PrestaShop. It says “an error occurred while updating object cms ()”.


Apparently they filter certain words to prevent SQL injection, which is a good idea, but what I don’t understand is why it needs to be in the  of Prestashop. I can understand if it were a comments box or something on the front end, which really doesn’t need to be a rich text editor, but on the back end? I suppose if somebody got into the  of your store this would help, but either way they’d be doing a lot of damage by just pointing and clicking.

If you get this error, check your content for the following words and replace them with something different: union, load_file, outfile, dumpfile, escaped, terminated, cascade, infile, x509, trigger, revoke

Prestashop Combinations Suck 11

There are a lot of great features with Prestshop, but as of version 1.1 their idea of product options and values, attributes, or combinations (whatever you want to call them) is not good.  If you have five or six different options with four or five option values each, you cannot use this solution.  Why?  Let me show you….

Use the “generator” to assign attributes to a product.  Below is the full screenshot of all the attributes assigned so far.  Notice the green box at the top that says “4900” products created.  I don’t know why they call it “products” b/c it’s really some sort of product/attribute combination.


The attribute tables in the database contain a ton of records!


Add another option with two values.


And the table record counts jump to 9800 and 58802!  How the can this be?  I only added one more option and two values?!?!


Add one more option value and things go boom.  It’s broke.


The database says…


What happened?  Prestashop was successful at increasing the number of rows in the product attribute table again by 50%, but when it tries to insert 117,000 records into the product_attribute_combination table things don’t work.

I used my debugger and stepped though the code in of the generator page in attempt to figure out the problem.  The code loops through all the records and builds an array of objects with 18 properties each for all the combinations, except that the array contained well over 100000 objects!  This took forever and locked up my machine.  Additionally, when you have this many combinations, the product detail page that the customers use takes about 15 seconds to load.

Why would you attempt to store every possible combination of a product and all its options and all its values in the database?????  This is not using a relational database as it is supposed to be used!  You build relationships, not just store data!  Prestashop is great in many ways and “had” a lot of potential… until this.  Prestashop product combinations suck!