Re: Re: I've got beta things to do...

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

My suggestion is to use uc_cart_get_contents and check the price... might be a better way to specify it as a free product (taxonomy? CCK? or is price field the best option?)..

If it's flat rate, couldn't you then count the number of free products in the cart, and subtract from your dollar amount accordingly? Best option is to probably not count it at all, of course, but I'm not quite sure how to accomplish that.. There would need to be a new hook for "post shipping cost calculation" or "during shipping cost calculation" to consider the freebie as not existing in the order. Unless it's the only product in the order; in that case consider the cart as a "Zero Total" payment (found in uc_gift_certificate and uc_discount).

EDIT: I didn't know you could set flat rate amount per-product, makes sense I guess. (I don't use that method at the moment ...)

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

I've got beta things to do... By: Ryan (34 replies) Wed, 01/16/2008 - 18:19