Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть How to add a new dynamic row system configuration in the Magento 2 admin

  • Magento 2 Vlogs
  • 2020-11-08
  • 1675
How to add a new dynamic row system configuration in the Magento 2 admin
magentomagento2magento 2magento 2 vlogsmagento 2 tutorialmagento 2 for beginnersmagento 2 training videosmagento 2 video courselock a customer accountblock an account in magneto 2block a customerlock a customermultiple rowssystem configurationadd new dynamic row system configurationDynamic fieldsdynamic rowsadd dynamic rowscustomer attributecustomer dropdown attributenew customer attribute
  • ok logo

Скачать How to add a new dynamic row system configuration in the Magento 2 admin бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно How to add a new dynamic row system configuration in the Magento 2 admin или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку How to add a new dynamic row system configuration in the Magento 2 admin бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео How to add a new dynamic row system configuration in the Magento 2 admin

► Fanpage:   / giaphugroupcom  
► Subscribe to my channel: https://www.youtube.com/giaphugroupco...
► Skype: cuongnq87
► The website link: https://www.giaphugroup.com/magento-2...

Hi everybody, I am Cuong, welcome back to my Magento 2 tutorial video series.
#magento2 #magento #magento2tutorial #lockacustomer #customer #customerattribute
In the previous lesson, I showed everybody, How to lock a customer account in Magento 2. You can watch this lesson again in the video link https://bit.ly/3kaXNil

Today, I am going to show everybody the next best practice, How to add a new dynamic row system configuration in the Magento 2 admin by extending the Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray class.

In the previous lesson, I wrote new codes to lock a customer account to succeed. However, the message is displayed on the frontend, it is static and the same for all customers, that is not good. So we need to create a new feature that allows for managing multiple reasons. Each customer will get a particular message when their account is blocked.

We have the scenario:
We will create a new dynamic row system configuration called "Reasons list" in the Magento 2 admin, the administrator can add multiple reasons
We will create a new customer attribute called "Reason", it will have the options list from the system configuration called "Reasons list".
When the administrator selects a reason in the list, the customer will get that reason on the frontend.

So what will we do in this practice?

1. We will create a new customer attribute called "Reason" with the type is varchar
2. We will create a new dynamic row system configuration called "Reasons list" in the Magento 2 admin
3. We will update the method named beforeExecute in the PHPCuong\CustomerLogin\Plugin\Customer\Controller\Account class, with a dynamic message.

We will add the new codes into the module named PHPCuong_CustomerLogin

Okie, let's go.

Let's complete this practice you need to follow steps by step:

Step 1: We will create a new customer attribute called "Reason"

Add the new codes into the file named InstallData.php

Create a new file named Reason.php in the path app/code/PHPCuong/CustomerLogin/Model/Customer/Attribute/Source

Step 2: We will create a new dynamic row system configuration called "Reasons list" in the Magento 2 admin
This step is the main content, I want show it to everybody in this video.
We will add this new field in the path STORES - Configuration - Customers - Customer Configuration - Reasons List
Create a new file named system.xml in the path app/code/PHPCuong/CustomerLogin/etc/adminhtml
Create a new file named Reasons.php in the path app/code/PHPCuong/CustomerLogin/Block/Adminhtml/Form/Field
Create a new file named array.phtml in the path app/code/PHPCuong/CustomerLogin/view/adminhtml/templates/system/config/form/field
Add these codes into the named customer_form.xml in the path app/code/PHPCuong/CustomerLogin/view/adminhtml/ui_component

Step 3: We will update the method named beforeExecute in the PHPCuong\CustomerLogin\Plugin\Customer\Controller\Account class, with a dynamic message.

Step 4: Test and see the results
1. Delete the module named PHPCuong_CustomerLogin in the table named setup_module
I did this step for installing the new module named PHPCuong_CustomerLogin, I don't upgrade this module. I mean it will be installed again. Magento will call the class InstallData.php for adding the new customer attribute.

2. Run the following command lines:
php bin/magento setup:upgrade --keep-generated

3. Go to the backend:
Set the reasons list in the configuration in the path STORES - Configuration - Customers - Customer Configuration - Reasons List
Set the reason to a customer blocking

4. Go to the storefront, then try to log in

It works perfectly.

Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below.

Don't forget to like, comment, share and subscribe to my channel for getting the latest video.

Please do not hesitate to contact me if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.

You can get the source codes of this lesson here: https://github.com/php-cuong/customer...

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]