eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Development resources
 ::   WebWare 2.1 (Perl)
 ::   WebWare 2.0 (Java)
 ::   Cool hacks
radical hacks
WebStore Cart Fields Not Printing in the Right order, Bug Fix  
sent in the following bug report and fix!

There is a problem that can be seen on the cityshop demo on thier web site. ( http://www.nightmedia.net/shop/index.html use the city-shop demo page link).

Whenever you add a product that has options that modify the price, it screws up the cart prices. When you view your cart, the price after options column is really the unique cart ID number for that line. Try ordering 1 of the letter "A" on the demo site.

The Shop_setup.pl file refers the structure of the cart file as having a weight value, which it does not as it was generating. This would cause the fields to be read as being one off, resulting in this condition. If I edit the cart file and add in the weight field it works fine.

It turns out that there is a weight field in that is not mentioned in the documentation or the example shop. I tracked down the problem to the cart file which was not formatted the same as the perl code suggested (with a weight value as the 6th field).

I found that the database enties had weight as the last field (after the options list), while not showing this in the documentation. What it comes down to is that the quanity field in the HTML page did not have weight as its last option - so it was not added to the cart -caused the cart ID field to be displayed in the option totals box and in turn screwed up the price. I am not sure if the problem exists in a dynamically generated site (it did in the example) for I am using files generated out of a mSQL database.