2084 Posts in 1005 Topics by 453 members
|Go to End|
1 September 2010 at 8:22pm
How can I store additional data in the cart, by an extension or somthing? I looked at the module trying to figure out the data model (using also an old graph by the previous releases of e-commerce) but could not come up with anything. I'm using the 0.61 beta
2 September 2010 at 12:54pm
What are you trying to store? I read somewhere on the google code project the cart variables were going to be stored in the database not in sessions....
The current session logic is inside ecommerce/code/model/ShoppingCart.php
you can see the functions add_item() around line 138
Hope that helps
2 September 2010 at 7:05pm
I'm trying to have additional info in the Cart, info i take from my extended product class. For example, storing in a row of the cart the color, dimension and other variablesi have in the extended product, stuff like that. If I' getting this in the right way, I would have to extend something like ProductExtended_OrderItem... but first question: how I have to write all the functions found in classes such as Product_OrderItem?
Having made this, I would have to modify the function addItem at line 407 to have it handle my ProductExtended model. But how I can do it without patching the original code? I could do a custom class like MyShoppigCart and have silverstripe look on it with usecustomclass like Object::useCustomClass('ShoppingCart', 'MyShoppingCart', true);
Would it work? any other ways?
2 September 2010 at 7:23pm
I must add I did not use Product Variations but rather custom classes I made.
2 September 2010 at 8:02pm
changed my ecommerce source to branch "BURNBRIGHT_DBCART", so shopping cart is really different and now IT IS in the database, suggestion again?
|Go to Top|