Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Remove Orphaned Sub-Products and Fix Other Database Issues

Overview

You can use the following script to fix database issues related to Apparel products. These issues are often the result of using the Product Import Wizard (some fields might have been setup incorrectly). They could also be due to flaws in the software that have not yet been found. The script performs 3 tasks, but can be safely executed even if you aren't certain that your database needs to be “fixed”:

  1. FIRST Task: Fix storefront errors due to option groups order not set
    The script updates option groups order at the parent product level. Option groups must be ordered, otherwise there is a problem in the storefront.
  2. SECOND Task: Remove incorrectly setup sub-products from the Control Panel (orphaned sub-products)
    It loads all the products that are setup as Parent Products and then removes from the Control Panel sub-products whose parent is not in that list. Those records remain in the database, but with the removed field turn on (set to -1).
  3. THIRD task: Hide sub-products from the storefront
    If the active field is set to YES (-1), then some queries could mistake sub-products as stand-alone products in the storefront. Instead, sub-products should only be displayed within a Parent Product page. So the script sets the active field to 0 for sub-products.

Executing the script

  • Requirement: ProductCart v3.x and above, with Apparel Add-on
  • Unzip the script and upload it to your Control Panel folder
  • Load the page in the browser address field
  • You must be the store administrator to load this script

QR Code
QR Code Remove Orphaned Sub-Products and Fix Other Database Issues (generated for current page)