Know the Mage
Know the Mage
  • 53
  • 15 794
04 Managing API Permissions and ACL Resources - REST API Series
We will explore how to manage API access permissions and control them within active sessions. Additionally, we’ll discuss implementing an Access Control List (ACL) to securely restrict access to critical APIs.
Chapters:
0:00 Introduction
0:21 Identify APIs needing ACL
0:42 Customer APIs
2:14 Generate customer token
2:57 Utilize Customer token in API
3:30 Identify admin APIs
3:43 Create ACL resources
4:33 Utilize ACL resources
4:48 Generate Admin token
5:05 Utilizing admin token
5:55 Generating OTP key
6:17 Generate access token using OTP key
7:13 Closing
#magento2 #restapi #magentoapi #technology
#Customization in Magento2 #acl #acl_permissions_in_magento2
Переглядів: 13

Відео

03 Creating REST API using Service Contracts - REST API Series
Переглядів 3814 годин тому
In this tutorial, we will modify interfaces in line with Service Contract principles, create a membership table to store records of membership plans, and implement CRUD operations using service contracts. Chapters: 0:00 Introduction 0:24 Create membership_entity table 1:34 Add membership Customer Attribute 4:48 Update the interfaces 5:19 Create Membership Resource & Collection Models 7:23 Creat...
02 Understanding Service Contracts - REST API Series
Переглядів 1516 годин тому
We will talk about service contracts, data interfaces, and service contracts in depth, exploring their purpose and the structure of service interfaces, as well as their classification into various types. Chapters: 0:00 Introduction 0:08 Service contracts 0:30 Classification of Service Contracts 0:38 Data Interfaces 1:22 Service Interfaces 1:39 Types of service interfaces 1:50 Repository Interfa...
01 Getting Started - REST API Series
Переглядів 3219 годин тому
In this tutorial, we will cover the fundamental process of creating REST APIs through a simple example. We will focus on developing REST APIs for managing membership plans. Chapters: 0:00 Introduction 0:06 Create a simple API 0:24 Create a Membership Interface 0:53 Implementing the Membership Interface 2:03 Create webapi.xml file 2:43 What is a service node? 3:18 Using POSTMAN 4:50 Improving AP...
Introduction - REST API Series
Переглядів 2819 годин тому
We will explore REST APIs, starting with fundamental concepts and progressing to a comprehensive understanding. Additionally, we will cover access control mechanisms for securing these APIs. Finally, we will develop unit tests to ensure the reliability and functionality of the APIs. #magento2 #restapi #magentoapi #howtocreaterestapi #technology #Customization in Magento2
Understanding View Models in Magento 2 #magento2 #viewmodels
Переглядів 844 місяці тому
View model is a sort of a design pattern, used to separate business logic layer from presentation. The separation enhances the maintainability and testability of the code providing a clean structure for handling data and logic associated with the views. Chapters: 0:00 Introduction 0:09 What are view models? 0:26 Helpers vs View models 0:57 When to use view models? 1:12 Writing a custom view mod...
How to implement Checkout Custom Layout Processor in Magento 2 #checkout
Переглядів 925 місяців тому
Discover how the checkout processor can streamline the complexity of checkout, particularly customizing the checkout fields. Chapters: 0:00 Introduction 0:08 Overview 0:18 Checkout dependency 0:38 Layout rendering overview 1:31 Understanding with diagrams 2:52 Injecting custom layout processor 4:13 Shipping field dropdown 6:17 Billing field dropdown 9:05 Display billing address after Payment me...
How to customize and display a loader widget - Magento 2 #magento2 #jquery #widgets
Переглядів 1096 місяців тому
The loader is designed to block content initialization during an Ajax request, but it's versatile enough to be configured for non-Ajax tasks as well. We will explore the way we can initialize and customize this widget. Chapters: 0:00 Introduction 0:05 Goal 0:27 Setup a template file 1:12 Initialize the script 1:39 Initialize the widget 1:56 Methods 2:30 Test the output 2:49 Add custom icon 3:49...
Auto-select shipping method and Proceed to Payment Section in Magento 2 #magento2 #checkout
Переглядів 1298 місяців тому
In this tutorial, we will discuss the customization and automation of the checkout process. Once a user has entered or selected their shipping address, Magento will automatically select the first method from the rates list and proceed directly to the payment page. Chapters: 0:00 Introduction 0:05 Goal 0:23 Checkout data resolver mixin 2:30 Selecting a shipping method 4:12 Create shipping compon...
Javascript Mixins Explained in Magento 2 #magento2 #mixins #knowthemage #javascripttutorial
Переглядів 3529 місяців тому
A mixin is a class whose methods are added to another class resulting a new instance of component, consisting of modified version of target class. In magento we can create mixins for JS Components, JS Object, JS function and jquery widgets. We will explore with examples to demonstrate how we can create mixins in magento2 javascript. Chapters: 0:00 Introduction 0:05 What are JavaScript mixins 0:...
How to display the address list in ShipTo Section #magento2 #checkout
Переглядів 13111 місяців тому
In this tutorial, our focus will be on enhancing the user experience by displaying the shipping address drop-down within the ship-to section on the checkout payment page. This will be accomplished by modifying the edit action at ship-to section. By clicking the edit action, customers will have access to a drop-down containing their shipping addresses. Guest user or customer with no address cann...
How to display order summary in a modal in Magento 2 #magento2 #magentocommerce #checkout #order
Переглядів 174Рік тому
In this post, we will discuss an alternative approach to presenting the order summary on both the cart and checkout pages by utilizing a modal. A button will serve as the trigger for this modal, which will provide a convenient way to view the complete order summary. Our goal is to implement a simpler and more manageable solution to achieve this desired functionality. Chapters: 0:00 Introduction...
To-do list | Part-14 Perform CRUD operations on Task Items | Projects in Magento 2 #magento2
Переглядів 103Рік тому
In this video of To-do series, we will undergo a complete transformation of Task management, making it dynamic. We will perform all CRUD (Create, Read, Update, Delete) operations to manage tasks in the backend. #magento2 #magentocommerce #crud #todolist #tasklist Chapters: 0:00 Introduction 0:08 Create Task Management Model 1:55 Create task Abstract controller 2:23 Create task Index Controller ...
To-do list | Part-13 Create, Update and Delete to-do items | Projects in Magento 2 #magento2
Переглядів 95Рік тому
To-do list | Part-13 Create, Update and Delete to-do items | Projects in Magento 2 #magento2
To-do list | Part-12 Retrieve and display the list of todo items | Projects in Magento 2 #magento2
Переглядів 139Рік тому
To-do list | Part-12 Retrieve and display the list of todo items | Projects in Magento 2 #magento2
To-do list | Part-11 Working with declarative schema | Projects in Magento 2 #magento2
Переглядів 66Рік тому
To-do list | Part-11 Working with declarative schema | Projects in Magento 2 #magento2
Displaying registration form in authentication popup in magento 2 #magento2
Переглядів 365Рік тому
Displaying registration form in authentication popup in magento 2 #magento2
To-do list | Part 10 Adding Icons & styles | Projects in Magento 2 #magento2
Переглядів 118Рік тому
To-do list | Part 10 Adding Icons & styles | Projects in Magento 2 #magento2
To-do list | Part 09 Creating the submit binding | Projects in Magento 2 #magento2
Переглядів 73Рік тому
To-do list | Part 09 Creating the submit binding | Projects in Magento 2 #magento2
To-do list | Part 08 Working With Task Component | Projects in Magento 2 #magento2
Переглядів 146Рік тому
To-do list | Part 08 Working With Task Component | Projects in Magento 2 #magento2
To-do list | Part-07 Validations And Items Management | Projects in Magento 2 #magento2
Переглядів 106Рік тому
To-do list | Part-07 Validations And Items Management | Projects in Magento 2 #magento2
To-do list | Part 06 - Component Data Provider and Linking Properties | Magento 2 #magento2
Переглядів 220Рік тому
To-do list | Part 06 - Component Data Provider and Linking Properties | Magento 2 #magento2
To-do list | Part 05 - Creating a UI Element and understanding UI Registry | #magento2
Переглядів 299Рік тому
To-do list | Part 05 - Creating a UI Element and understanding UI Registry | #magento2
To-do list | Part 04 - Simplifying the components using jsLayout | Projects in Magento 2 #magento2
Переглядів 231Рік тому
To-do list | Part 04 - Simplifying the components using jsLayout | Projects in Magento 2 #magento2
To-do list | Part 03 - Working with variables in LESS | Projects in Magento 2 #magento2
Переглядів 158Рік тому
To-do list | Part 03 - Working with variables in LESS | Projects in Magento 2 #magento2
To-do list | Part 02 - Styling to-do list and working with LESS | Projects in Magento 2
Переглядів 208Рік тому
To-do list | Part 02 - Styling to-do list and working with LESS | Projects in Magento 2
To-do list | Part 01- Begin with to-do frontend | Implement To-do list project in Magento 2
Переглядів 422Рік тому
To-do list | Part 01- Begin with to-do frontend | Implement To-do list project in Magento 2
Implement To-do List project in Magento2 | Getting started | Working with Projects in Magento 2
Переглядів 389Рік тому
Implement To-do List project in Magento2 | Getting started | Working with Projects in Magento 2
Add a custom button to minicart in Magento 2 | Magento 2 | Knowthemage
Переглядів 676Рік тому
Add a custom button to minicart in Magento 2 | Magento 2 | Knowthemage
How to create knockoutJS Observables in magento 2 | Magento 2
Переглядів 803Рік тому
How to create knockoutJS Observables in magento 2 | Magento 2

