Daily Archives: July 9, 2009


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 –

1
2
3
4
5
6
7
8
9
class AdminOrders extends AdminTab
{
	public function __construct()
	{
	 	$this->table = 'order';
	 	$this->className = 'Order';
	 	$this->view = 'noActionColumn';
		$this->colorOnBackground = true;
		$this->delete = true;