Jump to content

Issue wtih wrong values in SQL export


ptityop

Recommended Posts

I have a very odd issue, when exporting the catalog with wholesale prices, some wholesale prices come out as 0 .... Although the info shows in the backend as. I have a basic SQL query to pull up the catalogue with wholesale prices. Most of them are coming out fine but plenty of values in the wholesale column come out as 0-0000 although the wholesale price is properly set and showing properly in the admin ...

How can this happen knowing this is pulled out from the database.

I am also putting here the SQL query

Thanks in advance

SELECT 
	p.id_product 'Product ID',
	p.reference 'Reference',
	pl.name 'Product Name',
	p.price 'Price',
	p.wholesale_price 'Wholesale Price',
	s.quantity 'Quantity'
FROM ps_product p
LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
LEFT JOIN ps_category_product cp ON (p.id_product = cp.id_product)
LEFT JOIN ps_category_lang cl ON (cp.id_category = cl.id_category and cl.id_lang=2)
LEFT JOIN ps_stock_available s ON (p.id_product = s.id_product)
GROUP BY p.id_product
ORDER by p.reference

 

Capture.thumb.PNG.697b55f00323a1cd12f5e28664ce207e.PNG

wholesalePrice.PNG

wholesalePrice2.PNG

Edited by ptityop (see edit history)
Link to comment
Share on other sites

  • ptityop changed the title to Issue wtih wrong values in SQL export

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...