1
Answers
Vote up!
0
Vote down!

Generation of node for product quantity

Hi, we have commerce install and would like to add the ability to print ticket we sell. We have a product type call "Event" and user can buy multiple Event of the same Event and also from different Event. This part work great.

Now I have a node who is supposed to be the ticket. It have a QR Code in it and we are combining this with flag to do a validation at the door with the people who can validate the ticket.

I would like know if it is possible to trigger a rule after the payment is done and create a number of node corresponding of the number bought by the user ? I would like to know how i can do that if it is possible ? I tought at first to go with VBO but i'm stuck in rules to loop on the quantity of the products...i don't know how or where to get it from my view. I manage to create a views with the ID of the order and then inside the views a create the list for Event sell. There a got the Event and the quantity but cannot loop with the quantity in rules ?

Any help please !? Thanks in adavance...

Asked by: sw3b
on August 30, 2013

1 Answer

Vote up!
1
Vote down!

I manage go get this work with a componnent in rules and adding the module Conditional Rules form D.org.

In my componnent i do all the validation and when we process the full payment of the order a simple rule call that component. We choose the component so it is more easy to re-use it when we want it.

The component use the order and fetch all the items who was buy. It check for a product in particular. After that for the quantity bought we create a ticket for each quantity. The system work like a Movie Theater admission ! =) After that an email is send to the user so he can print is ticket.

Answer by: sw3b
Posted: Sep 4, 2013