Discussion:
Problem with OrderItemAdd and Internet Explorer
(too old to reply)
d***@blueyonder.co.uk
2006-10-16 17:30:04 UTC
Permalink
Hi all,

Am running WCS 6.0 EE and have come up against an IE issue, I have the issue in mu development environment and have also tested on a full server install, same thing happens. This works fine in Firefox, problem is Internet Explorer 6

I have linked to my sku a potentially large number of accessories, defined in accelerator using merchandising associations. I have a form for these, with action of OrderItemAdd and method of post. All is fine when I have a few accessories (note, these are selected by javascript writing to hidden catEntryId_n and quantity_n fields). However when I select a fair amount of accessories, say 7 or the form has loads of them (20+ ), when the submit runs and the form is posted, I get an ie "The page cannot be displayed" and the browser URL remains as /OrderItemAdd. The command runs fine and everything is added to the basket, it just appears the redirect to OrderItemDisplay fails. It appears to act like a GET, which i'd expect a problem due to the internet explorer GET limit, however the form is being submitted with a POST.

Is there anything in the commerce framework that could cause this? Like I said, only happens in Internet Explorer and only when lots of items being added.

Any help much appreciated as run out of ideas now!

Thanks,

Dave
Thomas Weidemann
2006-10-17 06:25:00 UTC
Permalink
Hi Dave,

the problem is the length of the URL for the redirect. WCS adds all
parameters you sent with the OrderItemAdd (POST) to the URL.
You can avoid this by adding the following to the URL parameter of
OrderItemAdd:
OrderItemDisplay?orderItemId*=&comment*=&quantity*=

See also:
http://www-1.ibm.com/support/docview.wss?uid=nas3e2e5ee95a82a497886256ae70047ee44

I hope this helps.

Greetings
Tom
Post by d***@blueyonder.co.uk
Hi all,
Am running WCS 6.0 EE and have come up against an IE issue, I have the issue in mu development environment and have also tested on a full server install, same thing happens. This works fine in Firefox, problem is Internet Explorer 6
I have linked to my sku a potentially large number of accessories, defined in accelerator using merchandising associations. I have a form for these, with action of OrderItemAdd and method of post. All is fine when I have a few accessories (note, these are selected by javascript writing to hidden catEntryId_n and quantity_n fields). However when I select a fair amount of accessories, say 7 or the form has loads of them (20+ ), when the submit runs and the form is posted, I get an ie "The page cannot be displayed" and the browser URL remains as /OrderItemAdd. The command runs fine and everything is added to the basket, it just appears the redirect to OrderItemDisplay fails. It appears to act like a GET, which i'd expect a problem due to the internet explorer GET limit, however the form is being submitted with a POST.
Is there anything in the commerce framework that could cause this? Like I said, only happens in Internet Explorer and only when lots of items being added.
Any help much appreciated as run out of ideas now!
Thanks,
Dave
d***@blueyonder.co.uk
2006-10-17 08:38:53 UTC
Permalink
Ok,thanks for this info, explains a lot as I've quite a few hidden control fields for front end display, i'll tidy them up and put them in a different form so they are not posted

However, chaning the URL field to OrderCalculate?URL=OrderItemDisplay?orderItemId*=&comment*=&quantity*=

didn't work, is this because commerce is redirecting to OrderCalculate first & falling over? I shall remove my extra fields and re try and post the results

Aside from this, i've noticed that it is standard behaviour to add form post fields to the redirect url. I've got a simple contact us form, the fields from this end up in the redirect url (TopCategoriesDisplay), is there a way to stop this?

Many thanks,

Dave
geo
2006-10-19 13:31:48 UTC
Permalink
Sure remove them to a different form and then only submit the form you want.

I tested and it correctly removed the parameters chaining as you mention,
although everything after the URL should be URLencoded since you are
bouncing through OrderCalculate first. This would change the end of your
URL parm to look like

URL%3DOrderItemDisplay%3ForderItemId%2A%3D%26comment%2A%3D%26quantity%2A%3D%0D%0A
Post by d***@blueyonder.co.uk
Ok,thanks for this info, explains a lot as I've quite a few hidden control
fields for front end display, i'll tidy them up and put them in a
different form so they are not posted
However, chaning the URL field to
OrderCalculate?URL=OrderItemDisplay?orderItemId*=&comment*=&quantity*=
didn't work, is this because commerce is redirecting to OrderCalculate
first & falling over? I shall remove my extra fields and re try and post
the results
Aside from this, i've noticed that it is standard behaviour to add form
post fields to the redirect url. I've got a simple contact us form, the
fields from this end up in the redirect url (TopCategoriesDisplay), is
there a way to stop this?
Many thanks,
Dave
d***@blueyonder.co.uk
2006-10-19 16:29:41 UTC
Permalink
using a 'clean' post form got around my issue, but thanks for the input!
VijayaR
2006-11-03 22:00:37 UTC
Permalink
Dave,

We are having the same issue. When we add 30 or higher items to shopping cart, even though the items were added to the cart successfully, we get page not found.

Our redirect URL is here:
"OrderCalculate?updatePrices=1&calculationUsageId=-1&URL="OrderItemDisplay?selected*=&partNumber*=&orderItemId*=&quantity*="

Could you share with us how you posted a clean form?

-thanks
Robert Brown
2006-11-04 02:48:22 UTC
Permalink
As geo mentioned your 2nd URL should be escaped in a command chain
scenario. Such as,

String strURL =
"OrderCalculate?updatePrices=1&calculationUsageId=-1&URL="+java.net.URLEncoder.encode("OrderItemDisplay?selected*=&partNumber*=&orderItemId*=&quantity*=");

to avoid mangling the first URL with the second URLs NVPs. Commerce
does a good job of NVP merging after the completion of the first URL so
don't worry about duplicates. Repeat as needed for 2+ levels of
redirection.

R
Post by VijayaR
Dave,
We are having the same issue. When we add 30 or higher items to shopping cart, even though the items were added to the cart successfully, we get page not found.
"OrderCalculate?updatePrices=1&calculationUsageId=-1&URL="OrderItemDisplay?selected*=&partNumber*=&orderItemId*=&quantity*="
Could you share with us how you posted a clean form?
-thanks
Loading...