Magento 2 Integration Guide
Overviewβ
The Caratwise Jewelry Builder module embeds a powerful jewelry customization experience directly into your Magento 2 store. It empowers customers to design, configure, and purchase personalized jewelry products, with seamless backend integration to Caratwise APIs.
π§ Featuresβ
- Automatically creates the
CWattribute set and products upon installation. - Supports custom URL paths for the builder page.
- Renders the Caratwise Jewelry Builder interface.
- Enables users to design unique products.
- Provides a detailed summary page similar to Magentoβs standard product page.
- Allows customized products to be added to the Magento cart from summary page.
- Interfaces with Caratwise APIs to:
- Fetch product data
- Check product availability
π¦ Installationβ
-
Download the latest module.
-
Move the module code to the
app/code/Caratwise/JewelryBuilder/directory. -
Run the following commands to install the module at magento root:
bin/magento module:enable Caratwise_JewelryBuilder
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
βοΈ Configurationβ
Navigate to:
Admin Panel β Stores β Configuration β Caratwise β Jewelry Builder
1. General Settingsβ
| Field | Description |
|---|---|
| Enable | Enable or disable the moduleβs functionality. |
| API Endpoint | Base URL of Caratwise API (retrieve from Dashboard β Channel Settings). |
| Client Key | Used to load the builder on the frontend. |
| Secret Key | Used for authenticated API communications with Caratwise. |
| Test Connection | Button to verify the API credentials and connection. |
| Master URL Key | Sets the custom route for the builder (e.g., /design-your-own). |
| Builder Script | Paste the embed script from Caratwise Docs. |
2. Builder Landing Page Configurationβ
| Field | Description |
|---|---|
| Enabled | Toggle the landing page on or off. |
| Builder Page Title | Title displayed in the browser tab. |
| Meta Title / Keywords / Description | SEO metadata for the landing page. |
| Robots | Configure search engine indexing behavior. |
3. Builder Route Configurationβ
Configure routes for specific builder types:
Engagement Ring Builderβ
| Field | Description |
|---|---|
| URI Prefix | Example: /engagement-ring |
| Robots | Configure SEO settings. |
β οΈ Only use lowercase letters, numbers, dashes (
-), and underscores (_) in URI prefixes.
4. Debug Settingsβ
| Field | Description |
|---|---|
| Enable Debug | Log all API activity and errors to var/log/caratwise.log. Useful for troubleshooting. |
5. Content Security Policies (CSP)β
| Field | Description |
|---|---|
| CSP Whitelist | Add all external domains used by the builder to prevent script/content blocking. |
π‘ Workflowβ
Load the Builder Pageβ
The builder will be rendered at the path defined in Master URL Key.
For example:
https://yourdomain.com/design-your-own
Cart Integration Flowβ
- After customization, a product will be created.
- The customer can see a product page with full configuration details before add to cart.
- The product is added to the cart from product page.
- Customer can proceed for checkout from the cart page.
API Usedβ
| Event | Action (API Called) |
|---|---|
| Fetch product information | Product Information |
| On product validation | Availability Check |
π§ͺ Debuggingβ
Enable Debug Mode in configuration to track errors and API interactions:
var/log/caratwise.log
Full Functional Demoβ
Frontendβ
- Home page: https://m248.caratwise.com/
- Builder page: https://m248.caratwise.com/design-your-own
Adminβ
- Admin: https://m248.caratwise.com/admin
- Username:
caratwise - Password:
Admin@123
Supportβ
If you need assistance with integration:
Contact
Email: ankur@dholakia.ai
Phone: +91-9925228844