celia_ccs Posted December 8, 2005 Posted December 8, 2005 Hi, I'm having a little problem trying to change some features in the shopping cart process. I need to enable clients to customize some products. To do so, in the shopping cart they can click on "customize" for the specified prodcut, they are sent to another page where they do all their customization and then come back to the shopping cart page. When they customize their product I change the product_id number in the customer_basket table. (same way than for the attributes prod#{custom}custom#) Everything works fine in my database, but when I come back to the shopping cart page, it still uses the old product_id number. If I log out and log in, then everything is ok. But if they keep with the same session it doesn't update the information on the website (but yes in the database). I guess then, the class created for $cart is not updated everytinme we load again the page shopping_cart.php. How can I force to update the class $cart? or how can I change the product information? I tried to create a function product_id_update in the Shopping cart class page, but it didn't work. I dodn't know much about classes :( function update_prodlist($products_id,$new_products_id) { $this->contents[$products_id] = array('id' => $new_products_id); } OR function update_prodlist($products_id,$new_products_id) { unset($this->contents[$products_id]); $this->in_cart($new_products_id); } Any help? ----------------------------------------- OSCommerce version : MS2 Contributions installed : AdminMS2, Dynamic Mopics V3, WYSIWYG HTML Area MS2, Easypopulate
Recommended Posts
Archived
This topic is now archived and is closed to further replies.