Forums / Setting Up Categories, Products, Attributes / Categories and Products on Same Level

Categories and Products on Same Level

Started by chadderuski on 4 Nov 2011, 10:04 PM · Views: 4,091

Results 21 to 36 of 36
6 Nov 2011, 12:40 AM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Categories and Products on Same Level

Then that would need to be re-written to run the settings in groups rather than try to tackle the whole database at one time ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Nov 2011, 1:03 AM
#22
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Ajeh,

I still have two orphaned products after running the reset master categories id... should I delete those?

Also, something is not right with the TOP categories. When I go to move a product, I'm getting that weird category name....

Circular - Accessories > Connectors >&nb

Connectors are a TOP level category. I don't know where the &nb is comming from. I think this may be part of my problem... ???

6 Nov 2011, 1:28 AM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

Are you able to find the two products_id that have no recorders in the products_to_categories table?

Do you have records for those two products_id in the products_description table?

I have no idea at this point the cause of:

Circular - Accessories > Connectors >&nb

It could be due to the bad data etc.

It could be the names you are using on the Categories ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Nov 2011, 1:58 AM
#24
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Ajeh:

Are you able to find the two products_id that have no recorders in the products_to_categories table?

Do you have records for those two products_id in the products_description table?

It could be the names you are using on the Categories ...

Yes, I had the products_id and products_model. They don't have entries in products_description. Nor do these products_model show when searching in Categories/Products. At some point they
were duplicated and had different products_id's ... probably due to a crash to the import script (EP).

I figured this was confirmation enough to delete them and did so.

The &nb is really bugging me... Did anyone every write a script for checking for corrupt or orphaned data in Zencart?

I think I'll run Dr Bytes Database Backup MySQL and download the file and see what the raw data looks like.

I really appreciate your help. You gave me a LOT of great info that I didn't have.

Please let me know if anything comes to mind about this funky "&nb" in my TOP category.

Thanks!!

7 Nov 2011, 10:56 PM
#25
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

I'm hoping someone can help me identify the cause of the "&nb" showing as a top level category name when I attempt to move a product. I think this may be related to why I am have the other problems with the site.

I've attached an image of what this looks like. Note that there is no category that the starts with "&nb" and I've looked in the actual databases. It's like some kind of pointer error??
I also verified this behavior by backing up the database and recreating it on another server (had to use ssh and mysql directly to handle THAT much data). The default store does the same thing.

I really hope someone can help with this! Thank you!

10 Nov 2011, 3:54 PM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

This is a weird one ... I do not have the exact cause, but it appears to be something to do with the version of php ...

It does not happen in php v5.2.3 but I do see it in php 5.2.17 ...

It is a visual thing so ignore it and we will look into it further ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Nov 2011, 5:28 PM
#27
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

Scratch the php idea ...

It's a small display anomaly that's apparently been there since the beginning of time ... It will be fixed in 2.0 ...

Thanks for the report ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Nov 2011, 5:19 PM
#28
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Hi Ajeh,

That's both good and bad news...

Good that I found something weird (and thank you for really taking a look at this).
Bad that I'm back to the drawing board trying to figure out why my import script is dying on this one particular server :(

Thanks!

15 Nov 2011, 5:55 PM
#29
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

See if this helps you in doing an update on a large database for:
Master Categories ID
Products Price Sorter
Attributes Sort Order

and if this is working it can later be turned into Add On once it is complete ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Nov 2011, 7:08 PM
#30
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Hi Ajeh!

This seemed to work fine. I was able to update price sorter in 50k increments, but the master categories id had to be done in smaller increments of around 10-20k. Thank you!

I still think I they have something screwy in their categories. I made a fresh install of 1.39h in a test directory and was able to use my EP4 to import 470,000 records. Doing this into a fresh database doesn't show that "&nb" ... when I move a product to another category.

Still have more testing to do.

Really appreciate the effort. I don't know how many Zencart stores there are out there with close to a million products! Your code will certainly help.

-cj

17 Nov 2011, 7:15 PM
#31
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

Thanks for the update that this code was able to help you manage your large database of Products and Categories to eliminate the time outs ... :smile:

Ignore the issue on the part that shows a broken &nbsp as that is just a bug in the existing code that will be addressed in v2.0 ... it is not hurting anything but just looks odd ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Dec 2011, 2:43 PM
#32
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Hiya Ajeh!

Hope this catches your eye since it's been a while!

I was wondering if your script can be modified to run from as a cron job and automatically increment itself after each iteration (say every 50,000 records or something like that) to cycle through the whole 800,000+ records on the site?

Thanks!

8 Dec 2011, 2:51 PM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories and Products on Same Level

You would need to write your own customized code for this to work with a cron job as it uses gets and posts to run the current code ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Dec 2011, 10:03 PM
#34
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

Ajeh:

You would need to write your own customized code for this to work with a cron job as it uses gets and posts to run the current code ...

I've been doing a little digging.... and your script kind of enlightened me....

Langer was running zen_update_products_price_sorter() on the ENTIRE database at the end of every import (even if you only imported or updated a small number of produts)! (and choking on the 900,000 products! for elcom).

Is there any reason why I couldn't just call zen_update_products_price_sorter() on each producs_id after I either updated or added? I think this may be what I need to do.

Also, I've added a .csv file splitter to my code so I can take that 800,000 product file and auto split it into smaller more manageable chunks. Not an original idea, but my implementation makes better sense.

-cj

8 Dec 2011, 10:34 PM
#35
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

One more question to go with the above... Are there any specifics for testing the price sorter?

8 Dec 2011, 10:42 PM
#36
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Categories and Products on Same Level

WOW! :O

Calling zen_update_products_price_sorter() effectively DOUBLES the execution time of my script! Zonkers!