What is Window.requestAnimationFrame() in JavaScript?

The window.requestAnimationFrame() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint. The method takes a callback as an argument to be invoked before the repaint. Example: In this example, an element is animated for 2 seconds (2000… Continue reading What is Window.requestAnimationFrame() in JavaScript?

Published
Categorized as Magento

Date format using moment.js

MomentJS is a JavaScript library which helps in parsing, validating, manipulating and displaying date/time in JavaScript. Its parsing allows you to parse the date in the format required. Parsing of date is available in the string, object and array. You can use the method isValid() and check whether the date is valid or not. MomentJS also provides… Continue reading Date format using moment.js

Java Script – encodeURI() & decodeURI()

encodeURI():This function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. It returns a new string representing the provided string encoded as a URI. This method does not encode characters like: , / ? : @ & = + $ * #Use the encodeURIComponent() method instead. decodeURI():This function… Continue reading Java Script – encodeURI() & decodeURI()

Merge Customer Records with same Email address that is not being detected as Duplicate Records

Solution Enable Duplicate Detection for Customers and Vendors with different Subsidiaries Navigate to Setup > Company > Duplicate Detection  Detect Duplicates Across Subsidiaries (Customers and Vendors Only):Enter Checkmark Click Save Merge the Customer records Navigate to Lists > Relationship > Customers Click Edit to the Customer you would like to set as a Child record Select Master Customer RecordNote: This is where the child record will be merged. Click Merge Click OK Click Refresh  

Resolve Commerce Category CSV Import results to error: “An unexpected error has occurred”

Scenario: There are instances that the user is implementing a CSV Import of Commerce Category with Items and the response is always error “An unexpected error has occurred” without having any indicated cause. Solution: Navigate to Lists > Accounting > Items Beside Item record: Click Edit  Click Web Store tab  Display in Web Store: Enter Checkmark Click Save

How to resolve the Unexpected Error occurred when doing a Item record update using CSV Import

Scenario: Performing a CSV Import to update Item Record > Result unsuccessful > CSV response shows Error: Unexpected error has occurred. Solution: Checked if Feature Allow Purchase of Assembly Items is enabled: Navigate through Setup > Accounting > Accounting Preferences > Order Management tab > Allow Purchase of Assembly Items If Allow Purchase of Assembly… Continue reading How to resolve the Unexpected Error occurred when doing a Item record update using CSV Import

Add a text inside a table content in XML

Requirement is to add a text “Ondergenoemde besparing is afhankelijk van meerdere factoren derhalve kunnen er geen rechten aan ontleend worden. ” below some contents inside a table as shown in the image below: The existing code content was like this: Added a new code part as a new table content inside the existing one. The… Continue reading Add a text inside a table content in XML

How add a custom error message in Elbrus version

Add error message stripeErrorMessage: { errorCode: ‘ERR_STRIPE’, errorMessage: _(‘Card not created in stripe’).translate() } here we check the condition and if it is not satisfied will throw an error. result.done(function (model) { self.creditcardView = null; console.log(“this inside if result”, model) ProfileModel.getInstance().get(‘creditcards’).add(model, { silent: true });self.setCreditCard({ model: model });console.log(‘newold’, model.ccmemo) var new_temp = model.ccmemo; save_result.resolve(function ()… Continue reading How add a custom error message in Elbrus version