Adding New Modules..Have Question

bh <[email protected]> 15 Aug 2003 21:46:49 -0000
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <d54a114820650e2bf2af70b59e83fe55@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=214463#214463
----------------------------------------------------------------

I am adding new custom module. I see that the shoppers cart is stored in a session array and then eventually into the customers_basket.

Where is the code that manages the shoppers cart session array? I need to add 3 session attributes to the product item when they add an item to the cart. 

The new module will be applying discounts per volume across product items (based on a price model id applied to the product item) for the entire store versus a graduated price per volume of 1 prouct item.

This way they can shop across the same store and achieve a volume discount when they purchase seperate items that are in the same price model group. 

So I will need to total all qty's for every product item in the session cart array where the price model id is the same and update product item prices and total for all items with same price model id in the session cart array each time they add an item or edit cart product qty's.

I have most of the code done am having difficulties storing the price model id assigned to each product item to the session array when they add it to the cart.

I have tried the tep_session_register function and then assigning the values but when I view the session array it is not getting added to the cart session.

Any guidance appreciated.

I am kinda new to OSCommerce and have searched forum but didnt see anything applicable.


Also, at what point does the physical customer_baskets table get populated. I could use that instead maybe but it appears as though OSCommerce runs more off of the session array until check out process?