[ic] Problems: long winded explanation, and request for help.

Justin La Sotten justinl at fragrancenet.com
Wed Dec 1 21:14:41 UTC 2010


On Wednesday, December 01, 2010 10:27:25 am Adam Lambert wrote:
[snip]
>
> Example 1:
>         <form action="[process-target]" method="post">
>         <input type=hidden  name="mv_todo" value="refresh">
>         <input type=hidden  name="mv_order_item"  value="ITEMSKU">
>         <input type="image" border="0" src="addtocart.gif" width="160"
> height="31"><br>
>         </form>

I personally would do this:

<form action="[area href="path/to/basket"]" method="post">
   <input type="hidden" name="mv_action" value="process" />
   <input type="hidden" name="mv_todo" value="refresh" />
   <input type="hidden" name"mv_order_item" value="ITEMSKU" />
   <input type="image" border="0" src="addtocarf.gif" width="160" height="31" />
</form>

This will enact the "process" actionmap code, yet the URL will reflect
the basket page, a bit more SEO friendly.


>  http://www.mydomain.com/blah/blah/blah/basket.html?mv_action=refresh&mv_order_item=ITEMSKU

The CGI variable mv_order_item is only special when the "process"
actionmap code is enacted. mv_action is trying to enact the "refresh"
actionmap code, which probably doesn't exist. Therefore, this URL is
simply sending you to the basket page, and completely ignoring the CGI
variables. If you changed this URL to look like:

http://www.mydomain.com/blah/blah/blah/basket.html?mv_todo=refresh&mv_action=process&mv_order_item=ITEMSKU

then this URL will indeed add the item to the cart as you would expect.



- Justin La Sotten



More information about the interchange-users mailing list