Read a file in node js

The fs.readFile() method is an inbuilt method which is used to read the file. This method read the entire file into buffer. To load the fs module we use require() method. For example: var fs = require(‘fs’); Syntax: fs.readFile( filename, encoding, callback_function ) Parameters: The method accept three parameters as mentioned above and described below:… Continue reading Read a file in node js

Create a tab Notification Centre with messages list inside it in customer record

Solution First create a subtab Notification Center in the customer record Navigate customization->Forms->subtab     Entity->Notification Centre  Then created a custom record for notification with a field message,message subject and date and set its parent as the customer. Navigate customization->list,record and field ->Record Type Notification Navigate to the notification tab in the customer record where we… Continue reading Create a tab Notification Centre with messages list inside it in customer record

Items are not showing on the web store.

1 Display in Website should be checked 2 Item record must have online/base price set 3 If Show Uncategorized Items is not checked (Commerce > Websites > Website List > under Setup tab), make sure the item record has an assigned site category under Web Store tab > Web Site Categories subtab. Please take note: If an account has multi-site set up, an item assigned to at… Continue reading Items are not showing on the web store.

Issue: No delivery methods available for this address

Checkout page when we get this warning SolutionThe Default Shipping Method can be set at Commerce > Websites > Website List > Edit Website > Shopping tab. If shipping items are not showing on the dropdown field on the Set Up Web Site page, these shipping items are not set to be displayed on the… Continue reading Issue: No delivery methods available for this address

How to send email using nodemailer and nodejs

Nodemailer is the Node.js npm module that allows you to send email easily.  Install nodemailer npm install nodemailer Include the nodemailer module in the code using require(‘nodemailer’). Use nodemailer.createTransport() function to create a transporter who will send mail. It contains the service name and authentication details (user ans password). Declare a variable mailDetails that contains… Continue reading How to send email using nodemailer and nodejs