🥯
Everything
  • Best Practices and Guidelines
    • ChatGPT Prompts
    • Documentation Guideline
    • GitBook Spaces
    • GitHub Guideline
    • Internal Usage
  • Tools
    • End to End Order Flow
      • Order Creation
      • Order Import
      • Order Brokering
      • Order Fulfillment
      • Order Fulfillment Notification
    • Git
      • How to Create Issue on Git
    • Jira
      • Feature Request on Jira
    • Launchpad
      • Fulfillment
        • Stuck Orders in Fulfillment App
      • Job Manager
        • Check Job Frequencies
        • Job Runtime Error
        • Mismatch Time Zone
    • Napita
      • Glossary
      • Schedule Processors
      • View and Manage Processors
      • Flow Definitions
      • Verify Processor Properties
      • Bulletins
      • Data Provenance
      • Troubleshooting
        • Data Export Errors
        • Queue Errors
        • Fetch Put SFTP Retry
    • Netsuite
      • Managing Saved Searches
    • Ofbiz
      • Orders
        • Multicurrency Sales Orders
        • POS Order Refresh Failure
        • Pre-Order Catalog Sync
        • Reindex Order after Solr Down Time
      • Products
        • Product Duplication
      • Inventory
        • Add New Variance Reason
      • Data Manager Configuration
        • Create a Job Using Data Manager Configuration
        • SFTP Issue
    • Shopify
      • How to Access Shopify POS APP
      • How to Create Draft Order in Shopify
    • Tathya
      • Database Configuration
        • Additional Settings
      • Charts Creation
        • Selecting Database & Schema
        • View & Save Chart
        • Charts Access
        • Create Multiple Charts
        • LogInsight Charts
      • Understanding Dashboards
        • Configuring Dashboards
        • Dashboards Access
        • Dashboard Options
        • Dashboard Customizations
        • Link Configuration
        • Set Multi-Day Filters
      • Configuring Alerts & Reports
        • Creating Alerts
        • Creating Reports
        • Alternate Interfaces to Schedule Reports
      • Creating Roles
        • List & Modify Roles
      • Creating User
        • Creating LDAP Account
        • Tathya Authentication
        • Listing User in Tathya
        • User Permissions
      • Troubleshoting
        • Reporting Discrepancies
        • Tathya login Issue
      • How to
        • How to Create User on Tathya
        • How to Create Alpha Role on Tathya
        • How to Request for the Report
  • Client Communication
    • Templated Replies
    • Ticket and Release Mangemnet
  • Monitoring
    • Sanity Checklist
    • System Monitoring Guide
  • Hotwax Deployment & Versions
    • HotWax Commerce Deployment
    • Launch Machine
    • Update OMS Version
    • Rollback OMS Version
    • Optional Plugins
Powered by GitBook
On this page
  • Problem:
  • Error Identification
  • Cause Analysis
  • Process Explanation:
  • Solution:
Edit on GitHub
Export as PDF
  1. Tools
  2. Ofbiz

Products

Problem:

Duplicate products may appear on the View Sales Order page due to the same variant product ID being associated with two different parent product IDs. This issue causes confusion in the sales order management process.

As it may result in an item being shipped twice because it appears multiple times on the View Sales Order page. Additionally, the support team encountered difficulties canceling the item, as it does not exist in the database.

Error Identification

The merchandising team and support team have identified the issue.

Cause Analysis

Product Identifier Change: Recently, the product identifier was transitioned from using the original Product ID to a Barcode-based identifier. This change caused issues when the parent product handles or URL endpoints were updated. Specifically, a new parent product was created, and the existing variants were incorrectly linked to both the old and new parent products.

Process Explanation:

  • For barcode and SKU identifiers, the system prepends the handle name with a "V_" prefix and uses this value as the internal name for the parent product.

  • When the parent product's URL endpoint is updated, it no longer matches the internal name stored in the system.

  • Consequently, when the updated parent product JSON is processed, the system checks for an existing handle of the same name. If no match is found, a new parent product is created, leading to the duplication issue.

This mismatch between the updated handle and the stored internal name causes the system to treat the updated product as a new entity, resulting in multiple associations for the same variants. As a result, products appear multiple times on the View Sales Order page.

Solution:

1. Identify Duplicate Products:

  • Navigate to the View Sales Order page and identify the duplicate products.

  • Note down the hcProductId associated with the variant product showing duplicates.

2. Query Product Associations:

Run the following SQL query to return the multiple parent product associations linked to the same variant product ID:

SELECT * FROM PRODUCT_ASSOC 
WHERE PRODUCT_ID_TO = '${productId}';

From this query, identify the duplicate parent product associations for the same variant product ID.

3. Delete Old Parent Product Associations:

It is recommended to delete the association with the parent product that was created first, as the latest parent product will have the revised name and updated details. Run a MySQL delete query using the PRODUCT_ID and PRODUCT_ID_TO values retrieved from the previous step. This ensures that only one parent product association is removed.

DELETE FROM PRODUCT_ASSOC 
WHERE PRODUCT_ID = 'your_parent_product_id' 
AND PRODUCT_ID_TO = 'your_variant_product_id';

4. Verify Changes:

After performing the deletions, check the View Sales Order page to ensure that the duplicate products no longer appear.

PreviousReindex Order after Solr Down TimeNextInventory

Last updated 3 months ago