How to validate if input in input field has base64 encoded string using express-validator

In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. If In a certain input field only base 64 encoded string are allowed i.e there not allowed any other form of string which not… Continue reading How to validate if input in input field has base64 encoded string using express-validator

How to automatically close all collapsible elements inside of the accordion when closing the accordion

The Collapse plugin provides a quick way of revealing and hiding content. It flip the perceivability of content over program with a couple of classes and Bootstrap 4 JavaScript plugins. Flipping(toggling) of content requires to connect with the href attribute, or a button with the data-target property. In both cases, the data-toggle=”collapse” is required. <a data-toggle=”collapse” href=”#collapseExample” …> <!–Write your link… Continue reading How to automatically close all collapsible elements inside of the accordion when closing the accordion

How to convert JSON data to a html table using JavaScript

By using this method we can change the Json data into matrix table directly. Approach 1:  Take the JSON Object in a variable. Call a function which first adds the column names to the < table > element.(It is looking for the all columns, which is UNION of the column names). Traverse the JSON data… Continue reading How to convert JSON data to a html table using JavaScript

Stepwise Process to how to use merchandising zone in SMT

We have to first create merchandising rules as merchandising zones can be targeted with different content defined within merchandising rules. Selection criteria is based on available facets and sort options defined during the SuiteCommerce Advanced Web Site Setup. There are two merchandising zones you can choose from, the legacy merchandising zone and the enhanced merchandising… Continue reading Stepwise Process to how to use merchandising zone in SMT

How to Promisify location API to get current position using JavaScript

Approach: As we know the navigator.geolocation.getCurrentPosition is a callback-based API, so we can easily convert it into a Promise-based API. To promisify the geolocation API, we will get the user’s current position from the browser. We will either resolve the promise or reject the promise based upon, either we get the current position.

Functionality and Process to add the Item ETA in the website alongwith Purchase order

To display the item ETA on the PDP page of the website for out-of-stock items. The date is determined form the ETA date of that item from the open purchase order. If there are multiple open purchase orders, then need to consider the first due date. So that the ETA date will display in the PDP… Continue reading Functionality and Process to add the Item ETA in the website alongwith Purchase order

How to get javascript dialouge boxes using JavaScript

Dialogue boxes are a kind of popup notification, this kind of informative functionality is used to show success, failure, or any particular/important notification to the user. Alert Box: An alert box is used on the website to show a warning message to the user that they have entered the wrong value other than what is required… Continue reading How to get javascript dialouge boxes using JavaScript