Closed (fixed)
Project:
Ubercart Custom Price
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2012 at 23:43 UTC
Updated:
28 Mar 2012 at 12:30 UTC
I am trying to use the custom price module to adjust the price based on total quantity of a product sold. I was trying to use the sum_qty field. Any suggestions?
Comments
Comment #1
tr commentedI don't know what you mean by the "sum_qty field" - that's not something defined by or used by Ubercart.
Regardless, the simplest thing is to write your own function to get the total quantity of the product sold (you'll have to do this anyway, as there is no function in the Ubercart API for this) then use the output of that function in your custom price calculation. The trick here is that you can call *any* available function from within your price code.
Comment #2
kristat commentedThe sum quantity is available in uc views. Thanks for your reply.