Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No products showing..but database is filled


elijahweb

Recommended Posts

I just used the "add product fields" contribution and am going to add the contribution that provides for "retail" price and "our price" and you save % . All else seems to look right, but after I added a test text file of 127 products. The store shows no products still. The database has the products, as does the products description. I haven't uploaded the categories table yet. Is that possibly why?? Any hints to what it could be?

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

If a product is assigned to a category that does not exist, then that product will not appear until that category exists.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I haven't uploaded the categorie tables yet...and I was testing so I'm still unsure how the product table fields link to the categorie table....I'm wonderig if I made a filed Null by mistake while learning...?

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Products are linked to categories via an entry in the products_to_categories table.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Glad to be of help. :)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Sorry..I emptied the tables and then realized the product-to- categories table had never been emptied. I eptied it and now I am not sucessful when I upload my csv files into the products tabel and so on. It now only allows 1 field on upload. That is consistant on products, and product description. Any ideas of what I have done???

 

K

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

I lovemy Mac but I won't be using it while inserting databases or and code work. The line endings seem to really whack out things at times. I still love them though.

 

Now I just don't know how to configure teh categories and products to catgeories tables. The other tables are fine. Anyone able to brief me on the inserting of a .csv file into the cat to prod and and categories fields correctly?

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

If you are using Easy Populate to upload your products, there is a setting that you need to make when working on a Mac due to the line endings.

 

I cannot recall what the change is but I know that it is mentioned either in the readme or in the easy_populate.php file.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

No..although I realize that EZ populate saves time and makes sense..I decided to go right to inserting via phpmyadmin. I'm now fine with the products table and products description table. I just uploaded to he categorie table, and I'm about to upload to the categories description table. If I don't goof..should that then begin to show my products on the site. They all look good on the database.

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

If you have products and categories tables populated, after you tie the two together with an entry in the products_to_categories table everything should appear.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I have them populated..then I inserted a csv file mwith simply categorie_id from 1-127 and a matching product_id field next to it matching it . thought that would simplistically work but I must not have throughly thought it out. I'll get a cup of coffee and go again..

 

Keith..and thanks alot!

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Still at a loss unfortunately. Bunches of categories...(too many..it's showing the repeated ones... but no products) Its not linking up obviously..they are all on the database when I check with phpmyadmin..

hmmm

 

 

*

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Yep, that is all that is needed.

 

For example, if you have a category named Coffee with a category_id of 12 and a product named Jamaican Blue Mountain with a product_id of 27, then all you need is an entry in the products_to_categories table of 27, 12 (for product_id, category_id respectively).

 

Also be sure that all of the category records have correct entries for the parent field. ;)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Here is another ignorant moment...I have nothing in the parent field and unsure of what or how to fill the field.Is it pertaining to the main categorie, and subcategories?

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

The parent field does indeed specify what category the category in question belongs to.

 

Say that you have a category named coffee (can you tell that I like coffee? :P) with a category_id of 12 and another category named exotics with a category_id of 15.

 

If you wanted the exotics category to be a sub-category of coffee, then the parent field for the exotics category record should be 12.

 

You see why I said that using EP would be easier? LOL

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I'll work on honing the cate"gorie" area. I believe that's why I'm seeing nothing ..don't you. I agree about EP. I stopped because I thought the phpmyadmin way would be lengthier but attainable. I am glad that I'm doing this because it's showing me my way around the database a bit. I'm reading alot and preparing for a few courses that will get me into relational databse work with php. I too..am a person who trult appreciates the beauty of a fine pot of coffee...or three.

 

 

Keith

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Wondering why my categories show but not the products. I'm thinking they should still show as new products but just have no relationship throughout the site. Thanks for the help. I normally do static sites, but I'm getting busy and this a demand I'm getting often.

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Try this for grins and giggles.

 

Pick a category that you are able to display in your admin panel.

 

Then in PHPMyAdmin, pick a product to work with.

 

Edit the products_to_categories table and add a record with the category_id and product_id from above.

 

Then view your admin and see if the product appears under the category.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

So...If I have 125 books in the products table..all auto increment filling, and half of them are bibles and the other half are fiction, I could give the bible categorie say ID_1, and teh fiction books ID_2. Then in products to categories. A King James Bible with the productID of 21, would have the categorie ID of 1. It then should show up in admin. Also..In my actual text file...any record that is a Bible, has the word bible in the categorie field. Of course that means I have 125 categories called bible visible on the site and in Admin. Any hints there???

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Sorry about the fog..but you are getting me out of your way soon by helping! :? If I have 5 category names like this: 2 of each,

Bibles

Bibles

Fiction

Fiction

Youth

Youth

Non_Fiction

Non_Fiction

General Interest

General Interest

 

...and if they all have their specific category ID in the text file, what happens when it uploads into an auto_increment field in Mysql? I had left the Category ID field empty in my text file and then uploaded thinking it would be wiped out and replaced by auto increment anyway. I realize it's not quite clicking how it works relationally for me in my braaaaaaaain. Of course that's why they call it that relational!! :roll:

Thanks in advance,

Keith Ronan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...