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,,

Installing Magento via docker getting with Elasticsearch

I am trying to run Magneto 2.4.3(php 7.4). Here is my docker-compose.yml file. services: web: image: webdevops/php-apache-dev:7.4 container_name: magento2-web volumes: – .:/public_html ports: – “127.0.0.1:8989:80” user: www-data:www-data environment: – WEB_DOCUMENT_ROOT=/public_html/pub – WEB_ALIAS_DOMAIN=local.magento2.com:8989 – WEB_NO_CACHE_PATTERN=\.\w+$ – CONTAINER_UID=33 #see https://github.com/webdevops/Dockerfile/issues/226 restart: always… Read More »Installing Magento via docker getting with Elasticsearch