КОМЕНТАРІ

  • @ashish_1
    @ashish_1 6 хвилин тому

    I also have a question , how can I hit these Api which have resource as self from my code like from js file . Eg :- I need to hit an API for customer token generation and then pass that as bearer token further?? An example will be helful . Thanks for the video ..

  • @ashish_1
    @ashish_1 14 хвилин тому

    Waiting for next videos by you in this series.

  • @ashish_1
    @ashish_1 8 днів тому

    Thank you very much sir for this series . You are best teacher and friend .Always thank full to you for sharing with us your knowledge .

  • @bohdanbatsenko4843
    @bohdanbatsenko4843 8 днів тому

    Looking forward to next series

  • @АртурПоздняк-я9х
    @АртурПоздняк-я9х 8 днів тому

    We are looking forward to the video

  • @theiskito99
    @theiskito99 Місяць тому

    which IDE is that?

    • @knowthemage
      @knowthemage Місяць тому

      PHP Storm www.jetbrains.com/phpstorm/

  • @EricLibay
    @EricLibay 2 місяці тому

    Is there any difference in declaring the component using jslayout in the cms_index_index.xml file?

    • @knowthemage
      @knowthemage 2 місяці тому

      The process is quite similar. You begin with the component node in the layout file (right under jsLayout argument node), then use the jsLayout method in PHP to render it within the PHTML file. The rendering data will act as the value to the js app module (Magento_Ui/js/core/app).

  • @tem_vremenem_v_kanade
    @tem_vremenem_v_kanade 3 місяці тому

    Excellent thank you!

  • @tem_vremenem_v_kanade
    @tem_vremenem_v_kanade 3 місяці тому

    Very nice thank you

  • @AnkushUkey-k6l
    @AnkushUkey-k6l 4 місяці тому

    hello can you make a video on how to override magento default website restriction using custom module, also i want to whitelist my custom module to use my urls white website restriction is on, can you please help??

    • @knowthemage
      @knowthemage 4 місяці тому

      Sure, I will create a video on the requested topic soon.

  • @zakidev
    @zakidev 4 місяці тому

    Hello, how can i display a custom form after clicking on a link with a specific class?

    • @knowthemage
      @knowthemage 4 місяці тому

      The simplest way is to use click event using jquery. The event will be applied on the anchor element, and make sure to return false. Here is the sample for you: <form class="my-custom-form-class" style="display: none;"> .... </form> <a href="" class="openform">Link to open the form</a> <script> requirejs(['jquery', 'domReady!'], function($) { $(document).ready(function() { $('.openform').on('click', function() { $("form.my-custom-form-class").show(); return false; }); }); }); </script> If you want to toggle (show/hide) using same button, then use the toggle function: $("form.my-custom-form-class").toggle(); I hope this will be helpful for you.

    • @knowthemage
      @knowthemage 4 місяці тому

      feel free to reach out if you have any specific topics or questions

  • @carlosmdez8342
    @carlosmdez8342 4 місяці тому

    Nice!. Thank you

  • @knowthemage
    @knowthemage 5 місяців тому

    Github repository: github.com/KnowTheMage/custom-layout-processor

  • @bohdanbatsenko4843
    @bohdanbatsenko4843 5 місяців тому

    Great content. Messing with layout processor always scares me. But thanks to explanation working it out a bit.

    • @knowthemage
      @knowthemage 5 місяців тому

      Thank you for appreciation. More content is in the timeline

  • @dolfera1962
    @dolfera1962 5 місяців тому

    Have course?

    • @knowthemage
      @knowthemage 5 місяців тому

      Not yet, but it's on the timeline. I will create soon

    • @dolfera1962
      @dolfera1962 5 місяців тому

      @@knowthemage Ok.Thank you!

  • @carlosmdez8342
    @carlosmdez8342 5 місяців тому

    Nice

  • @afzelarshad96
    @afzelarshad96 5 місяців тому

    greate

  • @Alex-bc3tt
    @Alex-bc3tt 5 місяців тому

    This is by far the best mixins explanation

  • @knowthemage
    @knowthemage 5 місяців тому

    Find the code in Github repository here: github.com/KnowTheMage/loader-widget

  • @Alex-bc3tt
    @Alex-bc3tt 5 місяців тому

    Isn't it good practice to define the template inside the knockout js component in the default section rather than defining template in the .phtml template?

    • @knowthemage
      @knowthemage 5 місяців тому

      Indeed it is the best practice to defined the template within your component by default. The purpose of defining component template from phtml was to demonstrate the component creation keeping the simplicity in mind.

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    can you make seprate playlist only focused on knockout js and require js in magento2

  • @knowthemage
    @knowthemage 6 місяців тому

    @afzelarshad96 thanks for pointing out. It seems the behavior is due to Luma theme. Display it using following css: .actions-toolbar > .secondary .action.back { display: block }

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    it appears in source code but doesn't display

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    why is the back button not displaying

  • @ashish_1
    @ashish_1 6 місяців тому

    Thanks for the video , please make some videos on layout processors..

    • @knowthemage
      @knowthemage 6 місяців тому

      Sure thing! Noted your request.

    • @ashish_1
      @ashish_1 6 місяців тому

      @@knowthemage Waiting for more great content from your side in future...

  • @Uncaught_in_promise
    @Uncaught_in_promise 6 місяців тому

    Hi! Thanks for a good stuff. Haven't heard from you for quite a time

    • @knowthemage
      @knowthemage 6 місяців тому

      Hi, I'm glad you liked the content. Apologies for the silence; I've been quite busy lately. I'll be actively engaging with the channel, so expect plenty of upcoming posts.

  • @carlosmdez8342
    @carlosmdez8342 6 місяців тому

    Just to say thank you. Your videos are very informative. I am glad I found your channel

    • @knowthemage
      @knowthemage 6 місяців тому

      That's wonderful to hear! I'm really glad you're finding the videos helpful and informative. It's always great to know that the content is making a positive impact. Stay tuned, new content coming soon.

  • @knowthemage
    @knowthemage 6 місяців тому

    @afzelarshad96 Please find the github repository here: github.com/arsalanworld/km-todo-tutorial

  • @knowthemage
    @knowthemage 6 місяців тому

    Github repo: github.com/arsalanworld/custom-tab

  • @knowthemage
    @knowthemage 6 місяців тому

    Hi @afzelarshad96 thank you for your comment. Here are the blogs related to this post: Part 1: knowthemage.com/create-dynamic-custom-tabs-on-product-view-page/ Part 2: knowthemage.com/create-dynamic-custom-tabs-on-product-page-part-2/

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    please bro also share code

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    or git repo with code

  • @afzelarshad96
    @afzelarshad96 6 місяців тому

    share source code also

  • @PrinceKumar-kv9nq
    @PrinceKumar-kv9nq 7 місяців тому

    Nice tutorial 🎉

    • @knowthemage
      @knowthemage 7 місяців тому

      I'm glad it was helpful!

  • @AnkushUkey-k6l
    @AnkushUkey-k6l 8 місяців тому

    is there any way to display a custom button in the popup authentication file? i tried adding a button in .html file but i want to use $block from my custom module but in .html we cant use php function like i want to add <div class="primary"> <a href="'.$this->getUrl(null,$this->getAppName()).'" class="action login primary" style="padding: 1% 14%;"> <span>'.$this->getText().'</span> </a> </div> $this refer to my namespace vendor\module\Block;....plz help

    • @knowthemage
      @knowthemage 8 місяців тому

      No you can't call php method directly inside template ".html". All you need to pass the dynamic data to the component and then retrieve inside your html file. I have a post on this topic, please checkout: ua-cam.com/video/G7jsz1FYeHI/v-deo.html You can also check the post on blog: knowthemage.com/how-to-pass-dynamic-variables-to-a-component-in-magento-2/

    • @AnkushUkey-k6l
      @AnkushUkey-k6l 8 місяців тому

      @@knowthemage but i did it using phtml only , i just call a phtml file in html and using xml already define phtml,html both

  • @pratikgiramkar4977
    @pratikgiramkar4977 8 місяців тому

    Could you please make a video on publishing module on Magento marketplace??

    • @knowthemage
      @knowthemage 8 місяців тому

      Hello Pratik, thank you and noted your request. The upcoming post will be on this topic in a couple of weeks. Thank you for your patience!

    • @pratikgiramkar4977
      @pratikgiramkar4977 8 місяців тому

      @@knowthemage I am veryyy eagerly waiting for it 🙏🏻

    • @pratikgiramkar4977
      @pratikgiramkar4977 8 місяців тому

      @@knowthemage Hey, and please do cover things in details, both the coding part and the other. And can I publish a module without a composer setup? I just have a manual installation for the time being.

    • @knowthemage
      @knowthemage 8 місяців тому

      Sure & thank you. Noted the suggestion. Installing magento module manually is not recommended. However you can achieve that in following steps: Step 1: Add your module into the app/code directory Step 2: Inside db, run following query (make sure to replace with your module name in query): INSERT INTO `setup_module` VALUES ("Know_MyModule","1.0.0","1.0.0"); Step 3: If there are database entities involve, do create them using sql statement(s) Step 4: Delete following sub folders under magento var directory: -> delete everything under generated folder. -> delete everything under cache folder. -> delete everything under view_preprocessed folder. -> delete everything under static folder Step 5: Open app/etc/config.php and add your module like: 'Know_MyModule' => 1, Step 6: (Optional) flush cache from admin panel. Step 7: Test your page or configuration This should work.

    • @pratikgiramkar4977
      @pratikgiramkar4977 7 місяців тому

      Hey @knowthemage Waiting for your video 😢

  • @ashish_1
    @ashish_1 9 місяців тому

    Thanks for increasing our knowledge and telling us the usage of mixins.

    • @knowthemage
      @knowthemage 9 місяців тому

      My pleasure!

    • @ashish_1
      @ashish_1 9 місяців тому

      ​@@knowthemage Thanku very much , but what if I want to make a mixin , if the type of address I get is 'custimer-address' on loading the shipping page , then trigger a click on next button automatically and got proceed to billing page directly Can this be done , and address-type==='customer-address' , we will get only when customer is logged in

    • @knowthemage
      @knowthemage 9 місяців тому

      I suggest to create a mixin for "Magento_Checkout/js/model/checkout-data-resolver" file and add custom logic for "resolveShippingRates" method. Then using quote model do followings: 1- Make sure address type is 'customer-address'. 2- Check if shipping method was not selected select it (using select shipping method action). 3- Either use jquery to trigger the next button click, or you can use 'Magento_Checkout/js/action/set-shipping-information' as dependency, set the dependency and navigate to next screen using 'Magento_Checkout/js/model/step-navigator' js model.

    • @knowthemage
      @knowthemage 9 місяців тому

      I will soon come with a new post on this topic.

    • @ashish_1
      @ashish_1 9 місяців тому

      @@knowthemage I have tried using quote to get shipping method type but it returns null , don't know why it's giving null .

  • @Uncaught_in_promise
    @Uncaught_in_promise 9 місяців тому

    Great content. I always confuse mixins. Also need more clear difference berween extending ui components and mixins. What are common use cases

    • @knowthemage
      @knowthemage 9 місяців тому

      Thank you. Mixins are useful when existing behavior modification is needed. This approach can also be termed as extending via mixins. Extending UI Components mean to create a new or a custom feature using existing or available functionality. I will come up with another tutorial on this topic soon.

  • @pratikgiramkar4977
    @pratikgiramkar4977 9 місяців тому

    Hey, can you make a video on how to publish a Magento module on marketplace? I have been waiting for it, and I love reading blogs you put, they are also very handy when you need help, please start putting them again, it's been long.

    • @knowthemage
      @knowthemage 9 місяців тому

      Hello there! I sincerely appreciate your positive response and I truly appreciate your patience. I will be active soon next week and I'll definitely prioritize creating a video tutorial on the process of publishing a Magento module on the marketplace. Thank you very much.

  • @knowthemage
    @knowthemage 10 місяців тому

    Guys please fix the rendering register block by replacing the index controller with following code: `Know\Module\Controller\Index\Index` <?php namespace Know\Module\Controller\Index; use Magento\Framework\App\ActionInterface; use Magento\Framework\App\ResponseInterface; use Magento\Framework\Controller\Result\JsonFactory; use Magento\Framework\View\Result\PageFactory; class Index implements ActionInterface { private PageFactory $pageFactory; private JsonFactory $jsonFactory; /** * @var \Magento\Customer\Block\DataProviders\AddressAttributeData */ private $attributeData; /** * @var \Magento\Customer\ViewModel\Address\RegionProvider */ private $regionProvider; /** * @var \Magento\Customer\ViewModel\CreateAccountButton */ private $createAccountButtonViewModel; public function __construct( PageFactory $pageFactory, JsonFactory $jsonFactory, \Magento\Customer\Block\DataProviders\AddressAttributeData $addressAttributeData, \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider, \Magento\Customer\ViewModel\CreateAccountButton $createAccountButtonViewModel ) { $this->pageFactory = $pageFactory; $this->jsonFactory = $jsonFactory; $this->attributeData = $addressAttributeData; $this->regionProvider = $regionProvider; $this->createAccountButtonViewModel = $createAccountButtonViewModel; } public function execute() { $resultPage = $this->pageFactory->create(); /** @var \Know\Module\Block\Form\Register $block */ $block = $resultPage->getLayout() ->createBlock(\Know\Module\Block\Form\Register::class); $block->setData('attribute_data' , $this->attributeData); $block->setData('region_provider' , $this->regionProvider); $block->setData('create_account_button_view_model' , $this->createAccountButtonViewModel); $html = $block->setTemplate('Magento_Customer::form/register.phtml') ->toHtml(); $resultJson = $this->jsonFactory->create(); $resultJson->setData([ 'data' => $html ]); return $resultJson; } }

  • @joelestacio247
    @joelestacio247 10 місяців тому

    Your tutorial my friend helped me a lot ♥, I just have a question reviewing the request that is made when it is given in the register button of the modal the first time it gives status 500, and then it is done correctly, do you know why this happens?

    • @knowthemage
      @knowthemage 10 місяців тому

      The issue is missing dependencies, which are actually passed in `customer_account_create.xml` file and used by the register.phtml: attribute_data, region_provider and create_account_button_view_model I have seen this issue in the latest versions. So let's fix that. Replace your controller with following code: `Know\Module\Controller\Index\Index`, add following dependancies: <?php namespace Know\Module\Controller\Index; use Magento\Framework\App\ActionInterface; use Magento\Framework\App\ResponseInterface; use Magento\Framework\Controller\Result\JsonFactory; use Magento\Framework\View\Result\PageFactory; class Index implements ActionInterface { private PageFactory $pageFactory; private JsonFactory $jsonFactory; /** * @var \Magento\Customer\Block\DataProviders\AddressAttributeData */ private $attributeData; /** * @var \Magento\Customer\ViewModel\Address\RegionProvider */ private $regionProvider; /** * @var \Magento\Customer\ViewModel\CreateAccountButton */ private $createAccountButtonViewModel; public function __construct( PageFactory $pageFactory, JsonFactory $jsonFactory, \Magento\Customer\Block\DataProviders\AddressAttributeData $addressAttributeData, \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider, \Magento\Customer\ViewModel\CreateAccountButton $createAccountButtonViewModel ) { $this->pageFactory = $pageFactory; $this->jsonFactory = $jsonFactory; $this->attributeData = $addressAttributeData; $this->regionProvider = $regionProvider; $this->createAccountButtonViewModel = $createAccountButtonViewModel; } public function execute() { $resultPage = $this->pageFactory->create(); /** @var \Know\Module\Block\Form\Register $block */ $block = $resultPage->getLayout() ->createBlock(\Know\Module\Block\Form\Register::class); $block->setData('attribute_data' , $this->attributeData); $block->setData('region_provider' , $this->regionProvider); $block->setData('create_account_button_view_model' , $this->createAccountButtonViewModel); $html = $block->setTemplate('Magento_Customer::form/register.phtml') ->toHtml(); $resultJson = $this->jsonFactory->create(); $resultJson->setData([ 'data' => $html ]); return $resultJson; } }

    • @knowthemage
      @knowthemage 10 місяців тому

      Thank you very much for pointing out.

    • @joelestacio247
      @joelestacio247 10 місяців тому

      @@knowthemage There is another problem friend, when trying to inject \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider, and \Magento\Customer\ViewModel\CreateAccountButton $createAccountButtonViewModel It tells me that these are classes that do not exist, can you help me with this please?

    • @knowthemage
      @knowthemage 10 місяців тому

      It looks like you are using previous Magento version. Remove the "\Magento\Customer\ViewModel\CreateAccountButton" dependancy. And inside execute method remove: "$block->setData('create_account_button_view_model', $this->createAccountButtonViewModel);", then remove the generated content and flush the cache. If this still not work, try with removing "\Magento\Customer\ViewModel\Address\RegionProvider" dependancy and its related code.

    • @knowthemage
      @knowthemage 10 місяців тому

      Regarding your previous issue, double check other conflicting modules or theme related to the customer registration template file.

  • @ashish_1
    @ashish_1 11 місяців тому

    Please help to understand the layout processor , how can we add fields in billing forms and then take the value of fields into order success email and invoice of custom fields added in the billing address form.

    • @knowthemage
      @knowthemage 11 місяців тому

      It sounds like you want to add custom fields to billing address only?

    • @ashish_1
      @ashish_1 11 місяців тому

      @@knowthemage yes , but sir first thanks for every lecture u provided . Basically I want to understand the topic of layout processor in depth , how after adding any field we can proceed further and get the value of custom added field in order success mail and in invoices etc. Yaa adding field in billing form , I don't know how to proceed because we have option in admin that we need seperate billing address or with each payment method we can also billing form , here I am confused how to take seperately both in layout processor. Please make a detail video for full flow and understanding how we can add and fetch data . Waiting for your video. Thanks in advance sir.

    • @knowthemage
      @knowthemage 11 місяців тому

      Sure, I'll come up with this post in a couple of weeks.

  • @AnkushUkey-k6l
    @AnkushUkey-k6l 11 місяців тому

    what is the use of db_schema_whitelist.json file?

    • @knowthemage
      @knowthemage 11 місяців тому

      The use of the db_schema_whitelist.json file in Magento 2 is considered a temporary solution to encourage developers, to define their database structures in declarative schema XML files. This file is used to specify which database tables are allowed and disallowed during the setup and upgrade processes. *New Table*: When creating a new table, remember to generate the db_schema_whitelist.json file. *Drop Table*: When dropping a table, do not remove it from the db_schema_whitelist.json file, otherwise it will not be dropped. *Rename Table*: When renaming a table, remember to regenerate the db_schema_whitelist.json file so it contains the new name in addition to the old one. *New Column*: When adding a new column into table, remember to generate the db_schema_whitelist.json file. *Drop a Column*: It is possible to drop a column only if it exists in the db_schema_whitelist.json file. *Drop a foreign key*: It is possible to drop a foreign key only if it exists in the db_schema_whitelist.json file. See more in documentation: developer.adobe.com/commerce/php/development/components/declarative-schema/migration-scripts/

  • @Uncaught_in_promise
    @Uncaught_in_promise 11 місяців тому

    Some ideas: if we add custom form to checkout steps, a regular validation won't work. I mean not a regular login form ui component, but custom ui component (which is custom step in fact). Validation in phtml and in knockout templates works in different way. I've come across this issue recently. I had to copypaste logic from Magento_Checkout::js/view/form/element/email.js. It would be interesting for example to create a custom step with a custom form and validate fields. Also it'd be interesting how to render custom CMS blocks. For example, show custom CMS block only on certain steps (subscribe to stepNavigator?).

    • @knowthemage
      @knowthemage 11 місяців тому

      Handling validation for custom forms in a ui component can indeed be tricky. You must introduce the custom validation for that. Instead there can be a separate component for a custom form which could also include the validation. Creating a custom step with a custom form and validating fields is an interesting idea. *Next tutorial is coming soon on this topic.* There are many ways you can get output from rendered CMS blocks. You can render it in PHTML template and assign it to the global JS config, such as utilizing `window.checkoutConfig` and appending the CMS block output string to it. Alternatively, you can initiate an AJAX request to a controller responsible for rendering the CMS block.

  • @Uncaught_in_promise
    @Uncaught_in_promise Рік тому

    Thank you for valuable tutorials. Checkout has always been overcomplicated for me but I am progressing step by step thanks toy your channel. It's great that you are teaching practical things.

    • @knowthemage
      @knowthemage Рік тому

      Thank you so much for your kind words! Teaching practical things is at the core of what I aim to do, and I appreciate your positive feedback. If you have any specific topics or questions you'd like covered in future tutorials, feel free to let me know. Happy Coding!

  • @AnkushUkey-k6l
    @AnkushUkey-k6l Рік тому

    here i want to invoke an event and and observer i want to redirect to some other page with the help of controllers which should also be seen in the frontend and check certain condtiton and if that condition is true then only proceed the next steps else throw error ..... can i acheive this????...like after shipping when we click next i want to display some other screen in frontend and verifify guest user identity and if true then proced to next step....is this possible....plzz help

    • @knowthemage
      @knowthemage Рік тому

      So do you want to introduce an additional step on the checkout page, where you prompt the customer to sign in?

    • @AnkushUkey-k6l
      @AnkushUkey-k6l Рік тому

      @@knowthemage no i just want to add additional step to verify guest user email when they click on next during shipping for this i want to redirect to some other page with the help of controllers,

    • @knowthemage
      @knowthemage Рік тому

      Why use controllers when this can be achieved with JavaScript? You can perform a redirection after sending a shipping information request to the server and modify the response data accordingly. Based on the response, you can then perform the necessary actions, like redirection or allow further steps.

    • @AnkushUkey-k6l
      @AnkushUkey-k6l Рік тому

      @@knowthemage i didnt understand ur method is this possible to redirect using js in my custom module??

    • @knowthemage
      @knowthemage Рік тому

      Indeed you can do that

  • @Uncaught_in_promise
    @Uncaught_in_promise Рік тому

    Why to write all logic on summary-mixin? Could it be more straightforward to write the logic simply in cart/summary-modal.js?

    • @knowthemage
      @knowthemage Рік тому

      If we were to create the logic directly within the 'cart/summary-modal,' we'd find the need to duplicate it within the 'checkout summary' component, which undermines code reusability. So to avoid this issue we need a central or an abstract component like 'summary-mixin'. Examining the requirejs-config, we will notice that the 'summary-mixin' component is used as mixin for both our custom `summary-modal` component on cart page and the `summary` component on the checkout page.

  • @abdulrahmanmasoud
    @abdulrahmanmasoud Рік тому

    keep going man don't stop

    • @knowthemage
      @knowthemage Рік тому

      Thank you, your words of encouragement mean a lot! Stay tuned for more exciting content!

    • @abdulrahmanmasoud
      @abdulrahmanmasoud Рік тому

      Waiting all your tuts

  • @CS-yh3jz
    @CS-yh3jz Рік тому

    Hello Nice tutorial sir. Can u help to get address-list component in shipping checkout , under ship to section on payment page , the address-list section should appear under the ship-to with all default functionality , as we get on shipping page >> when customer is logged in and get on shipping page ,his all addresses saved by default by him. Please make video on this and help to understand how we can move such components in KO from shipping page to payment under any area . Thanks in advance.

    • @knowthemage
      @knowthemage Рік тому

      Thank you for your support. I will certainly consider your request, and will come up soon with a new post on this topic. So we will learn how to relocate the billing address to shipping section, positioning it just below the shipping address/form. Stay tuned for updates.

    • @CS-yh3jz
      @CS-yh3jz Рік тому

      @@knowthemage ok , thanks for your reply . Yaa that will be a good enhancement. can we move the address list from shipping page to any other section like ship to section .

    • @knowthemage
      @knowthemage Рік тому

      Sure, let's proceed with displaying the address list in the 'Ship To' section in coming post. Stay tuned!

    • @knowthemage
      @knowthemage Рік тому

      @CS-yh3jz Here is the tutorial you requested: ua-cam.com/video/IoE06_uU9eM/v-deo.html Happy Coding!

  • @uladzislaumikhailau7979
    @uladzislaumikhailau7979 Рік тому

    thanks for the videos, can you please share these files?

    • @knowthemage
      @knowthemage Рік тому

      You're very welcome! I'm glad you found the content helpful. The blog posts will be published shortly, and we also have more to-do list tutorial in the pipeline. In the meantime, you can check out our GitHub repository: github.com/arsalanworld/km-todo-tutorial