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
Category: SuiteCommerce
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
How to enable web frameworks in the firebase(i.e. next.js )
To enable the framework on the firebase, we have to write the command on the terminal that is To enable it use the command: firebase experiments:enable webframeworks
Organizing Presentation Tabs in Site builder
After you create presentation tabs for your web store, you can set the order in which they display on your website. To organize presentation tabs: Go to Commerce > Websites > Website List. Click Edit next to the site Click the Appearance subtab. On the Tabs subtab, select a row, and drag it to the… Continue reading Organizing Presentation Tabs in Site builder
To include the stock status message with an Add to Cart button in site builder
To include the stock status message with an Add to Cart button, you must use the stock status message attribute in a tag that appears before the attribute tag for the add to cart button. <%=getCurrentAttribute(‘item’,’stockstatusmessagehtml’)%><%=getCurrentAttribute(‘item’,’addtocartdrilldownhtml’)%>
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
Declare attribute tag in Site builder
We are using attribute tag to get the field values from record to the website. What we will do if the value already contains a attribute tag? For that we need to declare attribute that is already in the field. For example, you may create an item drilldown template that contains an attribute tag for… Continue reading Declare attribute tag in Site builder
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.