It is frequently necessary to use external libraries and packages in the constantly changing world of web development. For Spire, integrating third-party NPM packages into the system smoothly requires following certain procedures and considerations.
Third-party NPM packages can be installed within Spire’s framework by clients and partners. It’s not quite as simple as an ordinary NPM installation, though. Here, the utilization of Workspaces and the directory structure are key components.
The following directory contains only the packages that can be installed: src/FrontEnd/modules/blueprints/{BlueprintThatNeedsCustomPackage}. Build issues may occur if packages are attempted to be installed outside of this structure, especially under src/FrontEnd, the root folder of Spire.
As shown in the below screenshot
Here above we added the third-party nmp package for The library, which allows you to integrate Cloudinary URL generation functionality and load your Cloudinary images and documentation.
Once the package is added to your blueprint you will see the below-like folder structure.
The command npm install –save {PackageName} is used inside the blueprint folder to install the packages required for development. This command modifies the package.json file in the corresponding blueprint directory automatically.
Example: npm install –save @cloudinary/url-gen
You utilize logic to either develop a customized widget or apply it directly on an existing page or widget, depending on the requirements of your third-party package. Here we have created our custom widget for uploading documents in the Cloudinary.
Once the packages have been installed and the required adjustments have been package.json, please make sure that these modifications are pushed to the sandbox branch.
A blueprint folder in src/FrontEnd/modules/blueprints corresponds to each Workspace. Workspaces are automatically generated by a PowerShell script in the package.json file located in the Spire root during the build process. By streamlining the integration procedure, this automation guarantees that the linked modules operate without a hitch.
Once the sandbox has been updated, we can add the widget to the specific page that needs it. A third-party Cloudinary is required for the PO document on the page for review and payment.
as displayed on the screen below.
Upload the PO document with Cloudinary on Review and Pay.
The user can utilize the Cloudinary download widget to download the document from the Cloudinary Dashboard once it has been successfully uploaded.
This blog post should provide partners and clients wishing to integrate third-party NPM packages within the Spire environment with a thorough explanation of the procedure and guidance.
https://docs.developers.optimizely.com/configured-commerce/docs/install-3rd-party-npm-packages
]]>Content Management Systems (CMS) have been around for quite some time now and have helped businesses in creating and managing their online content efficiently. However, as technology evolves, so does the CMS. Many businesses that have been using the Classic CMS for a long time now are looking to switch to the new and more advanced Spire CMS. But migrating content from Classic to Spire can be a tedious and time-consuming task. This is where the Classic to Spire CMS conversion tool comes in.
The Classic to Spire CMS Conversion Tool is a software program designed to help businesses migrate their content from the Classic CMS to the new and improved Spire CMS. The tool is designed to automate the migration process and make it faster and more efficient. With this tool, businesses can easily migrate all their content. These include pages, posts, images, and videos, from Classic to Spire without any hassle.
There is a checkbox for In Spire Format in the Classic CMS Import/Export Content dialogue.
The Classic to Spire CMS Conversion Tool converts the content from Classic to Spire format. The tool first extracts the content from the Classic CMS and then converts it into Spire format. The converted content is then uploaded to the Spire CMS, and the process is complete. To export content from Classic into the Spire format, choose this. The material may then be imported into your Spire website. Regardless of whether you have Only Published chosen or not, this function only exports material that has been published.
The tool is designed to work seamlessly with both Classic and Spire CMS. Businesses can use it to migrate their content without having to worry about any compatibility issues. The tool is also designed to handle large amounts of content. This makes it suitable for businesses with a lot of online content.
There are several benefits of using the Classic to Spire CMS Conversion Tool, including:
You can choose to Restore Initial Pages in the Spire Import Content dialogue since normal system pages in Classic, such as My Account and product detail pages, cannot be readily translated or mapped to Spire. When importing Classic material, this causes all common system pages in Spire to be recreated.
The Classic to Spire CMS Conversion Tool is a valuable tool for businesses looking to migrate their content from Classic to Spire. The tool automates the migration process, making it faster and more efficient, saving businesses time and money. This functionality lets you replicate common material from Classic to Spire but does not provide a similar UI in Spire due to its complexity. Additionally, with the standard implementation, Optimizely cannot convert customized pages or widgets, but you and your partner can modify it.
]]>