Hello,
This looks like a great module. I'd really like to use it but I haven't gotten very far with my php lessons yet. :)
What I want to do is to set it up so that the product price is $6.50 and each additional is $5.00. So if you're buying two, the total price is going to be be $6.50+5.00=$11.50.
Does this code look like it would work?
$item->price = $item->price+[[quantity]-1]*5;
In case my php is more horrible than I think, it's supposed to subtract 1 from the quantity, multiply that by 5, then add it to the price. So a quantity of 3 would be: price + (3-1)*5.
Thanks!
Comments
Comment #1
freelockHi,
Quantity is $item->qty . If you have the devel module enabled, you can learn a lot by adding this to your custom price: dpm($item);
So I would rewrite your code to:
Cheers,
John
Comment #2
amysragbag commentedThanks John!
Comment #3
tr commentedThis question was answered.