Jump to content

Mysql pricing query.


Kunal0

Recommended Posts

Hi ,

I am fairly new user to prestashop and am attempting to modify the pricing of my items. However the web backend is not changing I have however found that I can do this in the mysql database backend but I cant see any product names as they are stored in the reference fields. Could i request that someone send my the SQL query which displays the product price next to the reference name so as I know which product I am completing. I am using Prestashop 1.6.1.1. I hope my question make sense

 

Thanks

 

Kunal

Link to comment
Share on other sites

This does not account for products with attributes

SELECT p.id_product, pl.id_shop, pl.id_lang, pl.`name`, p.price
FROM `ps_product` p
INNER JOIN ps_product_shop product_shop    ON (product_shop.id_product = p.id_product)
LEFT JOIN `ps_product_lang` `pl` ON p.`id_product` = pl.`id_product`
  • Like 1
Link to comment
Share on other sites

Hi,

Thank you so much for your help bellini13 . I have copied and pasted this sql query into MySQL and I get this error as i am not efficient on MySQL querying please could someone kindly assist me again.

 

the error I get is this:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ON (product_shop.id_product = p.id_product) LEFT JOIN `ps_product_lang` `pl` O' at line 3

 

Thanks Again so ,much

 

Kunal

Link to comment
Share on other sites

seems like your copy and paste introduced invalid characters.  you'll need to remove those before running the query.

 

What is  and O at the beginning and end?  They are not in the query I provided.

near ' ON (product_shop.id_product = p.id_product) LEFT JOIN `ps_product_lang` `pl` O' at line 3
  • Like 1
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...