How to set and get cookies on next js

Installation First, you need to install the js-cookie library in your Next.js project: npm install js-cookie Usage Once installed, you can use js-cookie in your Next.js components or pages. Set Cookies To set a cookie, you can use the set method provided by js-cookie: import Cookies from ‘js-cookie’; // Set a cookie Cookies.set(‘cookieName’, ‘cookieValue’, {… Continue reading How to set and get cookies on next js

How to resolve icon issue on the Next js when deployed to firebase

When deploy the code/next.js app to firebase the images and icons may not be load to avoid this issue we have to add the URL of the website where we are deploying the code to  images: {       unoptimized: true,       domains: [‘localhost’,’https://workorder-app.web.app/’],     }, on “next.config.mjs” we have to… Continue reading How to resolve icon issue on the Next js when deployed to firebase

Tag to use for repeating blocks of HTML code

We can use the server-side Include tag in your item/category templates instead of repeating blocks of HTML code. The server-side Include tag is useful for reusing a common piece of HTML code throughout your site, such as a page header, a page footer or a navigation menu. When it is time to update that piece… Continue reading Tag to use for repeating blocks of HTML code

Basics of extending and wrapping native SuiteCommerce code

Context Learning how and when to “extend” and “wrap” native SuiteCommerce code is a vital skill to learn for developers. This article will explain the difference, and the basics of how to do it within the context of SuiteCommerce development. It should be noted right away that “wrapping” is a form of “extending” code. If… Continue reading Basics of extending and wrapping native SuiteCommerce code

Invalid define call: Activation Error on SCA

Error message”: “Invalid define call, define should only be called once per module. Define calls found at the following line numbers: tmp_ssp_libraries_ext.js 30 ………. Make sure that the manifest does not contain any SuiteScript2 files in the SSP-libraries section before deploying any extensions if you are experiencing an error similar to this one when trying… Continue reading Invalid define call: Activation Error on SCA

Example to make item drag and Drop for Rearrange.

If we want to make any content of our website drag and drop then we can refer the below code. <!DOCTYPE html> <html> <head>  <style>   .drag-list {    list-style: none;    padding: 0;   }   .drag-item {    background-color: #CC56FF;    padding: 10px;    margin-bottom: 5px;    cursor: move;   }  </style> </head> <body> //Supose that below are the item of our website.… Continue reading Example to make item drag and Drop for Rearrange.