I am creating a custom module that will allow discounts based on specific quantities ordered. The problem I am having is that I cannot figure out how to change the price of the product if that quantity is reached.
For example, a product costs $10, however if 100 are ordered then they only cost $9 each, or if 200 are ordered then only $8. I have 90% of the module written...it works all the way up to the point where the product is added to the cart. At that point I have no idea how to implement the discount. I have looked into hook_productapi and hook_checkoutapi, and I recently found product_adjust_price, but even after reading as much documentation as I could I still don't understand how to do this.
Maybe I am a little slow, but if someone could please at least point me in the right direction I would be extremely grateful. Btw, I know that similar versions of this question have been asked before, but all of the answers that I found just say to use flexicharge...I do not want to use flexicharge, hence the reason I am asking this again.
Thank you in advance.
Comments
Comment #1
gordon commentedYou want to use the hook_product_specials()
See http://drupalecommerce.org/api/function/hook_product_specials/53 for more information on its use.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.