1

I have installed commerce_fees and created custom fees, then created a rule to apply fees on 'order', but what I want to do is to add fees depending on the quantity of the product.

For example I have product A, quantity 1, then the fee will be, for example, $100. then if I change its quantity to 2, the fees should now be $200.

how can I tweak the rule I created to do so?

Thanks!

Please free to ask anything or added information that might help you understand my problem.

EDIT:

so my workaround here is to limit the quantity of product per line to 1, i made this using rules. my problem now is to add the fee for certain product type. example i have in my cart. product A - type a, then product b - type b.. i want my fee to bee only added once, but when there are two instance of type b. the fee will now be added twice.

any hint guys?

Community
  • 1
  • 1
  • Limiting the quantity to 1 seems to be a bad idea. Instead work with your original rule and see if you can write a php snippet in action to multiply the value by the quantity. Also, try asking this question on [drupal.stackexchange.com](http://drupal.stackexchange.com) – msound Apr 23 '14 at 04:48
  • yeah that would have been bad, so what i did is i used the code here [link](http://www.snip2code.com/Snippet/20396/Drupal-Commerce-Rules--Loop-through-Comm) then put it in the `commerce_fees.rules.inc` then multiply the nmber of instances to the amount,. i dont know else where i can put the code though – Karl Michael Linantud Apr 23 '14 at 07:26

0 Answers0