Job finished
Specification
ob Description
We need an experienced Drupal commerce php developer to accomplish this small task
Our scenario is this:
One Product variation type that has 2 fields
Standard Commerce Price (Adult) P1
Custom price Field (Chidren price) P2
in the Line item type we added a custom field
Number of childrens Q2
On the add to cart form we have the N° of childrens field visible and as well the q.ty field
WE NEED THAT:
When an user add to cart this kind of product, the system should calculate the price of the adult in the standard way P1 * Q.ty, than
If the Q2 field is not empty should add a new line item "Children booking" and calculate the price using Q2 * P2
The overview of the order should be:
EXAMPLE
> Adult - Qty 2 Price 800 Subtotal 1600
> Children - Qty 2 Price 400 Subtotal 800
> Total amount - 2400
we was studying the commerce_ticket module that have a quite similar functionality, but it's too complex, we just opted for a new small module creation or a custom rules action to accomplish this