markscarts Posted September 19, 2005 Share Posted September 19, 2005 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? Quote Link to comment Share on other sites More sharing options...
Guest hartmurmur Posted September 19, 2005 Share Posted September 19, 2005 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. Quote Link to comment Share on other sites More sharing options...
markscarts Posted September 19, 2005 Author Share Posted September 19, 2005 That is the step I am missing! I have populated CubeCart_category and CubeCart_inventory. Thanks, hartmurmur, I'll see if I can puzzle out what to do with cats_idx ;) Quote Link to comment Share on other sites More sharing options...
Guest hartmurmur Posted September 19, 2005 Share Posted September 19, 2005 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. Quote Link to comment Share on other sites More sharing options...
markscarts Posted September 19, 2005 Author Share Posted September 19, 2005 Problem appears to be solved, thanks again! Quote Link to comment Share on other sites More sharing options...
markscarts Posted September 19, 2005 Author Share Posted September 19, 2005 Well, I wrote too soon. I now have correct cat counts, even in store (parentheses next to subcats) but the products do not show in store . . . I am ready to say, "Uncle" - I give up. Does anyone do this as a paid service? I've had enough http://avftexas.com/shopping/ Quote Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2005 Share Posted September 19, 2005 Mark, hit me up, I'll give it a whack for ya. I'm still working on the CSV import utility. Quote Link to comment Share on other sites More sharing options...
markscarts Posted September 19, 2005 Author Share Posted September 19, 2005 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. Quote Link to comment Share on other sites More sharing options...
Guest hartmurmur Posted September 19, 2005 Share Posted September 19, 2005 Looking at your site, are you sure you updated the CubeCart_cats_idx table? Some of your items point to categories with id's in the thousands. For example: http://avftexas.com/shopping/index.php?act...wCat&catId=2059 2059 categories? Quote Link to comment Share on other sites More sharing options...
markscarts Posted September 19, 2005 Author Share Posted September 19, 2005 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 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. Quote Link to comment Share on other sites More sharing options...
Guest hartmurmur Posted September 19, 2005 Share Posted September 19, 2005 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2005 Share Posted September 19, 2005 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! Quote Link to comment Share on other sites More sharing options...
Guest becky Posted September 23, 2005 Share Posted September 23, 2005 Hi, Where do I add the code? I have looked at mySql and don't want to screw anything up. Could somebody, please give me directions? Thanks, Becky Quote Link to comment Share on other sites More sharing options...
Guest hartmurmur Posted September 23, 2005 Share Posted September 23, 2005 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2005 Share Posted September 23, 2005 Just an FYI, I'm working on a complete CSV import application now. I'm trying to think of everything with it so it'll be a very simple affair to populate / update your database. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.