Duplicate RSR Products

Find catalog products that share one RSR stock number, then delete a duplicate or clear that stock number yourself.

Script Overview

RSR stock numbers are stored on each catalog product. This screen finds stock numbers that are attached to more than one product and saves that list for review. Building the list does not delete products or clear stock numbers. Deleting a product, or clearing its RSR stock number, happens only when you choose that button on a row.

Operator Workflow
Step 1
Build the Review List
  • Choose Build RSR Duplicates Table and confirm the scan.
  • The scan can take a while. It refreshes the review list and does not delete products.
Step 2
Read Each Column
  • Name, UPC, quantity, location, and status each have their own column.
  • The model cell also shows the product id. Use the page controls above or below the table to move through the list.
Step 3
Delete a Duplicate Product
  • Choose Delete Product only for the catalog row you want removed from the store.
  • Confirm the product id. That product is deleted and the review row is updated.
Step 4
Clear One RSR Stock Number
  • Choose Remove RSR Stock# when the product should stay in the catalog.
  • That product's RSR stock number is cleared. Other products on the row are left alone.
Step 5
Close the Screen
  • Read the banner after a build, delete, or stock-number removal.
  • Choose Close to return to the inventory index. The Inventory menu stays available.
Technical Reference & Safeguards
  • Data Read: oc_product custom field 120, model, quantity, location, status, manufacturer, and UPC. English names come from oc_product_description with language_id = 1. Review groups come from oc_product_rsr_duplicates.
  • Database Writes: Build replaces oc_product_rsr_duplicates inside one transaction. Delete Product purges that catalog product and updates the staging row. Remove RSR Stock# sets custom field 120 on oc_product.custom_field to empty and updates the staging row.
  • Safeguards & Notifications: Build does not delete products. Delete and Remove run only when that product id is on the matching review row. Each write uses begin_transaction(), commit(), and rollback(). Statements use mtPrepare(), mtStmtBindExecute(), mtInt(), and mtString(). A failed write leaves the previous review list in place, and the banner names the product id.

The scan saves shared RSR stock numbers for review. It does not delete products or clear stock numbers.

Showing 0–0 of 0 duplicate RSR stock numbers.

RSR Stock Number Manufacturer Model Name UPC Qty Location Status Actions
No duplicate RSR stock numbers are waiting for review. Choose Build RSR Duplicates Table to scan the catalog.

Showing 0–0 of 0 duplicate RSR stock numbers.