Item Search API

Item Search API returns data from all item records based on the conditions we applied The Base url – http://www.mywebstore.com/api/items You can also build the URL for the next set of results using the limit and offset parameters returned by the API as  

Display the price based on subsidiary(Domain) on SCA Webstore

RequirementWhen the user is not logged into website the price displayed should be based the subsidiary (Domain). (Normally the price displayed will be based on default subsidiary). Solution In the SCA web stores by default the displayed price will be based on the currency of the default subsidiary when the user is not logged into the… Continue reading Display the price based on subsidiary(Domain) on SCA Webstore

What is the ternary operator and how do we can use it?

JavaScript’s ternary operator (?:), also called the conditional operator, is used to replace a conditional statement, most commonly an assignment. For example: As you can tell from the above example, the ternary operator is shorter than using andĀ if…elseĀ statement and allows us to assign the resulting value to a variable provided the condition is pretty much… Continue reading What is the ternary operator and how do we can use it?

How to create an object from the given key-value pairs using JavaScript?

You are given different key-value pair(s), in any form like an array, and using those key-value pairs you need to construct an object which will have those key-value pairs. Object{} => Object {“0” : “Geeksforgeeks”,”1″ : “Hello JavaScript”,”2″ : “Hello React”} We first need to declare an empty object, with any suitable name, then by… Continue reading How to create an object from the given key-value pairs using JavaScript?