Jump to content

Script properly fixes category counts when the database is populated manually or loaded with a CSV file


Recommended Posts

Hi all, there used to be a simple script required to fix the category counts when the database was populated manually or loaded with a CSV file. The categories have been created/added and now I have about 11000 products to add and all have their allocated category/sub category number. However, after adding a few products as a test the CubeCart_category_index stays empty and all products need to be manually allocated to their individual category. 

Is the following work around still the same as at https://swscripts.com/cubecart-mods/fixcatcount.html ?

I looked in the forum and to my amazement I could not find anything about this.

 

Thank you for your direction,

Pippo

Link to comment
Share on other sites

In CubeCart, one can associate a product to more than one category, with one of those categories designated as the Primary category. This designation is indicated by a true-ish value in the 'primary' column.

The Primary category (cat_id) is also recorded in each product's record in CubeCart_inventory.

The Primary category is what will construct the breadcrumb path when viewing that product, regardless of the path of pages one took to get there (Sale Items, Searches, or secondary category path). Also, if using Shipping by Category, only the Primary category contributes to the list of available shipping options.

When deciding to show what products are visible (a logged-in admin overrides this), if any of the associated categories is enabled and not hidden, then the product will be shown.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...