Jump to content

Updating DB - Need Help w/Missing Step


markscarts
 Share

Recommended Posts

I've worked a great deal on this, but now I'm stumped.

I used CSV files to add some subcats to my site. No problem there. The subcats w/photos appear in store and in ACP.

I used CSV to add about 1500 products to my site. Each was assigned a category i.d. number, along with other info (name, descr., product i.d., price, weight). The products appear in ACP, and they are assigned to proper cats. But they do not show in store, and cats show as empty.

I have run Sir Williams' fixCatCount to no avail. Obviously, I have missed some important step. Any clue as to what I need to do?

Link to comment
Share on other sites

Guest hartmurmur

You've added the catid to the inventory table and then also populated the cats_idx table? The cats_idx table is what is going to allow them to be shown on the site.

Link to comment
Share on other sites

Guest hartmurmur

I should add that a quick way to populate the cats_idx table *IF YOU HAVE ALREADY SET VALUES FOR CAT_ID IN THE CubeCart_inventory table)* is to use phpMyAdmin or the mysql command line:

INSERT INTO CubeCart_cats_idx (productid, cat_id) SELECT i.productid, i.cat_id FROM CubeCart_inventory i WHERE productid >= 999

Make sure you change the "999" above to the id of the first item you loaded using the CSV file. And back up your database (or just the CubeCart_cats_idx table) first just in case.

Link to comment
Share on other sites

This problem is causing my page to go crazy, due to "alt" tags on missing thumbnails in the random products box, so I disabled that box temporarily.

The products should be showing up in the first eight top-level cats, and in all subcats under "56 More Designs!"

Sir William, sent you an email.

Link to comment
Share on other sites

Yes, as you know, when you delete an item or cat from the DB field, their unique id numbers given them at first creation are not re-used. I created that many categories in error earlier, then deleted them. The last true categories I added, therefore have very high numbers.

As I indicated above, this has been difficult for me :innocent:

I did update cat_idx, at which point the items were added in the categories in ACP. If you look at the cat "56 More Designs" you'll notice that each subcat has a number of items in it, but they do not show up.

Likewise, all first eight top-level cats are populated, but the only one that shows is shot glasses which I entered manually weeks ago.

Link to comment
Share on other sites

Guest hartmurmur

Okay, I see.

You also need to add the subcat_id to the CubeCart_cats_idx table (in the cat_id column as well).

That SQL statement might take a little more work.

Link to comment
Share on other sites

I should add that a quick way to populate the cats_idx table *IF YOU HAVE ALREADY SET VALUES FOR CAT_ID IN THE CubeCart_inventory table)* is to use phpMyAdmin or the mysql command line:

INSERT INTO CubeCart_cats_idx (productid, cat_id) SELECT i.productid, i.cat_id FROM CubeCart_inventory i WHERE productid >= 999

Make sure you change the "999" above to the id of the first item you loaded using the CSV file. And back up your database (or just the CubeCart_cats_idx table) first just in case.

This worked like a charm for me. Thanks!

Link to comment
Share on other sites

Guest hartmurmur

You loaded all of your product data with a spreadsheet or some other means and your products are not showing under your categories? That's what this is about. You are having a similar problem too?

This is not code you add anywhere. It's to be run via the mysql command line or in phpMyAdmin (or whatever you use to manually dig into the database). You do it ONLY once if your products are just assigned in the inventory table and not the cats_idx table. Does not work if you have subcategories.

I suggest you don't mess around directly in the database unless you know what you are doing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...