[ic] how to prevent url changing to process

Steve Bronson steve at airdelights.com
Tue Apr 7 12:41:58 UTC 2020


_______________________________________________

On 4/7/20 2:49 AM, Steve Bronson wrote:
> How can I prevent url from changing to process when I add an item to the cart?  Here is the code I'm using.
> 
> <form action="[process security=1]" method="POST">
> 
> <input type="hidden" name="mv_todo" value="refresh">
> 
> <!-- <input type=hidden name=mv_order_item value="[item-code]"> -->
> <input type="hidden" name="cat" value="[cgi cat]">
> <input type="hidden" name="title" value="[cgi title]">
> <input type="hidden" name="subCat" value="[cgi subCat]">
> <input type="hidden" name="mv_order_fly" value="description=[item-pos 1]|price=[item-pos 2]">
> <input type="hidden" name="mv_nextpage" value="[item-code]">
> <input type="hidden" name="sku" value="[part-param part_sku]">
> <input type="hidden" name="cartPopup" value="1">
> 	<td align="left" class="prodSKU"><a href="[long-tail [part-param part_sku]]">[part-param part_sku]</a></td>
> 	<td>[data table=products field=description key="[part-param part_sku]"]</td>
> 	<td align="center" class="prodPrice">[price code=[part-param part_sku] quantity=1]</td>
> 	<td align="right"><input type="hidden" name="mv_order_item" value="[part-param part_sku]"><input name="mv_order_quantity" value="1" type="text" class="prodQTY"></td>
> 	<td><button type="submit" class="cartButton">Add to cart</button></td></form>
> 
> 

Hello Steve,

what are you trying to achieve? Which URL you want to use?

Regards
        Racke

I would like to keep the url on the page where the item is being added to the cart.  For example if I'm on page test.html and I add an item to the cart it changes the url in the browser to process.html.  I want to keep the url in the address bar as test.html after I have added an item to the cart.  I am using a lightbox popup on page to show item was added rather than going into the cart when the item is added.

The reason I would like to keep the url as test.html in the browser is when you add an item and the url changes to process, if you for some reason reload the browser window it adds another unit to the cart and displays the lightbox pop up again.  Trying to prevent this from occuring.

Steve Bronson 
Air Delights







More information about the interchange-users mailing list