Skip to content

Instantly share code, notes, and snippets.

@DevLoris
Last active May 12, 2021 06:09
Show Gist options
  • Save DevLoris/d394069191c115654e700520e641beb1 to your computer and use it in GitHub Desktop.
Save DevLoris/d394069191c115654e700520e641beb1 to your computer and use it in GitHub Desktop.
Prestashop dump products & categories urls
## LIST CATEGORIES
SELECT CONCAT( `id_category`, '-',`link_rewrite`)
FROM `ps3s_category_lang` WHERE id_lang = 1;
## LIST PRODUCTS
SELECT
CONCAT( (SELECT (
SELECT `link_rewrite`
FROM `ps3s_category_lang`
WHERE id_lang = 1
AND id_category = pr.id_category_default
)
FROM ps3s_product AS pr
WHERE id_product = ps.id_product
LIMIT 1
), '/',ps.`id_product`, '-', ps.`link_rewrite`, '.html')
FROM `ps3s_product_lang` AS ps ;
## LIST CMS
SELECT CONCAT( 'content/', `id_cms`, '-',`link_rewrite`)
FROM `ps3s_cms_lang` WHERE id_lang = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment