How does Astra work with WooCommerce to add user login functionality? The Complete How-To Guide

AstraWhen building an e-commerce website with a theme and WooCommerce, it's easy to add user login functionality. Just enable the "Customer Account" feature in WooCommerce settings, the system will automatically create login, registration and account pages, Astra theme is perfectly compatible with these pages, customers can directly complete the registration, login, check orders and other operations in the front-end, without having to enter the back-end. The whole process can be set up in a few minutes without code.

图片[1]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南

I. Why should I add WooCommerce login feature in Astra?

WooCommerce The self-contained user login mechanism is mainly reflected in the:

  • Directing users to log in during shopping cart checkout
  • WooCommerce offers a "My Account" page that integrates login, registration, order management and more!

Astra's native support for WooCommerce is excellent, enhancing the user experience in the following ways:

  • Integrate login button into top navigation bar or header
  • Customizing the style of the My Account page
  • Optimize login page layout with Gutenberg editor

II. Prerequisite preparation

Install and enable the following

  • Astra Theme (recommended pairing) Astra Pro (Open more WooCommerce controls)
图片[2]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • WooCommerce plugin (official e-commerce system, free)
图片[3]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • User management assistance plug-in (optional)
    • Theme My Login (front-end login/registration interface)
    • Nextend Social Login (third-party social account login)
    • User Registration (registration field extension)

Enabling WooCommerce login function

Step 1: Enable User Registration and Login Functions

Go to backstage → WooCommerce → Settings → Accounts & Privacy, check the following options:

  • Allow customers to log in on the "My Account" page
  • Allow customers to create accounts at checkout
  • Automatic account creation for customers (optional)

After you save the settings, the My Account page will contain both the login and registration forms.

图片[4]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南

IV. Adding a "Login/My Account" portal through a customized menu

  • Backstage → Appearance → Menu
图片[5]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • Add WooCommerce's auto-generated "My Account" page (usually the /my-account)
图片[6]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • Name it."Login / My Account"or customized name
  • Can be used with plug-ins If Menu Toggle the display of "Login" and "Logout" buttons in the login status.

V. Adding Login Button to Astra Top Menu Bar

If you want the login feature to be prominently displayed in the header, you can do this in Astra's header builder:

  • Appearance → Customize → Head Builder
图片[7]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • Adding a "button" or "HTML" module
图片[8]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • Set the jump link to /my-account maybe /login
  • Button text can be "Login" or "Account Center".
图片[9]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南
  • Customize the style to match the overall design

VI. Utilization Gutenberg Optimize login page (optional)

Astra is fully compatible with Gutenberg (the WordPress native block editor) and can be used to create aCustomize the login pageand use it as the main login portal with Astra's navigation menus or buttons.

1. Creating a new "User login" page

Go to Backstage → Pages → New Page
Suggested title: "User Login" or "Account Center"

Click on "Use Gutenberg editor" (i.e. the default editing method) to edit.

图片[10]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南

2. Insertion of login form

Method 1: Insert the WooCommerce login form using the shortcode block:

  • Click on the page content area → Add block → Search and insert the "Short code" block
  • Enter the following:

Login

Register

A link to set a new password will be sent to your email address.

Your personal data will be used to support you throughout your experience with the Site, to manage access to your account, and to provide you with information on ourprivacy policyOther uses described in.

图片[11]-Astra 如何配合 WooCommerce 添加用户登录功能?完整操作指南

Note: This shortcode contains not only the login form, but also the registration form with the account information block (which is automatically switched after login)

Method 2 (advanced): Use a form plugin that supports user login, such as WPForms or User Registration, insert their shortcode after generating the form

summarize

Astra theme withWooCommercePerfectly coordinated, you can quickly build a beautiful and practical user login system without programming. Whether you use the default account page, or create a separate login portal, it can be easily realized to provide customers with a smooth shopping experience.


Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
客服微信
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: [email protected]
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
本文作者:托尼屎大颗
THE END
If you like it, support it.
kudos614 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments