In Magento 2, the layout file responsible for rendering CMS pages is cms_page_view.xml. This layout file is typically located in: This layout file determines the structure and contents of the CMS pages, such as which blocks are included and their positions. If you need to customize the layout of CMS pages, you can create or…Continue Reading
Create a Guest Order using REST Api in Magento 2
Today’s tutorial discusses how to create a guest order using the REST API in Magento 2. Oftentimes, we have to integrate our store into mobile applications, and mobile application needs the data in the form of APIs. Following are the steps to create a guest order using Rest API in Magento 2 Step 1: Create…Continue Reading
Smart Stays: Avatars Set the Standard for AI Concierge Elegance in Hotels
Picture this: you walk into a hotel, and instead of a human behind the front desk. You see a friendly robot ready to help. That’s the magic of AI concierges. These are like super-smart computer friends. Lastly, That can assist you during your stay. They can answer questions and recommend cool places to visit. And…Continue Reading
How to show a div and hide after a few seconds in jQuery?
jQuery is capable of doing amazing stuff with less code in our applications. Today, we are seeing one use case where we can show a hidden div and hide again after few seconds in jQuery.
Magento 2: How to send data using Ajax form in custom form?
In Magento 2, we can use jQuery to perform some ajax requests such as sending an email from the catalog product, or a custom contact form with user details. The following easy script will help you to implement ajax with jQuery in a phtml file of your choice. Inspiration
How to assign a Guest Order to a Customer in Magento 2?
We are seeing this a lot as the customer places order with out logged in and later create and account and view their orders from the dashboard. We can solve this issue by directly running SQL queries or just creating a small script to do it. SQL Method Using PHP Script Source
How to get product collection based on custom attribute (drop down attribute value)
Magento 2 is well known for it’s capacity to extending the features. Today’s article we will be discussing how to get product collection based on custom attribute (drop down attribute value). For dropdown attribute, We can filter using dropdown option ID instead of Label. So your code is like below. The above 20 is the…Continue Reading
How Get Current URL from a PHTML – Magento 2
Today’s post we are discussing how to get the current URL in phtml file in Magento 2. As we know we have access to object in the phtml, we can utilize that for this purpose. Let’s print methods for the class It produces the output like this From this we can use the method get…Continue Reading
How to programmatically update name of category in specific store – Magento 2
Follow the below code to programatically update name of category in a specific store in Magento 2.
Best Dummy Content – Lorem Ipsum
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also…Continue Reading
How to write to a file, but overwrite existing data in a bash script?
To write to a file and overwrite any existing data, you can use the > operator. For example, to write “Hello, world!” to a file called hello.txt, you can run the following command: This redirection >> helps to append, but you can use a single arrow syntax to overwrite existing data. If the file hello.txt…Continue Reading
How to get category id by category name in Magento 2
In today’s blog, we are illustrating how to get a category id by category name in Magento 2. Call the collection factory in the constructor of the class and using addAttributeToFilter filter the collection by name. You should make sure your category names are unique, or you have to add the level field in the…Continue Reading
TypeError: PhpMyAdmin\Export::getFilenameAndMimetype(): Argument #5 ($filenameTemplate) must be of type string, null given, called in /libraries/classes/Controllers/Export/ExportController.php on line 397
TypeError: PhpMyAdmin\Export::getFilenameAndMimetype(): Argument #5 ($filenameTemplate) must be of type string, null given, called in /libraries/classes/Controllers/Export/ExportController.php on line 397 The above error was coming when exporting the MySql with a fresh installation of phpMyAdmin. Solution Go to php.ini and change the max_input_vars to a higher value as the default would be 1000.
Magento 2: How to add option values to product attributes programmatically
In today’s blog, we are showing how to add option values to product attributes programmatically in Magento 2.
Magento 2: Get the product attribute’s select option value from option_id without loading the product
In today’s blog, we are showing how to get an option value based on the option id in Magento 2, without loading the product. First of all load the AttributeRepositoryInterface via constructor wherever you require this feature.
How to display images from theme folder in in phtml- Magento 2
You can use below two methods to display images from theme folder in phtml file in Magento 2. Often times it’s very convenient to keep the theme related images to theme images folders.
You need to configure Two-Factor Authorization in order to proceed to your store’s admin area – Magento 2
After installing Magento 2 you might encounter this screen, that says You need to configure Two-Factor Authorization in order to proceed to your store’s admin area.
How to Get Product Stock Quantity and Other Stock Information – Magento 2
In today’s tutorial, I am showing how to get the product stock quantity and information in Magento 2. In this article, I will illustrate mainly two methods to get product stock information in Magento 2, and both methods are tested and confirmed it’s working. #Method 1 This method will be using \Magento\CatalogInventory\Model\Stock\Item class to get…Continue Reading
What is getOrPut in Laravel?
getOrPut feature was introduced in Laravel 8.81 and it’s a pretty amazing oneliner. getOrPut helps you to get an existing key or put the value if it doesn’t exist and return the value on a collection. As of now you want to have three lines of code to achieve this, but getOrPut changes everything. if…Continue Reading
How to set up GitHub SSH in Ubuntu with example
Today’s tutorial demonstrates how to configure GitHub ssh in your Ubuntu 22.04 operating system. We often use git and GitHub for development purposes, so connecting to remote Github is an important step in our development journey. Follow the below steps to connect your local machine to GitHub remote by configuring the GitHub ssh key. Adding…Continue Reading
Docker Install Ubuntu : docker-desktop : Depends: docker-ce-cli but it is not installable
Problem I was experiencing an issue when installing the docker desktop on Ubuntu 22.04, as it throws the below error when I ran the below command.
What is the opposite of has() method in Laravel?
We all know the has() method helps list a number of records with at least a related record in Laravel Eloquent. For example, below we can get all posts that have at least one comment. $posts = App\Models\Post::has(‘comments’)->get(); But what would be the opposite of this? How do we get a post that has zero…Continue Reading
Laravel: Download files to storage from SFTP
This post will discuss using Laravel to read and download files from a remote server via SFTP. For this purpose, we use a third-party package to connect to sftp and download the files to the storage folder in Laravel. The first and most important step is to install and configure the league/flysystem-sftp in the Laravel…Continue Reading
Why You Should Use Node Js For Enterprise Software?
Enterprise software is developed to manage complicated tasks, such as monitoring and controlling essential business operations, gathering and analyzing data, and enforcing security policies. These programs tend to be complex, requiring much user input and a wide variety of separate but related components. The optimization of these applications is another potential obstacle. Additionally, enterprise apps…Continue Reading
How to get the total memory and free memory of a system using Node.js?
In today’s article, we will discuss how to get the total memory and available memory of the system using NodeJS. To get the total memory of the operating system using NodeJS, you can use method from the module in Node.js. Note that this method returns total memory in bytes. // import os module const os…Continue Reading
What is the difference between shuffle() and array_rand() in PHP?
What exactly is the difference between shuffle and array_rand functions in PHP? void shuffle ( array input) mixed array_rand ( array input [, int num_req]) takes an array and completely randomizes the array. You may have noticed that uses its parameter by reference and returns true. The downside of this function is it changes the…Continue Reading
Download the official iPhone 14 and 14 Pro wallpapers in full resolution
IOS 16 has been launched and it’s available for everyone. Moreover, apple had launched the new iPhone 14, so why wait? Download and experience the new line of wallpapers for your iPhone 14 and iPhone Pro. As for the new iPhone 14 wallpapers, there’s a new one for each device color, but there is no…Continue Reading
Laravel Eloquent- Where Condition with Two Columns
Did you ever think about how to write where condition with two columns(fields) in Laravel Eloquent? In the first place, this is possible in Laravel using the function . For example, you have two fields named sub_total and grand_total, and you need to find all the orders have the same sub_total as grand_total. So you…Continue Reading
How to Add Foreign Key in Laravel Migration?
This tutorial shows how to add a foreign key constraint to a field in Laravel in the migration file. As we know already a foreign key is a field that is used to establish the relationship between two tables via the primary key. This example starts with creating a migration file in Laravel and shows…Continue Reading
What is Str::finish() in Laravel ?
In this article, you will learn about Str::finish() in Laravel. The next question is how to incorporate Str::finish() into your project. If a string does not already end with the given value, the Str::finish method adds a single instance of that value to it: