Jump to content

Why is one (and only one) category showing up at top menu?


Recommended Posts

Someone give me a hint where to look.

 

I've imported products to my store manually via phpmyadmin.

 

Everything seemed to go well.  I created categories in back office and began assigning products to them.

 

I added the first category and when I looked at the storefront I didn't see any mention of it, but I did see the products that are in it in the "new" section.  Didn't think much of it.

 

I added the 2nd category and now I see a very clear representation of that category name on the home page in the menu bar area.  Why that one and not the first?  I tried going through settings to figure out what is different between the two and I don't see anything.  They are both enabled.  So I added a 3rd category, enabled it, added some products to it... it too is not showing up, just the 2nd one.

What gives?

What do a I look for which defines which categories show up in the top nav?

 

In the database I went to categories table and I see the following:

 

post-1046572-0-04097500-1435909243_thumb.jpg

 

Does that look right?

Link to comment
Share on other sites

Figured it out I think.  Had nothing to do with categories themselves, but rather the module "Top horizontal menu".  I guess when I imported my data, the category IDs got re-used and those categories IDs were (I'm supposing) defined in that module.

 

While I get the value of sample data when trying out a new store, I have to say it has been a source of pain since I decided to migrate here.  I never did see a way of NOT having the sample data.  As I delete stuff (since my site has nothing to do with womens' fashions, it seems to introduce relational problems.

Link to comment
Share on other sites

Sorry, but you cannot add products by import via phpMyAdmin, unless you import whole already existent tables of a database. When products are added or imposrted by csv WITH BACK-OFFICE IMPORT FEATURE Pestashop adds not only ID's, but also dependencies on various other tables.

 

You should import your products only with the native feature of csv imprt from Prestashop, or at lease with for ex. Presta Store Manager (you will find it on Addons site). Only with these you have the guarantee that your products are correct added to database.

 

The same for import of categories with a csv. Prestashop adds several dependencies, which are controlled by the id's set when you import or add something on back-office to database.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

You say you "cannot".  Yes, of course you can.  Perhaps "should not" or "good chance you'll screw it up" is a better way to say it  lol.

 

I'm not new to PHP/SQL and PrestaCart's SQlL relationships are fairly straight forward (although some of the redundancy has me a little puzzled).

 

I'm pretty sure I *did* import my products over successfully.  Of course I have testing to do, but I think I got it right.  You're right that there are a lot of dependencies, but it isn't really that bad.

 

I might even write a script to make it easier for others coming over from Zen Cart.

 

Mine was more complicated than it needed to be, because at some point in the past I deleted "old" products from ZC since ZC retains snapshots of all orders.  It doesn't appear that PrestaShop does.  Ie. in ZC if a customer orders Widget and then later you delete Widget from the database (i mean entirely, not just using the back office) it won't matter because the "orders" table still contains the data related to the products.  But in PrestaShop, it seems that if a customer orders "Widget" and you delete "Widget" then it will appear as though they never ordered it.  It is more efficient, but less account-friendly.  Trade-offs :)  Anyway, I wish I hadn't deleted them because I had to actually rebuild the missing data by scouring the orders as well as the products!  That was a pain because, of coruse, one product can have hundreds of orders.

 

I wanted to retain order history so my customers can still look up old invoices and so I still have that sales data. 

 

 

So I've imported (manually by SQL) customers and now products.  I built the categories the normal way because there weren't many.  Next up (tomorrow), I will begin importing the orders.  That will probably be the trickiest.

 

Wish me luck!

Edited by bcsteeve (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...