Tự động cho user vô danh checkout trong Drupal Commerce

Tự động cho user vô danh checkout trong Drupal Commerce

Here's a quick howto on how to log in a new user right after the point of purchase in the case of an anonymous checkout in Drupal Commerce. This way a user doesn't have to go 'off-site' to check their email and confirm their account. You give them access to the account right at the point of purchase and you can instantly show the user content that's only available for users.

Step 1 - Make sure anonymous checkout is enabled

Check and make sure your anonymous user has access to the stores checkout at admin/people/permissions. The permission is called 'Access checkout' under 'Checkout'.

Permission to access Commerce Checkout

You can read more about the differences between authenticated and anonymous checkout in Drupal Commerce in this article.

Step 2 - Enable the module

Enable the Commerce Immediate Login module in Simon Georges's sandbox at  http://drupal.org/sandbox/simongeorges/1676742 - Thank you Simon for making this possible!

Step 3 - Add the Login action to the Rule

  • Edit the Rule "Create a new account for an anonymous order" at Administration -> Configuration -> Workflow ->Rules (it's located at admin/config/workflow/rules/reaction/manage/commerce_checkout_new_account). 
  • Click 'Add action' at the bottom of the page
  • Select 'Log in user' as the action to add (it's located under System)
  • enter 'account-created' as data selector.
  • (save)

The Rule result is supposed to look like this:

The action to add to the Rule to enable automatic login

Step 4 - Test, Enjoy & Give back

Now make sure to test your checkout process for anonymous users. Be aware of the fact that 'the devil is in the detail' regarding the checkout process. Make sure to test test test. And remember: adding your experience and test results to the designated issue queues makes your own Drupal site better :) thanks.

Important note

"Just remember not to use this feature on the rule to Assign an anonymous order to a pre-existing user, as there is in core no password verification to ensure the anonymous user actually owns the account associated with the e-mail address they entered on the checkout form."  (Ryan Szrama)

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Nga lo kinh tế không chịu nổi vì dịch COVID-19

Số người nhiễm COVID-19 ở Nga chính thức vượt qua Trung Quốc trên 87.000

Theo RIA Novosti, số người nhiễm COVID-19 ở Nga chính thức vượt qua Trung Quốc hôm đầu tuần này (trên 87.000 so với gần 83.000 ở Trung Quốc), xếp thứ 9 thế giới về quy mô.

New website

Những thủ thuật SEO cho website mới 2011

Nếu nói về những thủ thuật SEO cho một website mới chắc nhiều bạn đã ngao ngán với vô số các bài đọc về việc làm sao để được index nhanh, làm sao để nhanh qua sandbox của Google ...

Giấy phép ICP [Bộ Thông tin & Truyền thông cấp] là gì?

Giấy phép ICP [Bộ Thông tin & Truyền thông cấp] là gì?

ICP là giấy phép cung cấp thông tin trên thiết lập trang tin điện tử trên Internet, nói nôm na là giấy phép mở trang web, được cấp theo Quyết định số 27/2002/QĐ-BVHTT ngày 10/10/2002 ban hành ban hành

Công ty diệt chuột T&C

 

Diet con trung