Jump to content

How to show all product reference in sql manger?


Wilfredcy

Recommended Posts

SELECT 

a.`id_product`,
b.`name`,
pa.`reference`,
b.`link_rewrite` AS `url`,
a.`price` AS `price`,
sav.`quantity`,
m.`name` AS `Manufacturer`,
cl.`name` AS `name_category`,
tx.`name` AS `tax`

FROM `ps_product` a 
LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product`) 
LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` = a.`id_product`) 
LEFT JOIN `ps_manufacturer` m ON (a.id_manufacturer = m.id_manufacturer)
LEFT JOIN `ps_product_shop` pshop ON (pshop.`id_product` = a.`id_product`)
LEFT JOIN `ps_category_lang` cl ON (pshop.`id_category_default` = cl.`id_category`) 
LEFT JOIN `ps_tax_rules_group` tx ON ( tx.`id_tax_rules_group` = a.`id_tax_rules_group`)
LEFT JOIN  `ps_product_attribute` pa ON (pa.`id_product` = a.`id_product`)

WHERE 1 ORDER BY a.`id_product` ASC        

I try to export product detail with SQL manager, but in the references column, only the product with combination got to show the reference code, but not the product with no combination. How can I show both of the references?

and another thing why is all the product are duplicated.

excel1.JPG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...