Active
Project:
Ubercart Custom Price
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2012 at 13:31 UTC
Updated:
8 Jan 2012 at 13:31 UTC
Hi, I'm trying to use the default quantity field to calculate the price without success. The result is displayed as zero and I get a warning message about dividing by zero (uc_custom_price.module line 57) even though the actual value used to divide by is not zero (the default is 1, and in my case it's 100). Is it not possible to use this field for price calculations?
Here's my code:
$item->price = ($item->price)/($item->default_qty);
(if I replace "default_qty" with "weight" the calculation is applied correctly... )
Thanks!