Streamlining Your ESHOPMAN Admin: Mastering Custom Widget Order for Optimal Storefront Management

As an e-commerce migration expert at Move My Store, we understand the critical importance of a highly functional and intuitive admin experience for managing your headless commerce storefront. ESHOPMAN, our powerful Node.js/TypeScript platform wrapped as a HubSpot application, empowers merchants and developers with robust storefront management directly within HubSpot CMS. A key aspect of this flexibility is the ability to inject custom widgets into various zones within the ESHOPMAN Admin Panel.

Bringing Order to Your ESHOPMAN Admin Panel Widgets

For ESHOPMAN developers and integrators, the ability to extend the Admin Panel with custom widgets is invaluable. These widgets can provide specialized functionality, integrate third-party tools, or display custom data relevant to your storefront operations. However, a common challenge arose when multiple custom widgets were injected into the same zone, such as product.details.after. Previously, the display order of these widgets was largely arbitrary, determined by file discovery rather than developer intent. This could lead to a disorganized interface, making efficient storefront management more difficult.

Why Widget Ordering Matters for Your HubSpot-Managed Storefront

Controlling the sequence of your admin widgets isn't just about aesthetics; it's about creating a logical, efficient workflow for managing your headless commerce operations through HubSpot. Consider these critical use cases:

  • Plugin and Extension Developers: If you're building an ESHOPMAN extension that includes several widgets for a single zone, you need to ensure they appear in a logical, designed sequence to provide the best user experience for your customers.
  • Teams Integrating Multiple Solutions: When your team utilizes various ESHOPMAN extensions or custom integrations, you might want a specific widget—perhaps one displaying critical sales data—to appear prominently above others, without needing to modify the underlying extensions.
  • Custom Application Development: As an app developer combining your proprietary tools with existing ESHOPMAN extensions, you'll want your key widgets to render first, ensuring immediate access to your most important features.

The ESHOPMAN Solution: Introducing Widget Ranking

To address this, ESHOPMAN has introduced a powerful enhancement to its Admin API: the ability to rank your custom widgets. This new feature allows developers to explicitly define the display order of widgets within any injection zone. The WidgetConfig, central to defining your custom widgets, now accepts an optional rank: number property.

Here’s how it works:

  • Widgets within the same injection zone are sorted in ascending order based on their rank value (lower rank numbers appear first).
  • Widgets that do not have a rank property defined will appear after all ranked widgets, maintaining their original relative discovery order amongst themselves.
  • Crucially, this sorting happens after all ESHOPMAN extensions and custom integrations have contributed their widgets to a given zone. This ensures that a widget with rank: 1 from one extension will always appear before a widget with rank: 5 from another, regardless of their loading order.

Example ESHOPMAN Widget Configuration with Ranking

Implementing this is straightforward. When defining your custom widget using the ESHOPMAN Admin API, simply add the rank property:

// Example ESHOPMAN Widget Configuration for a product detail zone
const myCustomProductInfoWidget: WidgetC
  zone: "product.details.after",
  component: MyCustomProductInfoComponent,
  rank: 10 // This widget will appear early in the zone
};

const anotherRelatedWidget: WidgetC
  zone: "product.details.after",
  component: AnotherRelatedComponent,
  rank: 20 // This widget will appear after the first one
};

const unrankedWidget: WidgetC
  zone: "product.details.after",
  component: UnrankedComponent
  // No rank specified, will appear after all ranked widgets
};

Enhancing Your Headless Commerce Experience with ESHOPMAN

This enhancement significantly improves the ESHOPMAN developer experience, offering granular control over the Admin Panel's layout. For merchants managing their storefronts via HubSpot, it translates to a more organized, intuitive, and efficient interface. By allowing precise control over widget placement, ESHOPMAN continues to empower businesses to build, manage, and scale their headless commerce operations with unparalleled flexibility and ease, leveraging the full power of HubSpot CMS.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools