Death and Taxes

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

I needed to charge taxes for Arkansas only. I have a solution that work fine for me. I combined 'Review Cart' and 'Purchase Items in Cart' into one function. You get a RE-Calculate button that works. I'll cut and paste clips of my working scripts so you can see what changes I made and where.

# Show current cart elsif ($command eq 'review') { &review_items; &buy_items1; }

# Review all items in cart. Can modify quantities. sub review_items { &print_header; &list_items; print "

\n"; print " To remove an item, just change the number in it's box to 0 and Re-Calculate "; }

# Show the order form sub buy_items1 { open (ORDER,"$basepath$delim$order") || print "Could not open $basepath$delim$order $! \n"; while () { print $_; } close(ORDER); &print_footer; }

I changed my footer.htm to make 'smart.cgi?command=review' my 'check-out'link.

Thanks a million to Barry Robison for the Scripts!!

-- Eddie Deboard (eddie@writeme.com), September 15, 1999

Answers

View the source of this page to see what I really submitted...

-- Eddie Deboard (eddie@writeme.com), September 15, 1999.

Moderation questions? read the FAQ