Jump to content

any way to save only one field of the product,


gusman126

Recommended Posts

Hi all.

I am developing a module that updates the wholesale price of the products

$ product = new Product ($product_id);
$ product-> wholesale_price = $new price;
The problem I have is adding the

$ product-> save (); or $ product-> update ();

It takes a lot, since you have to save all the data of the product and therefore if there are more than 100 there may be a problem of execution time

The solution I have made has been to save it directly in the tables product_attribute, product_shop and product

But is there any way to save only one field of the product, which only saves the modified?

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