Skip to content

Magento 2 : How add validation validator to custom input field in checkout page?

We have to add custom form in check-money order payment method.We have to add custom validations before order placement but its not working. please check below code 1)Create the validator:- Custom_Checkmethod/view/frontend/web/js/model/custom-validation.js define( [ ‘jquery’, ‘mage/validation’ ], function ($) { ‘use… Read More »Magento 2 : How add validation validator to custom input field in checkout page?

How to get related product collection in block

I use this way to get related product collection /** * Prepare and return product collection * * @return MagentoCatalogModelResourceModelProductCollection */ public function createCollection() { /** @var $collection MagentoCatalogModelResourceModelProductCollection */ $myBlock = MagentoFrameworkAppObjectManager::getInstance()->get(‘AntonStudioStockUpdateBlockRelatedProducts’); $currentProduct = $myBlock->getCurrentProduct(); $relatedProducts = $currentProduct->getRelatedProductCollection(); /**… Read More »How to get related product collection in block

After install Magento 2 in local admin panel showing 404 error I can’t able to view login page kindly help me to fix this issue guys,,

Whoops, our bad… The page you requested was not found, and we have a fine guess why. If you typed the URL directly, please make sure the spelling is correct. If you clicked on a link to get here, the… Read More »After install Magento 2 in local admin panel showing 404 error I can’t able to view login page kindly help me to fix this issue guys,,