Although I haven't been giving my full attention to what I consider a lesser problem around work, I decided to throw myself into it this morning. A little self-inflicted pain before my oral surgery later this morning.
Picture this. Start with a shopping cart created with php and mananged with sessions. The cart keeps track of the products and calculates a running total. All is good. It works fine.
Now we need to check out. We ask the buyer to give us his billing and shipping addresses. We then calculate shipping charges. How does one calculate shipping? We need the shipping zip code and the total weight of the purchase. We just asked for the zip and we can get the running total weight from the shopping cart, right?
Nope. Six pages of php script that needlessly does everything the shopping cart does but adds a running weight total. I need to add a half dozen lines to the shopping cart code.
sigh.
Picture this. Start with a shopping cart created with php and mananged with sessions. The cart keeps track of the products and calculates a running total. All is good. It works fine.
Now we need to check out. We ask the buyer to give us his billing and shipping addresses. We then calculate shipping charges. How does one calculate shipping? We need the shipping zip code and the total weight of the purchase. We just asked for the zip and we can get the running total weight from the shopping cart, right?
Nope. Six pages of php script that needlessly does everything the shopping cart does but adds a running weight total. I need to add a half dozen lines to the shopping cart code.
sigh.