I want to change the value of one of my product custom fields when "Checkout completion". I created that custom field myself, with machine name
How I can do that with the Rules module?
Preface: I'm assuming this question is about D7.
Create a custom rule (using the Rules module) like so:
field_prodstat" (which will make that field available as a token you can select in subsequent Rules Events and/or Rules Actions).
Below is an attempt to also address your comment below this answer, the relevant part of that comment is like so:
I have a content type called "Appointment". When that appointment status = "Accepted Pending Payment" I created a rule to build a new product for that "appointment". So now I have a product related to that appointment. I just want to update "Appointment" status to "Paid" when his product appear in an order with status = invoiced. I don't know if you have any other proposal to do that.
That comment starts revealing your real question, which is pretty different from your original question. To answer your real question is not something that can be explained in just a few phrases. I suggest you have a look at the video tutorial about Removing Items From the Cart Using Rules which demonstrates a scenario which is pretty similar to what you're asking for (in your extra comment). Here is part of what is shown in that video (quote is from that link):
- Create a rule that loops through all the line items when the order is about to be saved. Have it call a component (rules subroutine) for each line item to see if that line item should be removed.
- Create the component that does the work. It needs to take two arguments (line item and the order-about-to-be-saved).
To make this also work for your case, I think you'd be close if you only replace the last Rules Action in the used Rules Component by a Rules Action that applies the update you're asking for in your comment.