New Zenner
- Join Date:
- Aug 2013
- Location:
- California
- Posts:
- 22
- Plugin Contributions:
- 0
where is shopping cart information stored?
I am having a really difficult time figuring out where shopping cart information is stored.
We use flat rate usps boxes for shipping. I'm making a custom module that prices flat rate shipping based on how many items we can fit into a box. We have items of varying size so it gets a little complicated.
Theoretically it works like this.
These are the amounts that fit into a box
item small medium large
A 2 10 30
B 500 1500 5000
C 2000 10000 18000
So if they bout 200 of item b and 1500 of item c it knows that 500 of item a would fit into a small box and we have 300/500 or 3/5's room left in the box. so 3/5's of item c's max of 2000 is room left for item c.
so. 2000 * .6 = 1200. We can fit 1200 of item c into the box. They bought 1500 of item c so it doesn't fit.
Then we do the same check again for the medium and large boxes. If it fits in one of those fine if not mutiply our box values by two and double the price and check again for the small box so and and so forth until it finally fits.
Once you start getting into 2 boxes flat rate becomes more expensive than usps and they will likely pick the cheaper usps option.
However, how do I get the contents of their shopping cart into my code? I cant seem to figure out at all where that information is held at.