I have an ubercart product with multiple options that need to be charged per person. I’ve created an attribute called Number of People with a select box for numbers 20-40.
I need to multiply
(the price after the addition of the selected options) * Number of People
I am using Ubercart Custom Price which allows me to do the necessary math but I am not sure how to access the user selected value of Number of People.
So basically I need:
$item->price = $item->price * ['number_of_people']
I don’t see anyway to access the Number of People from the $item object. Any Ideas? Thanks
You can use the
uc_attribute_tokensmodule to get the value of the attribute “Number of People” on the calculation, both modules integrate. Check the README.txt file on the module for the token you need to use, it will be something like:[number of people].