Use helper method in template file
<reference name="breadcrumbs">
<action method="setTemplate">
<template helper="seo/getBreadcrumbsTemplate">
<param>page/html/breadcrumbs.phtml</param>
</template>
</action>
</reference>
Related cards:
Magento 2 : How to use Javascript in Magento
Javascript in Magento 2
Magento 2 uses Require JS lib and Knockout JS lib to solve the page speed and manage the JS dependency.
As JS are loaded asynchronously in backend, it helps to increase the page speed.
The JS files can be found in f...
Magento 2 : Admin Module Part 2
5.Create Model and Resource model
Address model class extends the AddressInterface and it contains the data object getters setter methods.
<?php
/**
* Address
*
* @copyright Copyright © 2021 Va...
Magento 2 : Admin Module Part 1
1. Create required folders and files for a module
Vasan
--KpsAddress
--Api
--Data
--AddressInterface.php
--AddressSearchResultsInterface.php
--AddressRepositoryIn...
Magento 2 Notes
1) Non Auto Increment Primary key
The $_isPkAutoIncrement should be assigned as false in resource model, when a primary key of a table is used as non auto increment.
protected $_isPkAutoIncrement = false;
2) Custom Cron Job
F...
Magento 2: Create new customer attribute
How to create a new custom attribute to Customer
This article explain the custom customer attribute creation and showing that in account creation and account edit
Magento Customer module is developed with EAV attributes
if a attribute is cr...
How to use Mailhog in magento 2 development with docker
Mailhog is a tool to test the you application mail outgoing.
Steps to use with docker
First, install mailhog sendmail tool in your php docker container
wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linu...
Linux Help
How to show line number in vi editor
: Run
:set nu
How to show line number in gedit
: 1)Click on Edit menu
2)Select the Preference
3)Tick the Display line numbers
How to clear the screen
: ctrl + l
**How ...
Access Iphone file in arch linux computer
First install following packages
sudo pacman -Sy ifuse usbmuxd libplist libimobiledevice
Then reboot the system
Then make directory a to mount the files
mkdir ~/iPhone
Use the ifuse to mount the Iphone
ifuse ~/iPhone...
Magento 2 : Address additional attributes
In this example, you can learn how to add additional attributes for customer address
Steps
- Add additional attributes to EAV table
- Create extension attributes to link with models to save additional attributes values in databases
- Crea...
Magento 2 : Customer attribute creation
CustomerSetupFactory and Attribute SetFactory classes should be used to create the customer attribute using setup script
<?php
namespace ExamNotes\Chapter10\Setup;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Setup\Eav...