Scroll menu in PrestaShop 1.7 back-office

When you have many modules which adds buttons to the menu you are not able to see/click button from bottom of the menu because it’s not visible.

Very simple solution to allow scrolling the menu

Open file: /admin/themes/default/css/overrides.css and append this:

Open file: /admin/themes/default/js/admin-theme.js and append this:

 

 

 

[Qt] Easily print to console (i.e. for debugging)

How to print to console when using Qt?
Use QTextStream:

Error on file upload: UPLOAD_ERR_PARTIAL

When I was trying to send a file via the HTML form, I saw “error=3” in the $_FILE variable, what means:
UPLOAD_ERR_PARTIAL – The uploaded file was only partially uploaded.

The php_sapi_name() function returned me ‘apache2filter’.
I removed libapache2-mod-php5filter and installed libapache2-mod-php5.
Now php_sapi_name() returns ‘apache2handler’ and files uploading works good now 🙂

Quickly define the file lines limit and cut the first lines

Use this command if you want to keep only a certain number of the most recent lines in the file without using an additional file.

Replace:
* yourFileName – your filename
* 200 – the number of lines you want to keep

 

Create friendly URL based on product name in Prestashop using SQL query

Below you will find simple SQL queries which creates product friendly url from product’s name and saves them in the database SEO section.

You can run this i.e. in phpmyadmin or MySQL Workbench.

Example of action

From product name $ My super product 1 !!! it will create friendly url my-super-product-1

Queries

Continue reading Create friendly URL based on product name in Prestashop using SQL query

How to easily copy table rows using only SQL queries

To easily copy table rows using only queries, you need to create temporary table, copy rows to this table from from table where you want to copy rows, optionally change some values and put them back to table where you want to have copied rows.

How to do this using queries

Continue reading How to easily copy table rows using only SQL queries