URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushp_general_purpose
Thread Number: 319
[ Go back to previous page ]

Original Message
"uShopJSI.addProduct and Cart error"

Posted by jdempsey [guru@anvilfire.com] on at 06:20 PM
I was looking for a way that the total weight would be entered into an order. So I used uShopJSI.addProduct coupled to the "order" button.

This adds an "item" TOTAL WEIGHT qty = "weight". I used the quantity field so the total wasn't added twice. It may not matter.

The trouble starts when you try to remove the weight entry from the cart. If you click the new entry the item ABOVE it is erased. If you highlight the line BELOW the weight line you can erase it. . .

Weird! Test page URL below.


The error seems to be some bug in the item count or an error in the addProduct routine. I was going to use it elsewhere but would like to sort this out first.

Table of contents

Messages in this discussion
"RE: uShopJSI.addProduct and Cart error"
Posted by Bill Weiner on at 06:15 AM
The problem is related to how the "Remove" button on the shopping cart identifies continuation lines in the cart.... and the way that you are setting the Product "Name" parameter to just a blank space (" "). That is, because your WEIGHT line starts with a blank space.... it is being interpretted by the uShopCart applet as a continuation line... and thus is being skipped. To correct this problem, there are two options:

OPTION 1: If you don't need the "NAME" column displayed in your shopping cart... then set then hide it by setting the "columns_name" parameter to "0".


OPTION 2: If you do want to keep the "NAME" column in displayed in the shopping cart, then set the NAME value of your special WEIGHT JavaScript to anything other than a blank space.