If two custom url must show a common layout template and need to show the data on the template file based on the `id` passed on.ex:domain/shop/index/order/id/1/domain/shop/index/order/id/2/ Here shop is the route ID in the route file in the etc folder.index :- Folder inside the controller.order: The controller file. Create a layout file based on this.… Continue reading Common layout for dynamic url in magento2
Category: Magento
Magento Adding custom class name and validations using layout processor
For adding custom classes to the fieldset in the shipping adding and billing address page we may use the layout processor plugin to execute this. For installing layoutprocessor plugin we need to create a php file in the following location: app/code/JJ/Catalog/Plugin/Checkout/Block/LayoutProcessor.php Here is a example to change the label of the street address to Address… Continue reading Magento Adding custom class name and validations using layout processor
How to override a Magento sign in page
First of all we need to go to /var/www/html/nb/vendor/magento/module-customer and we need to override 2 files namely var/www/html/nb/vendor/magento/module-customer/view/frontend/layout/customer_account_create.xml and /var/www/html/nb/vendor/magento/module-customer/view/frontend/templates/form/register.phtml file to the template and layout files of var/www/html/nb/app/design/frontend/JJ/Theme/Magento_Customer. And then we will get a standard signin page that is provided by magento and using css styling we can make it according to our design… Continue reading How to override a Magento sign in page
How to implement slick slider in Magento
first of all, we need to add slick.js, slick-theme.min.css, slick.min.css in the CSS and js folders of Magento _ui respectively. Then create a custom js file and add the following js code for now I named it sliders.js define([ ‘jquery’, ‘slick’ ],function ($, slick){ $(document).ready(function(){ $(‘.marquee’).slick({ infinite: true, slidesToShow: 3, slidesToScroll: 3, responsive: [ {… Continue reading How to implement slick slider in Magento
Placeholder image in magento input field
Adding image in the field to increase the style of the input field. It can be done by overriding current page xml and phtml to custom theme module. For example adding a mail icon in the email field Module Overriding >>> app/design/frontend/Module_name/Theme/Magento_Customer/templates/form/login.phtml Code: CSS: Like this we can add images to input fields.
Edit footer menu with layout
First, create a custom theme 1. Create the folders and files you will needapp/design/frontend/theme/Name of the theme you created/Magento_Theme/{layout, templates} 2. To create a layout file through which we will add and delete menu sections. app/design/frontend/theme/Name of the theme you createdMagento_Theme/layout/default.xml 3. Add the initial layout for default.xml 4. Delete all the unnecessary links from… Continue reading Edit footer menu with layout
How to create a category in Magento
Step 1: Log in to the admin panel and open the side menu of the Catalog tab. Select Categories from the list. Step 2: Click on categories on the left will be the structure of your future categories and subcategories. Step 3: Click Add Subcategory. Step 4:Fill in the Basic Information: Step 5: Open the Content tab. upload the Category Image, add the Description for store view,… Continue reading How to create a category in Magento
Custom Attribute added for Customer Object not getting saved -magento 2
As you want to add a static attribute. An entity can have some static attributes, whose values are stored in entity main table. So you have to create a column inside the entity main table, here is customer_entity. Vendor/Module/etc/db_schema.xml Vendor/Module/Setup/Patch/Schema/AddCustomerAgreementEndDateColumn.php Vendor/Module/Setup/Patch/Data/AddCustomerAgreementEndDateCustomerAttribute.php
Find the table for custom attribute values -magento 2
When you create a attribute for a product EAV comes in a picture. To get a value you need to know basics, which magento uses to store eav data. For this following tables plays a important role. eav_attribute Whenever you create a attribute this table gets entry which stores all important data which helps to… Continue reading Find the table for custom attribute values -magento 2
How to use magento by using filezilla in case we have lost magento files in system.
First of all, install FileZilla in your system after installation open filezilla click on icon belo file menu and give connect click on the right side section and select the file of the below path /applications/psdbdsecye/public_html/app/design/frontend/JJ/Theme 3. select the files you needed from the app/design /theme and right-click and select edit and view and save… Continue reading How to use magento by using filezilla in case we have lost magento files in system.