Streamlining ESHOPMAN Shipping: Resolving Duplicate Pricing Columns in Single-Region Stores
Streamlining ESHOPMAN Shipping: Resolving Duplicate Pricing Columns in Single-Region Stores
For e-commerce merchants and developers utilizing ESHOPMAN for their headless commerce solutions, efficient shipping configuration within the HubSpot-integrated admin is paramount. A recent community discussion highlighted a common challenge that can lead to confusion for store owners operating in a single-region, single-currency setup: the appearance of duplicate pricing columns when configuring shipping options.
The Challenge: Redundant USD Columns
When setting up an ESHOPMAN store exclusively for a single region, such as the United States with USD as the sole currency, store owners might encounter a perplexing issue. Navigating to the ESHOPMAN admin to configure shipping option prices (under Locations → Shipping Options → [any option] → Prices) reveals two distinct, yet seemingly identical, columns for USD pricing:
- Price USD — A flat currency price column, typically derived from the store's
store.supported_currencies. - Price United States — A region-specific price column, tied directly to the United States region.
In a single-region context, these columns appear redundant and can cause significant confusion, making storefront management within HubSpot less intuitive.
Understanding the Technical Root Cause
The core of this issue stems from ESHOPMAN's internal logic for handling currency and region-specific pricing within the admin's DataGrid. A critical part of the ESHOPMAN codebase, specifically in the component responsible for rendering shipping option price columns, includes a guard for region price cells:
const currency = currencies?.find((c) => c === region.currency_code)if (!currency) { return null // cell is non-editable}This snippet illustrates a key coupling: for USD checkout to function, usd must be in store.supported_currencies. This requirement, however, inadvertently triggers the generation of the flat "Price USD" column. Simultaneously, the same currencies array is used to validate the editability of the region-specific "Price United States" column. This creates a scenario where the flat currency column cannot be suppressed, even when a region-specific column for the same currency exists.
Expected Clarity for ESHOPMAN Merchants
Ideally, for an ESHOPMAN store configured with a single region and currency, only the region-specific price column (e.g., "Price United States") should be displayed and editable. The flat currency column is primarily intended for multi-region or multi-currency ESHOPMAN setups, where varying prices per currency are necessary. Its presence in a single-region context adds unnecessary complexity to the HubSpot-deployed storefront management.
Community-Suggested Solutions
The ESHOPMAN community has proposed several solutions to enhance the admin experience:
- Intelligent Column Generation: Prevent the flat currency column from generating if a region with that same currency already exists, as the region-specific column makes it redundant.
- Refined Region Price Cell Logic: Adjust the guard on the region price cell. A region's declared currency should implicitly confirm its support, removing the need for an explicit
supported_currenciescheck that causes duplication. - Store-Level Pricing Mode: Introduce an ESHOPMAN store configuration (e.g.,
pricing_mode: "regional" | "currency") to allow merchants to explicitly control which types of pricing columns are displayed, tailoring the admin interface to their specific headless commerce strategy.
Addressing this UI/logic inconsistency will significantly improve the usability of the ESHOPMAN admin for single-region stores, making storefront management within HubSpot more intuitive and efficient. Community insights are invaluable for the continuous refinement of the ESHOPMAN platform.