hakeryk2 Posted October 13, 2017 Share Posted October 13, 2017 Hello devs, Could You tell me how to change product price and combination price in PHP using objects? I will give You an example with I am struggling now. I have XML where I have suggested price for product by EAN or Reference and I would love to change price for it on my shop but ... In XML there is entire price for product combination like 670 PLN and in shop I have basic price 630 PLN and combination is adding 40 PLN. How to achieve that in code? Is there is one special function to do this for id_product and id_product_attribute or I have change prices only for id_product_attribute and calculate this?This is kinda a messy what I wrote so if anyone just tell me how to set base price for product and price for combination I will be very happy. 1 Link to comment Share on other sites More sharing options...
ENS Enterprises Posted October 13, 2017 Share Posted October 13, 2017 Hi, Can you please help me in understand where you want to change the price in the DB or in the XML, if you want to change in the Prestashop you can use any import tool. 1 Link to comment Share on other sites More sharing options...
hakeryk2 Posted October 13, 2017 Author Share Posted October 13, 2017 Uhmm I just want to change price of products in PHP file, like in the logic of my module. I am creating custom synchronization of prices and I need to know how to change them via PHP code using product objects. Link to comment Share on other sites More sharing options...
Greg1234 Posted January 4, 2021 Share Posted January 4, 2021 I have a similar problem, there should be an easy option to update prices. @ENS Enterprises you said it can be achieved by import, but how? How can you import prices of combination? This is impossible, you'd have to prepare whole the attributes and combinations csv to be imported, with valid products IDs and so on. There should be an option to update product/combination just having it's SKU, either programmatically or by import. Link to comment Share on other sites More sharing options...
hakeryk2 Posted January 15, 2021 Author Share Posted January 15, 2021 Well, I tried that by using import builted in but I failed so I decided to make it programatically. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now