Categories

How to call Login form in another PHTML file or CMS Page in Magento 2?

For call the Login form in another PHTML file. Please use the below code:CMS Page in Magento 2?
CMS Page in Magento 2?expoundsofttechsolution



<?php echo $this->getLayout()->createBlock("Magento\Customer\Block\Form\Login")->setTemplate("Magento_Customer::form/login.phtml")->toHtml();?>
For call the Login form in CMS Page/Static Block. Please use the below code:

{{block class="Magento\Customer\Block\Form\Login" template="Magento_Customer::form/login.phtml"}}

Categories

How to call PHTML file in CMS Page/Static Block?

For adding the phtml file in CMS Page/Static Block please use How to call PHTML file in CMS Page/Static Block? the below code:

The code is:  

{{block class="[BlockClassFullName]" template="[VendorName]_[ModuleName]::[YourTemplateFileLocation].phtml"}}   
For Example: 

{{block class="Magento\Framework\View\Element\Template" template="[VendorName]_[ModuleName]::[YourTemplateFileLocation].phtml"}} 

{{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::myfiles/myfile.phtml"}}

Please leave your comment for asking any question or suggestion.

Need Help?expoundsofttechsolution How to call PHTML file in CMS Page/Static Block?

Categories

How to call/add a custom JS file in Magento 2?

For adding the custom JS file please follow the below steps:how-to-call-add-a-custom-js-file-in-magento-2 How to call/add a custom JS file in Magento 2?

1. Go to app / design / frontend / [vendor] / [theme] / Magento_Theme / layout / default_head_blocks.xml
2. add this code within default_head_blocks.xml

    <script src="js/custom.js" />

Like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
  <head>
      <script src="js/custom.js" />
  </head>
</page>
3. Create a custom.css file on this path

Go to app / design / frontend / [vendor] / [theme] / web / js / custom.js
4. After that run the static content deploy command in SSH

 bin/magento setup:static-content:deploy

Please leave your comment for asking any question or suggestion.

Need Help?

Categories

How To Create a new post in WordPress

1).Login to your WordPress Dashboard.

expoundsofttechsolutionpost-in-wordpress

>post-in-wordpress

2). Click on Posts > Add New in WordPress.

The fields on the editor page of the Add Posts Page.

>post-in-wordpress

  • 1). Post Title − Enter the title of the post, (New Demo Post1).
  • 2). Post Content − Enter the content of your post. (New Demo content).
  • 3). Featured image – Add Featured image in post.
  • 4). Published − Publish and Save the post.
  • 5). View Post – View the post Url: https://expoundsofttechsolution.com/blog/
Categories

How to create a new app or new project with Angular 10?

In this blog, we are going to create a new angular app. I would like to show you angular 10 by creating a new project. you will learn how to install angular 10. you will learn to create the first application in angular 10. You just need some steps to create the first angular 10 application.how-to-create-a-new-app-or-new-project-with-angular-10

Here, I will write the tutorial and explain step by step.how-to-create-a-new-app-or-new-project-with-angular-10 You need to follow the following steps. So let’s Begin…

  1. Install Angular CLI :

So, if you haven’t installed angular CLI in your system then you can install it by using the following command:

npm install -g @angular/cli

If angular CLI is installed successfully, then you can proceed.

2. Install Angular 10 Project / Create a new App

Now from here, we are able to create a new project in angular 10 using the angular cli command. so let’s create it by the following command:

ng new my-first-app

Now, while the installation process you will get the options to select Routing and CSS styling in your project as follows :

1. If Would you like to add Angular routing?

If you say yes then it will create an app with routing. if not then it will create without routing.

2. Which stylesheet format would you like to use? Pick CSS.

And after selecting the above options the app will start the installation process.

expoundsofttechsolution

After that you can simply compile and run the angular application by following commands:

ng serve

As you can see here that the app has compiled successfully.

Now you can open your browser and open this URL to see the created app.

http://localhost:4200

You will see your first app like as bellow:

I hope you will follow the above steps and create your first Angular 10 application.>how-to-create-a-new-app-or-new-project-with-angular-10

So, thanks for following this blog, and if you need any help please leave your queries in the comment box we will be happy to help you.>how-to-create-a-new-app-or-new-project-with-angular-10how-to-create-a-new-app-or-new-project-with-angular-10

Categories

How to call/add a custom CSS file in Magento 2?

For adding the custom How to call/add a custom CSS file in Magento 2? CSS file please follow the below steps: how-to-call-add-a-custom-css-file-in-magento-2team_bg-1.webp How to call/add a custom CSS file in Magento 2?

1. Go to app / design / frontend / [vendor] / [theme] / Magento_Theme / layout / default_head_blocks.xml
2. add this code within default_head_blocks.xml

   <css src="css/custom.css" />

Like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
  <head>
    <css src="css/custom.css" />
  </head>
</page>
3. Create a custom.css file on this path

Go to app / design / frontend / [vendor] / [theme] / web / css / custom.css
4. After that run the static content deploy command in SSH

 bin/magento setup:static-content:deploy

Please leave your comment for asking any question or suggestion.

Need Help?how-to-call-add-a-custom-css-file-in-magento-2

Categories

How to get the create date of product in Magento?

To get create date of product you have to put this How to get the create date of product in Magento? code in your phtml file and this phtml file was called by the page where you want to showing it. echo Mage::getModel(‘catalog/product’)->load($_product->getId())->getCreatedAt(); Please leave your comment for asking any question or suggestion.
Need Help?how-to-get-the-create-date-of-product-in-magento