Category: Magento
Add Custom Tab in Customer Account Information in Magento 2
we can add some more custom fields to the account information for customers of Magento 2 to collect more customer data. Step 1 : Create the folder of module So our first step is to create the module folder and necessary files required to register a Magento module. Step 2 : Create etc/module.xml file The… Continue reading Add Custom Tab in Customer Account Information in Magento 2
Setting Pagination in Order
It will only work when the field is in the form of an array. ‘created_at’ is given here because it’s a field in the database and it can be any other name. It can also be in ‘desc’ or ‘asc’ order.
How to Configure Price Per Customer
One of the Magento 2 features is Customer Group Price. It allows you to set different prices of products in accordance with their quantity as well as depending on the customer group. STEP-BY-STEP PROCESS TO CONFIGURE PRICE PER CUSTOMER IN MAGENTO 2 1. Navigate to Catalog > Products and select a product you want to define the group prices for. 3.… Continue reading How to Configure Price Per Customer
Add a quote to cart and block adding new products to cart – Magento 2
When we submit a quote all products loaded in the quote will be added to cart , and adding a new product again to cart is not applicable ,so when ever we add a quote all the products loaded in the cart must be removed and replaced with that quote. Here is code to remove… Continue reading Add a quote to cart and block adding new products to cart – Magento 2
Checking whether same product exists in cart-Magento 2
If the a products contains many attributes other than Qty , adding the same product to cart again will collapases and mismatches the attributes of the product. To avoid or modify the situation we can check the same product already exists in the cart. Is can be done in the controller of add to cart.… Continue reading Checking whether same product exists in cart-Magento 2
Clone new project from Git and setup it in local
Create a custom filed on the customers section
Create setup file InstallData.php Firstly, we will create the InstallData. File: app/code/<vendorname>/<foldername>/Setup/InstallData.php Define the install() method After that, we have to define the install() method and create eav setup model: Create custom attribute Finally, we need to set the forms in which the attributes will be used. In this step, we need define the eavConfig object which allow us… Continue reading Create a custom filed on the customers section