The initial state of the startDate and endDate hooks represents a date range starting from today and ending 7 days from today. Calculation: startDate: The startDate is initialised to today’s date, with the time component set to 00:00:00. It uses the current year, month, and day obtained from new Date(). endDate The endDate is initialised… Continue reading What does the initial state of the startDate and endDate hooks represent in this code, and how are these dates calculated in nextjs?
Author: Mukil Mukesh M K
What is codePool?
Code pool is a concept to pull the code in Magento structured format. It is specified when you register new module in app/etc/modules/Company_Module.xml There are 3 codePools in Magento: core, community and local, which reside at app/code/ directory. CodePools: _community: It is generally used by 3rd party extensions. _core: It is used by Magento core team. _local: Local… Continue reading What is codePool?
Undefined array key “frontend” Issue
Got error ‘PHP message: PHP Warning: Undefined array key “frontend” in /home/977869.cloudwaysapps.com/syqfgmwgpb/public_html/vendor/magento/framework/App/Cache/Frontend/Pool.php Screenshot: Solution: ‘cache’ => [ ‘frontend’ => [ ‘default’ => [ ‘id_prefix’ => ’91c_’ ], ‘page_cache’ => [ ‘id_prefix’ => ’91c_’ ] ], ‘allow_parallel_generation’ => false ],
Gpay plugin for Magento 2
The Google Pay plugin is built in collaboration with Unbound Commerce, is free to use, and integrates with popular payment service providers including Adyen, BlueSnap, Braintree, FirstData – Payeezy & Ucom, Moneris, Stripe, and Vantiv. Installation The Google Pay plugin can be installed from the Magento Marketplace using this link or by searching the Magento… Continue reading Gpay plugin for Magento 2
What is React Props ?
In React, props (short for “properties”) are a mechanism to pass data from one component to another, specifically from a parent component to a child component. They help make components reusable and dynamic, as they allow for data to be passed and used flexibly within different instances of the same component. 1. Passing Props to… Continue reading What is React Props ?
Email Functionality in payload- 4 (Sending Mail & Mock transport & Using multiple mail providers)
Sending Mail With a working transport, you can call it anywhere you have access to payload by calling payload.sendEmail(message). The message will contain the to, subject and email or text for the email being sent. To see all available message configuration options, see NodeMailer. Mock transport By default, Payload uses a mock implementation that only… Continue reading Email Functionality in payload- 4 (Sending Mail & Mock transport & Using multiple mail providers)
Email Functionality in payload- 3 (Use an email service & Use a custom NodeMailer transport )
Use an email service Many third party mail providers are available and offer benefits beyond basic SMTP. As an example, your payload init could look like this if you wanted to use SendGrid.com, though the same approach would work for any other NodeMailer transports shown here or provided by another third party. import payload from… Continue reading Email Functionality in payload- 3 (Use an email service & Use a custom NodeMailer transport )
Email Functionality in payload- 2 (Use SMTP)
Use SMTP Simple Mail Transfer Protocol (SMTP) options can be passed in using the transportOptions object on the email options. See the NodeMailer SMTP documentation for more information, including details on when secure should and should not be set to true. payload.init({ email: { transportOptions: { host: process.env.SMTP_HOST, … Continue reading Email Functionality in payload- 2 (Use SMTP)
Email Functionality in payload- 1
Introduction Payload comes ready to send your application’s email. Whether you simply need built-in password reset email to work or you want customers to get an order confirmation email, you’re almost there. Payload makes use of NodeMailer for email and won’t get in your way for those already familiar. For email to send from your Payload server,… Continue reading Email Functionality in payload- 1
What is type null and its use in TypeScript?
The null keyword is considered as a data type in TypeScript as well as in JavaScript. The null keyword indicates the unavailability of a value. It can be used to check whether a value is provided to a particular variable. Example: function getData(orgName: string | null, orgDesc: string | null): void { if (orgName ===… Continue reading What is type null and its use in TypeScript?