Skip to content

Instantly share code, notes, and snippets.

@deniscsz
Created April 26, 2019 01:29
Show Gist options
  • Save deniscsz/3ab288f110808ca7a9449544a4c9a505 to your computer and use it in GitHub Desktop.
Save deniscsz/3ab288f110808ca7a9449544a4c9a505 to your computer and use it in GitHub Desktop.
Export Categories from Prestashop 1.6
SELECT cl.id_category,
c.id_parent as parent_id,
cl.name,
cl.description,
cl.link_rewrite,
cl.id_lang,
c.active,
c.position,
c.level_depth,
c.id_shop_default
FROM ps_category c
inner join ps_category_lang cl on cl.id_category = c.id_category
inner join ps_category_lang cl2 on cl2.id_category = c.id_parent and cl2.id_lang = cl.id_lang
WHERE id_shop_default = 3 AND cl.id_lang = 3
GROUP BY id_category
ORDER by c.id_parent, c.id_category ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment