Category Archives: PHP

Magento 2 how to create custom payment method

To create a custom payment method in Magento 2, you will need to follow the following steps: Create a custom module for your payment method by creating a directory with the name of your module under app/code directory of your Magento installation. Create a registration.php file in the root of your module directory with the… Read More »

How to fix Magento 2.4.x sort by position category products issue

This is very common problem which is being faced by all of magento 2 stores. Even Magento support saying it is fixed but still it is not working old stores which have customized plugins. So simple fix it, go to file location vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php We have to update function _renderFiltersBefore. See below function /** * @inheritdoc… Read More »

How to run wordpress blog from subfolder

Common problem when your main website running different platform like java and you need to install wordpress blog with same domain but as subfolder. For example: Website url https://www.{domain}.com running on Java nginx server. Now you want to run wordpress in php apache server as sub folder like https://www.{domain}.com/blog. So you can add following nginx… Read More »

How to Install Magento on windows host

Let follow below post, how to install Magento 2.4 locally on Windows using XAMPP server. This tutorial is targeted on current Magento 2.4 users and also users who are completely new to Magento. Now, let’s get started! Part 1: Install and configure XAMPP Step 1: Download XAMPP Download link: https://www.apachefriends.org/download.html We recommend installing XAMPP with PHP… Read More »

How to create own custom API in Magento 2

The REST API documentation published on the Magento 2 Developer Documentation website describes the REST APIs that are available on the latest release of Magento 2.  This documentation is generated from the code base using Swagger and represents the state of the code at the time the documentation was generated. Swagger displays a list of service names. Click on a service… Read More »

How to install magento2 extension

There are multiple ways to install our shipping extension. All installation and user guide available in downloaded folder. Follow below steps to install the magento 2 shipping extension in your server. You have to create auth.json file with your access key with same marketplace account. See auth.json file format below. You need to copy in… Read More »

how to block requests with specific string using .htaccess in apache

These days common problem of hacking of website by hacker with scrips. They always use some common method or string to hack it. Now you can prevent these requests by adding some simple .htaccess rules. You could send a 403 Forbidden (access denied) in case -admin is requested : RewriteEngine On RewriteCond %{REQUEST_URI} ^/(.*?)admin RewriteRule ^(.*)$ – [F,L]  … Read More »