Timeline for Create a product after form submission using commerce and rules
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 11, 2014 at 13:51 | comment | added | Igor | Yeah sorry for the lack of clarity... The problem is not that Rules doesn't know the exact Node ID, the problem is that most fields that I need in order to set up my Actions are not available in the Data Selector. And I cannot add a condition (e.g. the entity contains such field) without first adding an event involving the node containing the fields I need (which I do not want to do). Anyway, I don't want to waste more of your time, thanks again for your efforts, greatly appreciated! | |
Jul 11, 2014 at 12:01 | comment | added | Wtower |
Sorry but I can't precisely understand the problem. Is it that Rules don't know the exact Node ID that was active when the event was triggered? In this case I would write a small custom module, define a custom rules event with hook_rules_event_info() . Then use hook_form_alter() to define another custom submit function, in which manually invoke this event and call the original submit handler.
|
|
Jul 11, 2014 at 10:40 | comment | added | Igor | It was a good idea but I eventually face the same problem. I set up a component (for actions) and added it to my initial rule. However, when adding it, the system requires to enter all the fields again, which I cannot do for the reasons mentioned above. Again, thanks a lot for the suggestion! | |
Jul 11, 2014 at 9:57 | comment | added | Wtower | Maybe then you could break your rule in two parts by using a rule component? | |
Jul 11, 2014 at 9:56 | comment | added | Igor | That's exactly what I've been trying to do but if I remove the event "content is viewed", I cannot select "node" in the condition's data selector. And if I do try to enter "node", the system tells me "Data selector node for parameter entity is invalid". In other words, it's like a cascade: I have to add a condition to display the fields I need in the actions' section but first I need to select an event involving the node containing these fields in order for this node to be accessible in the conditions' section (which is not what I want). Hope it's not too confusing put that way...thanks a lot! | |
Jul 11, 2014 at 8:41 | history | answered | Wtower | CC BY-SA 3.0 |