Jump to content

Products inserted via a SQL statement


Guest

Recommended Posts

Hi all

I can't get my head around this. To save myself hours of work, I knocked up a SQL statement to pump over 2,100 items into the inventory table. I've got a £6.99 section on the site and when I search for an item it's there in the database and with the correct location on the screen (ie /£6.99), but when I click on the £6.99 global nav button, it's not. In fact, everything that I've entered via SQL isn't showing up when I view stock via the global nav. Here's 2 lines from the DB (the asterisks represent empty fields):

Entered via admin and shows via global nav:

35 AHC12 1 * aha-huntinghigh.jpg 0 6.99 A Ha - Hunting High And Low 12 0 0.00 0 0 0 * 0.00 1 0

Entered via SQL and doesn't show via global nav:

82 ALI512 1 * aliceinchains-faceliftjpg.jpg 0 6.99 Alice In Chains - Facelift 12 0 0.00 0 0 0 * 0.00 1 0

They (all) look identical - I'm not sure what I'm missing. Anyone any ideas as I'm a bit stumped.

Link to comment
Share on other sites

fstorr, from what I'm seeing, you can't just add to _CubeCart_inventory.

You need to adjust _CubeCart_categories with the number of items per category.

You need to build _CubeCart_cats_idx with each cat_id and productld.

You also need to build _CubeCart_img_idx with each productld and img filename.

Without consulting with brooky on this, I'm guessing that he did this so that he could pull the info from a smaller, simpler database when just cursory info was needed. I can see how it cound help on a HUGE (>20,000 items) database, but it won't likely show much speed gain for most of us. But it certainly allows flexibility and room to expand in the future (the most likely reason).

The only real downside is overall database size and the necessity of more inserts and/or updates when items are added or changed -- neither of which is much of an issue.

Link to comment
Share on other sites

Cheers, Sir.

That all seems right. A quick PHP script to knock up a large SQL insert statment will allow me to bulk update the _CubeCart_cats_idx table, and that should be it sorted.

Thanks for the help

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.

×
×
  • Create New...