Create a Drupal Commerce simple hook

MQL5 Libraries Scripts

Job finished

Execution time 1 minute

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

Responded

1
Developer 1
Rating
Projects
1
0%
Arbitration
0
Overdue
0
Free

Project information

Budget
10 - 50 USD
For the developer
9 - 45 USD
Deadline
to 1 day(s)