Create a Drupal Commerce simple hook

仕事が完了した

実行時間1 分

指定

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

応答済み

1
開発者 1
評価
プロジェクト
1
0%
仲裁
0
期限切れ
0

プロジェクト情報

予算
10 - 50 USD
開発者用
9 - 45 USD
締め切り
最高 1 日