Developer forum

Forum » Ecommerce - Standard features » Cart post page

Cart post page

René Poulsen
René Poulsen
Reply

Hi,

I'm working on a solution with eCom where I need to create an "instant order" form - so on the page I have a button adding the product to the cart via ajax. When the ajax is done I show the checkout form on the productpage. The productpage (a page with list of products in specific group) has the URL /product, but ofcouse the URL changes when viewing different product groups. So for product-group-1 and product-group-2 the URL would be /product/product-group-1 and /product/product-group-2.

When checking out the user is redirected to /product?CompletedOrderId=ORDERXXX&CompletedOrderSecret=XXXXX

Is there anyway I can override this and submit to the exact URL with the correct group instead of just the page called product? So when checking out on the product-group-1 page I would like to redirect to /product/product-group-1?CompletedOrderId=ORDERXXX&CompletedOrderSecret=XXXXX


Replies

 
René Poulsen
René Poulsen
Reply

Is there no way to do this?

 
René Poulsen
René Poulsen
Reply

I've found this via the forum - and even though the post was pretty old, it still works for posting to the right page with a specific ID. If i use this, it will redirect to the page with ID = 10 when checking out:

<input type="hidden" name="redirect" value="Default.aspx?Id=10" / >

But what is NOT working is the groupid parameter I try to add to the redirect field. So if I do this, it just redirects to the page with ID = 20, but without the groupid parameter:

<input type="hidden" name="redirect" value="Default.aspx?Id=20&groupid=GROUP13" / >

 
René Poulsen
René Poulsen
Reply

Bump

 
René Poulsen
René Poulsen
Reply

?

 
Nicolai Pedersen
Reply

Hi Rene

There is no way to do this as far as I can see. There are a lot of redirects handled to and from payment gateways etc. that will change the data send back and forward.

You should probably handle the cart submit using an ajax or similar to the actual cart page, and render a receipt on the product page based on the response.

Sorry about the inconvenience, Nicolai

 

You must be logged in to post in the forum