The store will not work correctly when cookies are disabled.
JavaScript seems to be disabled in your browser.
For the best experience on our site, be sure to turn on Javascript in your browser.
Monday, 16 June 25 04:42
How to install phpcs for magento 2
Step-by-Step Installation of phpcs for Magento 2
Install PHP_CodeSniffer via Composer, If it's not already installed. Create A directory and open the terminal
Copy
composer require --dev squizlabs/php_codesniffer
Continue...
Monday, 16 June 25 04:28
Magento 2 Module Generate PHP Compatibility Report
Generate PHP compatibility report for your custom module or theme. PHPCompatibility with PHP_CodeSniffer.
Inside your phpcs installation sir your need to install PHPCompatibility module by given cmd.
you can check how to install phpcs module.
Copy
composer require --dev dealerdirect/phpcodesniffer-composer-installer
composer require --dev phpcompatibility/php-compatibility
Continue...
Saturday, 07 June 25 04:21
How to setup AEM in Linux system.
If you want to set up AEM on your local Linux machine, you need to do some steps .
I hope you are a beginner and you did not have any dependencies for setup.
AEM required Java and Maven setup. So I will explain that also.
Step 1. Install java
That is for Linux systems. Open terminal and run below cmd
Copy
sudo apt update
sudo apt install default-jre
java -version
sudo apt install default-jdk
Continue...
Monday, 02 June 25 01:26
Add Mobile Verification In cash on delivery payment method
In this blog, I enplane the product of adding mobile verification for COD payment method. You can do same for any other payment method.
I'm doing this process in theme customization.
Step 1 . You need to create a directory Magento_OfflinePayments in your theme. I hope you already have themes .
Step 2. Create template file cashondelivery.html in theme dir Magento_OfflinePayments/web/template/payment.
Copy
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<!-- ko if: isApplyedPointsOrCredit() -->
<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
<div class="payment-method-title field choice" visible="showPayment">
<input type="radio"
name="payment[method]"
class="radio"
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
<label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
</div>
<div class="payment-method-content">
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<div class="payment-method-billing-address">
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<!-- <p data-bind="html: getInstructions()"></p> -->
<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<div class="mobile-verify-form-div" data-bind="visible: mobileFormOpen">
<div class="mobile-verify-form-area">
<label for="mobile-verify">Verify Your Mobile</label>
<span>
<input placeholder="Mobile"
class="mobile number"
id="mobile"
name="mobile"
type="text"
disabled="disabled"
data-bind="value: mobileNumber()"
>
</span>
<span>
<input placeholder="Fill OTP"
class="otp number"
id="otp_input"
name="otp_input"
type="text"
maxlength="otpMaxLenth()"
data-bind="visible: isOTPverifyDisable()"
>
</span>
<span class="button-confirm">
<button type="submit" visible="isOtpSended" data-bind="
click: sendOTP, attr: {title: $t('Send OTP')}">
<span data-bind="i18n: 'Send OTP'"></span>
</button>
<button type="submit" visible="isOTPverifyDisable" data-bind="
click: verifyOTP, attr: {title: $t('Verify')}">
<span data-bind="i18n: 'Verify'"></span>
</button>
</span>
<span id="error-message" class="error-message" data-bind="visible: hasError"></span>
</div>
</div>
<div class="actions-toolbar">
<div class="primary" visible="isVerified">
<button class="action primary checkout"
type="submit"
data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
enable: (getCode() == isChecked()),
css: {disabled: !isPlaceOrderActionAllowed()}
"
disabled>
<span data-bind="i18n: 'Place Order'"></span>
</button>
</div>
<div class="primary" visible="reviewButton">
<button class="action primary checkout"
type="submit"
data-bind="
click: isMobileFormOpen,
attr: {title: $t('Review Order')}
">
<span data-bind="i18n: 'Review Order'"></span>
</button>
</div>
</div>
</div>
</div>
<!-- /ko -->
Continue...
Wednesday, 14 May 25 01:45
How to add custom js file from phtml with php variable
Do you want to pass your PHTML variable in your custom JS file?
Step 1. Remove your JQuery code from phtml and create a js file in web/js/, You can create that file in the theme or module.
Copy
define(['jquery'], function($) {
'use strict';
return function (config) {
// You can access your phtml variable in js like this
var myvalue = config.yourphtmlVariable;
console.log(myvalue); //123
}
});
Continue...
Copyright © 2013-present Magento, Inc. All rights reserved.