We can create a layout file on the frontend using the block or pages from magetno admin panel here the trick used to create that. all phtml using block code login to magento admin. Open any cms page and write block code in content section. Here we called an external phtml file to a page… Continue reading Call Phtml file on CMS Page – Magento2
Tag: Magento
Disable a shipping method based on a condition
Here we’re considering the ordertotal of the cart. di.xml file
Add a row count to the order sales view items table – Magento 2.4
We want to add a row count in the order sales view items table. There are 2 ways to achieve this: Let’s start by creating a module Vendor_RowCounter, with the required files, and shared files for both solutions: Add registration.php: Add etc/module.xml: Create a block file, Block/Adminhtml/Items/Column/Row.php: Create a template file, view/adminhtml/templates/items/column/row.phtml: By adding a column via sales_order_view.xml Create view/adminhtml/layout/sales_order_view.xml: The drawback… Continue reading Add a row count to the order sales view items table – Magento 2.4
How to set a date field in a ui form to be mandatory?
normal Date field in the form need to modify with required fields with the new required field
State code to update the customer address from API
Here we are mentioning to set the state code from the country code and state id from the Netsuite API. We are getting the state and country through the response/params from the API
CSP whitelist in Magetno 2
Content Security Policies (CSP) are a powerful tool to mitigate against Cross Site Scripting (XSS) and related attacks, including card skimmers, session hijacking, clickjacking, and more. By default, Content Security Policiy is configured in report-only mode, which allows merchants and developers to configure policies to work according to their custom code. Your browser is not showing… Continue reading CSP whitelist in Magetno 2
Observer when updating products from Checkout
Using this observer we can monitor the update or trigger any conditions on updating the carthere we’re setting the backorders on update Considering all the stocks on the inventory and store
Observer to set backorder on adding products to the cart
Observser Code to Update the backorder to the custom field and checkout pageAlso setting the price of the products to Zero if the item is not committed
API to Update NetSuite Order Id to Magento
Here we’re calling an external API on the Magento to update a custom field on the sales order table to fetch the NetSuite Order ID to Magento 2. routes.xml
How to host a Magento website on Hostgator server
o host a Magento website on a HostGator server, you need to follow these general steps: Sign up for a HostGator account: Go to the HostGator website and sign up for an account if you haven’t already. Choose a hosting plan that meets your needs. Set up your domain: If you already have a domain,… Continue reading How to host a Magento website on Hostgator server