Profile

outlier_lynn: (Default)
outlier_lynn

January 2015

S M T W T F S
    123
45678910
11121314151617
181920 21222324
25262728293031

Most Popular Tags

Expand Cut Tags

No cut tags
Tuesday, September 19th, 2006 08:22 am
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.