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

[Prestashop] First product image as cover

If you want to mark first image of product as cover you need to do:

  1.  Open your database (for example by phpMyAdmin)
  2. I suggest you create backup of your database for safety (export data and structure)
  3.  Open SQL tab and perform queries from this file (change ‘ps_’ to your prefix):
    prestashop-first_image_as_cover.sql
  4.  Done! 🙂