June 13, 2000: E-Catolog Summary Report (yo)

< socko, the mars loving sock puppet

| ??? |

playing japhy in the flatirons >

The first thing looked at was the ability to type in as many items as you want into the text area on the product pages. this is a great feature that was left out of the new cart (?) the problem with this feature is that someone could type in "nine" and the javascript wil trip up very nicely on this and bad information will be put into the cookie containing all the shopping info and the cart will be rendered useless.

the fix is to first see if whats typed into the textbox is actually a number and only act on it if it is. If what was typed into the textbox was not a number, the textbox, cookie, and everything else is cleared of that particular item and set to whatever the value was before the user came (or came back to that page.

the code:

function AddManyItems(num){
 
 //obtain  a value to check the  prescence of a number 
 var numcheck = document.theform.quantity.value; 

   
  
  //if it is a number (if its not NaN) 
  //add that many items to the cart
	if(isNaN(numcheck)!=true){
	 writeCookie('tscookie',num)
   	 subTotal(num)
  
   	 
   	 
  
	 }else{ 
	//else erase that value from the cart
	//we can't see what the number used to be (too bad) 
	document.theform.quantity.value = old_quantity; 
    writeCookie('tscookie',num)
    subTotal(num)
	
	} 


}
	

It was also noticed that the remove button acted in a strange way, removing ALL items from the cart instead of removing one item, it would make sense that the button remove one item as the add button adds one item, keeping customer trust in the whole system.

the problem with just saying "everytime you click the button, remove 1 item" is that you get to a point where you start removing negative numbers, it could almost be said that a person could shop at a site and start having the site owe THEM money!

the fix is to just check if the number is less than zero and do do anything if thats the case, the code:

//sets the quantity of an individual item from the product pages to one less
function remItem(num)
	{	
	
	var value = document.theform.quantity.value; 
	
	
	var testforNeg = value--;
	testforNeg = testforNeg/1; 
	
	if(testforNeg > 0){ 
	
	document.theform.quantity.value--;
	writeCookie('tscookie',num)
	subTotal(num)
	}
	}
	

another problem that has plagued the cart is its still hard to cutomize the cart for each client one nice way to do this is to change the bg color of all the tables on the webpages when you get a report for cart summary, cart contents, checkout, etc. the fix was to add a variable at the top telling you what the color should be and then just use that variable instead of the actual color throughout the script, like so:

//this variable sets the color of the bg of tables. this addds easy customization to the cart. 
theBgColor = "9900FF"; 

and then use it like so:

document.write("<td  bgcolor=#"+theBgColor+">
<font size=2 face=\'Arial, Helvetica, sans-serif\' color=#ffffff><b>
Product</font></td>") 
   

a similar technique was used for the site name and the site address:

siteName = "Boulder Wine"; 
siteAddress = "http://boulderwine.com"; 

a LARGE problem was found with testing to see if numbers were really numbers or were letters or just gobble-de-gook. throughout the script, this test was found:

//check to see if "number" is really a number using
//the special NaN() function that returns true if it is NOT a number 
//and false if it is NOT a number 
if(isNaN(number == "true")

this is more of a syntax problem, the statement should be written as: 
if(isNaN(number == true) 

with true not locked into parantheses. true without parentheses has special meaning when being compared to something else, as in the example above.

the above changes seem to have taken care of at least 50% of the problems encountered with the script, the problems that still persist with the cookie in relation with the "items" and "total" textboxes showing "$NaN" will be much harder to take care of, since the information that is out of date is already on the clients computer.

to fix that problem with the current setup, one would have to look at the cookie, see if there are any problems, write the cookie back to the browser, look at the cookie again and write the information. that senario would involve some MAJOR jumping through loops. several attempts at that on my part have led to failure. the script already looks at every cookie entry to make sure its NaN but is faling somewhere, concluding that the problem is much more than a simple "look and see" and more of a function(s) rewrite. as i'm not the creator of the script, only the maintainer and patcher upper of siad script when computer science majorers mess up functionser when high on hemp brownies-er.

in conclusion, i do not see it as being relevent to try to repair a system thats already shown its relative impratictablity when it comes to errors and diffuculty in resolving those errors. instead, focus on future carts should be towards changing tools we already have to do the same thing as our current system.

we already have the functions of Add/Edit/Delete data entries written in perl (freshbuzz) and the ability to plant these functions on any server that has perl installed (aka any server, concentric, etc), we already have the previous + next functions and the ability to do whatever we want with this information, be it write out individual pages, build navigation tables, and whole javascript programs.

it would seem to me that the best way to do this is not change the tools we have, but to make the system modular, the same core program could be used for many different scenarios. an easy system to add/edit/delete data would be the core. what you would do with that information depends on what you wanted to do. one module could be just a page update module. there could be a shopping cart module, a search module, etc. that way, one core piece of software could be developed, and problems with any or every one of these systems could be fixed by changing and replacing that one program, no matter what its used for. this also makes cooperation with other people in programming different scenarios easier, the core program would be somewhat of a black box; it doesn't matter if you know how it works, you just have to know that it works. that lets you focus on custom tailoring the functionality for each individual client, quickly and alot more easily. this would also lead someone to use the core program without the prescence of the creator (ie, me) this isn't a new idea and is used everywhere, any program that uses sound on a macintosh probably calls the quicktime core program, every program that has cut/copy/paste routines uses the same routines mapped out y the operating system.

focusing on the cart, we could make a migration to this new system in steps. the first step would be to have the information saved in the database system already in use (freshbuzz) a simple routine could be made to write out the javascript, make the product summary pages, etc, mimicing the older system while also streamlining the javascript being used and keeping the data in a more protected place (right now, if you delete the product page, you delete most of the info on the product)

the second step would be to replace the global.js file (which at the moment is bloated with way too much information as seen at playfairtoys.com) to its bare essentials, ie, product number and price, making a quicker download and making the whole system simpler, using some of the ideas set forth by the perl programmer hired by (Company X) who reviewed the cart. This would keep all the javascript functionality that we want to keep, such as the running total, both for individual product and for the entire cart and gie us more freedom on other areas, such as developing custom product search routines and showing the information in a more intuitive way(such as the product summary - its not in any real order, we could have one in alphabetical order, one based on price - one on color, whatever)

something like this wouldn't take too much time on my part and would save time in the long run, as it takes at elast 3 days to get a cart up and runing. we already have the add/edit/delete functions, the previous-next functions, the running total functions, and a blue print on how not to use the global.js file exclusively. what needs to happen is to develop a way to easily custom tailor the shopping cart process for any client by anyone in the company, be it me or one of the main designers, in the best case scenario, you should have to type in a couple of variables and hit "make cart".

it seems at the meantime, considering the admin logs for today and the previous days, that show what changes exactly took place:

p24219 :: 06/12/2000 - 12:17

the js entry for p24219 has been changed:

deleted information for p24219:

  • name: Glamour Train Case
  • price:24219
  • group: Lets_Pretend
  • image name: 24219traincase.jpg

the html file for p24219 has been deleted at /web/cart/pages/p24219.html

the image for p24219 has been deleted at /web/cart/media/24219traincase.jpg


p57525 :: 06/12/2000 - 12:18

the js entry for p57525 has been changed:

deleted information for p57525:

  • name: Show And Tell Game
  • price:57525
  • group: Games
  • image name: 57525showandtellgame.jpg

the html file for p57525 has been deleted at /web/cart/pages/p57525.html

the image for p57525 has been deleted at /web/cart/media/57525showandtellgame.jpg


p41372 :: 06/12/2000 - 14:03

the js entry for p41372 has been changed:

addition of information for p41372:

  • name: Music Blocks
  • price: 69.98
  • group: Creative_Play
  • image name: 41372musicblocks.jpg

the html file for p41372 has been added at /web/cart/pages/p41372.html with the following information:

Kids play with blocks and create beautiful music. Move blocks from opening to opening to create a special tune, or play at random and see what develops. Over 1 million unique compositions are possible. Orchestral quality sound. Hours of entertaining fun and hands-on creativity. Comes with 30 musical phrases of Mozart and parent's guide: Music and Your Child's Mind. Ages 2 and up.
the image 41372musicblocks.jpg has been uploaded

p42085 :: 06/12/2000 - 14:07

the js entry for p42085 has been changed:

addition of information for p42085:

  • name: Solar System Model
  • price: 17.98
  • group: Learning_Toys
  • image name: 42085solarsystem.jpg

the html file for p42085 has been added at /web/cart/pages/p42085.html with the following information:

"I know the planets!" Kids use brush and paints (included) to create models of the sun and nine planets. Then, decorate all with glow-in-the-dark glaze for a stellar glow. Comes with display stands, stickers to label the planets and a full-color reference guide. Great for home or classroom. Ages 7 and up. Expand your child's universe.
the image 42085solarsystem.jpg has been uploaded

p14578 :: 06/12/2000 - 14:11

the js entry for p14578 has been changed:

addition of information for p14578:

  • name: Tumbling Mat
  • price: 129.98
  • group: Just_For_Fun
  • image name: 14578tumblingmat.jpg

the html file for p14578 has been added at /web/cart/pages/p14578.html with the following information:

Cartwheels and somersaults are great fun on this durable child-sized exercise mat. Made of 12-ounce heavy vinyl with 1 1/3" shock-absorbent foam - the same material found in professional sports mats. Easy for a child to carry with attached handles. Hook several mats together with the velcro strips to create a longer tumbling area. 6' z 4'.
the image 14578tumblingmat.jpg has been uploaded

p14578 :: 06/12/2000 - 14:17

the js entry for p14578 has been changed:

deleted information for p14578:

  • name: Tumbling Mat
  • price:129.98
  • group: Just_For_Fun
  • image name:

the js entry for p14578 has been changed:

addition of information for p14578:

  • name: Tumbling Mat
  • price: 129.98
  • group: Just_For_Fun
  • image name: 14578tumblingmat.jpg

the html file for p14578 has been deleted at /web/cart/pages/p14578.html

the html file for p14578 has been added at /web/cart/pages/p14578.html with the following information:

Cartwheels and somersaults are great fun on this durable child-sized exercise mat. Made of 12-ounce heavy vinyl with 1 1/3" shock-absorbent foam - the same material found in professional sports mats. Easy for a child to carry with attached handles. Hook several mats together with the velcro strips to create a longer tumbling area. 6' x 4'.

p37819 :: 06/12/2000 - 14:18

the js entry for p37819 has been changed:

deleted information for p37819:

  • name: Treasure Twister
  • price:49.98
  • group: Building_and_Construction
  • image name:

the js entry for p37819 has been changed:

addition of information for p37819:

  • name: Treasure Twister
  • price: 49.98
  • group: Building_and_Construction
  • image name: TreasureTwisters.jpg

the html file for p37819 has been deleted at /web/cart/pages/p37819.html

the html file for p37819 has been added at /web/cart/pages/p37819.html with the following information:

Gears, cranks, chutes and slides ­ build a bank thatıs as fun to use as it is to construct. Hook the bank to the coin sorter and watch the coins drop through the contraption into the correct money bin. No batteries, no tools needed for this fun way to save. Ages 6 and up.

p27206 :: 06/12/2000 - 16:47

the js entry for p27206 has been changed:

deleted information for p27206:

  • name: Flower Power Table and Chairs
  • price:179.98
  • group: Childrens_Furniture
  • image name:

the js entry for p27206 has been changed:

addition of information for p27206:

  • name: Flower Power Table and Chairs
  • price: 179.98
  • group: Childrens_Furniture
  • image name: 27206flowertableandchairs.jpg

the html file for p27206 has been deleted at /web/cart/pages/p27206.html

the html file for p27206 has been added at /web/cart/pages/p27206.html with the following information:

Bright, beautiful flowers decorate this handsome set, perfect for playrooms, daycares - anywhere kids need a solid surface for work or play. Table is ideal for coloring, reading, even clay modeling. Two matching chairs with comfortable, form-fitting back. Crafted with wood for long-lasting quality. Durable, non-toxic finish. Table: 28"dia. x 24"H. Chairs: 24" x 12" x 13". Seat to floor: 12"

Shipped directly from the manufacturer. Delivery will take 2-4 weeks.


p57505 :: 06/13/2000 - 18:05

the js entry for p57505 has been changed:

addition of information for p57505:

  • name: Kids on Stage Game
  • price: 15.98
  • group: Games
  • image name: 57505kidsonstage.jpg

the html file for p57505 has been added at /web/cart/pages/p57505.html with the following information:

Hop like a bunny. Fly like an airplane. It's the charades game for kids. Players draw cards and take turns acting out a certain motion to their team members. The team with the best actors and guessers wins. A great party game. No reading required. Ages 3 to 8.
the image 57505kidsonstage.jpg has been uploaded

that changes made be made on off peak hours of the website, after 5 pm and on weekends, so that the cart structure does not change when most customers are using the site.

Comments

< socko, the mars loving sock puppet

| ??? |

playing japhy in the flatirons >