Dynamic Price Calculation

Posts: 304
Joined: 11/19/2007
Bug FinderGetting busy with the Ubercode.

I have a situation where I'd like to create a lookup table for prices based on quantity per product. There are also a few other lookup tables that I may need to factor in, so instead of making line item discounts or fees based on an original price, I'd like the price to be pulled from these lookup tables with some additional logic thrown in.

I think what I want to do is add a CCK Computed field to my Products, but then what would the best approach be for setting the product price to this computed price?

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm.. well, you might be able to use hook_nodeapi() to alter the value of that field when the node loads, and certainly for items in the cart you can use hook_cart_item() to adjust the price. Dunno if either of those are what you're looking for.

Posts: 304
Joined: 11/19/2007
Bug FinderGetting busy with the Ubercode.

Thanks Ryan. I think hook_nodeapi() is what I'll want. I'm still not 100% sure on what I'm trying to accomplish, so it makes it somewhat difficult to decide how to accomplish it.

Posts: 1
Joined: 10/03/2008

I havent got around to installing an e commerce module yet, and was wondering whether Ubercart will do the following:

We need customers to be able to order curtains based on the type of fabric(about 4 pricing categories), the width and height (broken down into 10cm segments) and a few extras such as a remote control option. The fabric type chooses one of 4 pricing tables and then a 2D matrix of width and height guides you to the right price. Any extras would be a bolt on top.

Will the dynamic pricing module be able to help with the above?

Any thoughts appreciated.