Developer forum

Forum » Development » New user, and email subscriber during checkout - user selectable option.

New user, and email subscriber during checkout - user selectable option.

Dmitrij Jazel
Reply

Hi Guys,

In Cart module settings, there is a checkbox that allows creating user on checkout.

There you can also have an option to use email subscription.

Now if I set thig setting - than this will be happening when someone creates an order.

 

My question is, what if I need to allow user to choose this options.

In cart template, I need to create 2 checkboxes where one for "creating new user" another one for "Email subscriber".

 

Wanted to know if someone might have some hints, suggestions or maybe code-examples on this one?

/Dmitrij


Replies

 
Jonas Krarup Dam
Reply

Hi Dmitriy,

It is impossible to create an email subscriber without creating a user, so the "Create Email Subscriber" checkbox doesn't make sense without "create user". An email subscriber IS a user.

I believe that you  can chose not to make the user select a password - then the DW user will be "invisisble" to the end-user, similar to if they just subscribe to a newsletter.

Regards, Jonas

 
Dmitrij Jazel
Reply

Hi Jonas! :)

Well yes, you have the point, and that is good.

I think it would be best if we try solving one issue, than adressing the other one.

So first, you have a cart module, in the information step, I need to add a checkbox that says "create user at checkout".

When checked, password fields should appear, and user should be created when order is submited.

If that checkbox is not selected - no user must be created.

 

I do not need to program JS file, to show/hide password fields on checkbox field.

But I need to know

a) .cshtml or .html template example of this. Or any other example will do just fine. Any other, simmilar examples, or Hints, suggestions etc...

b) Cart/DW module settings for this to work.

 

I know there is setting in Cart module settings: http://screencast.com/t/hRkqHFv2BlZZ

But It WILL create user every time order is created.

What I need is: Give user an option - create user if he wants it, or just create order and do not create user. Depending if checkbox was selected or not.

 

/Dmitrij

 
Jonas Krarup Dam
Reply

Hi Dmitriy,

This is implemented in the Wrap templates.



 

you can download the wrap community edition here:

http://doc.dynamicweb.com/releases-and-downloads/releases/demos/wrap-community-edition

Regards, Jonas

 
Dmitrij Jazel
Reply

Awesome! :) I will get on it right away.

But than next part of the question, what if we need one more option to allow user to subscribe to newsletter.

Yes, the random user with customer email is created in Newsletter group, but how should I approach this?

 
Jonas Krarup Dam
Reply

Creating a user and subscribing to a newsletter is the same thing, seen from Dynamicweb.

The only difference is how you present it in your cart/templates.

 

Regards, Jonas

 

You must be logged in to post in the forum