| Implementing gift wrapping |
|
|
|
| Written by Whippy |
| Tuesday, 01 July 2008 11:03 |
|
Today I added gift wrapping to thinkingtoys. On reviewing quite a few other commercial sites I was amazed how little thought has been given to this utility. Most of them rely upon special instructions or the assumption that there will be just one gift. I took a slightly more structured approach and gave people the option to wrap any item in the order (including specific items where a number of similar items have been ordered). I added a table to associate gift wrap data with any given item in the order identified by the order_id, product_id and item_num. The inclusion of the item number (an integer from 1 to the number of the items of that product_id in the order) allows the buyer to choose wrapping for each item of the same ID. Thus if they have three grandchildren and give each one a Katamino, they can write an appropriate gift tag and specify appropriate wrapping for each child It meant it took most of the day getting the data model and supporting code (and ads) sorted out but hopefully someone will appreciate it at Christmas when they send a number of gifts to the same address wrapped for different kids. Doing it properly will certainly avoid any confusion and it allowed me to refactor the order viewing (used for delivery notes, customer order reviews, administration review etc. into a nice single php include file. Refactoring as you go is a great way to keep yourself sane and the client happy as you take less and less time and clean up little glitches and errors as you go (they would have been much to costly to deal with when the site was first written).
Set as favorite
Bookmark
Email This
Hits: 1229 Trackback(0)
Comments (0)
![]() Write comment
|
| Last Updated on Saturday, 06 September 2008 11:57 |





