Developer forum

Forum » Ecommerce - Standard features » How to skip a step in Cart V2

How to skip a step in Cart V2

Lars Larsen
Reply
Hi
How can I skip a step I have created in the cart (Cart V2)? I have one step which should not be shown to users who are already logged into the extranet.

Replies

 
Lars Larsen
Reply
oh.... found out my self!

You simply change the name and id attributte of the submitbutton on the step you skip from to the name of the step you want to skip to :-)
 
Lars Larsen
Reply

Damn.... it worked by changing the attributte name because I had already been at the step which I bypassed by changing the attributte name. It also does make sense that you can't skip a step by manipulate the HTML on the client. Anyone would then be able to skip the step where you pay for the order!!! Stupid me :-D

So does anyone know how to skip a step in the cart?
 
Michael Nielsen
Reply
Why do your Extranet users have to skip a step in the checkout?

If you could give a bit more information, maybe an alternative solution could be found, if skipping a step is not possible.

 
Lars Larsen
Reply

The step I want to skip is a step where users who are not registered as extranet users can create a user account. It's because we have a shop where customers can signup as members of a club of benifits. But if a user is already member of the club, and that is registered as extranet user, then we don't wanna show the step with the signup form.
 
Michael Nielsen
Reply
Couldn't you put the sign-up on the same page where the customer puts in his address and hide the section from users who are logged in?

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Lars

You can skip steps as much as you want as long as you don't "jump" across the Checkout step.

The way you do it is by passing a parameter called "CartV2.GotoStep{i}" where {i} is a placeholder for the index of the step. The parameter can either be passed as a QueryString parameter or Form element (GET or POST) and giving it a value.

One thing to note is that steps in CartV2 have 0-based indexes, to the index of step 1 is 0 and the index of step 3 is 2 and so forth.

The difference between using QueryString and Form is that CartV2 specific values (except visited steps) are not saved when using QueryString.

Example:
You want to redirect the user to step 3 and don't want to save any values, then you could use JS and set the current location to something like http://yoursite.com/Cart.aspx?CartV2.GotoStep2=true.
If you want to save some values then you could create a submit button with the name attribute set to "CartV2.GotoStep2" and setting the value to something that makes sence.
In either case the user is redirected to step 3.

Hope this helps :)

- Jeppe

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
This post has been marked as an answer

Just a small clarification of my previous post.

You can freely jump between pre-Checkout steps before the Order is complete, and you can skip between post-Checkout steps after the Order is complete. But you cannot skip from pre-Checkout to post-Checkout without going to the Checkout step.

- Jeppe

Votes for this answer: 0
 
Lars Larsen
Reply

Thanks Jeppe, your suggestion is exactly what I needed :-)

 

You must be logged in to post in the forum