Magento 2 – How to call any block function in phtml file?
Here We will know, How to call any block function in phtml by simple code in Magento 2 Suppose We have a code as below in any custom module Block file or In any default Vendor Magento Block file [php] namespace Vendor\Module\Block; use Magento\Framework\View\Element\Template; class Main …
How to get formatted Price with currency in Magento2 ?
Sometime We need to get minimum price, maximum price or whatever price in Magento2, you will get any price without currency symbol. so Here We will understand to get formatted Price. Suppose I need a minimum Price on Category Page, Then It will fetch price without …
Top 10 WordPress Security Tips We Should Definitely Know About
WordPress is the most popular framework nowadays as it is easy to set up and configure. As it becomes more popular we need to pay more attention to the security topic. Web security is one of the main problems nowadays as threats are lurking everywhere. …
How to Optimize Your Website for Lead Generation?
Driving a traffic is essential for getting visitors to your website. It’s become a big challenge Nowadays. All of us goal is Lead Generation. Your website needs more things than design. What is Lead Generation in SEO? In Brief, Lead Generation is the process of …
Create custom layout Page in Magento2
In this Post We will know How to Create custom layout Page in Magento2 In this post, We will create a layout named Homepage Layout shown in above image, it’s the exact same as the default(1 column) layout but you can add your own here, …
Best way to detect Mobile device : Magento2
Here We will know, how to detect mobile device in Magento2 by simple code Suppose You have to open a listview by default in Mobile screen, Then this will work for you, let’s get started. We have default code in app\design\frontend\theme_name\Magento_Catalog\templates\product\list.phtml as we defined just below. …
Insert data into custom table using Model, Resource Model in Magento2
How to insert data into the custom table using Model, Resource Model in Magento 2? Or how to use Model, Resource Model, Collection for the custom module in Magento 2? We are talking about how to insert data and use of Model. Resource Model, Collection so …
How to validate form on keyup event in Magento2
Let’s say for example you need to validate customer registration form as customer types. You want to use the events like keyup,change,focusin,focusout etc. For the solution, all you need to do is add new js using requirejs-config.js, But I created a new module. Module files are as below. Create app\code\Vky\Core\registration.php …
How to add custom tab in product view page in Magento2
In this Post We will know How to add custom tab in product view page in Magento2? Folder structure:- 1. First of all You have to create a registration.php inside app/code/Webcreta/Customtab/registration.php [php] <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Webcreta_Customtab’, __DIR__ ); [/php] 2. Create a module.xml in app/code/Webcreta/Customtab/etc/module.xml [php] <?xml …