Jump to content

Rebuild category product count


Guest bootcamp

Recommended Posts

Guest bootcamp

Hi,

Wonder if anyone else is having this problem.

Client was updating some Categories in the cart and now some of the Categories are showing 0 product when there are products listed under them.

I have cleared the cache and that worked fine, But when I click "Rebuild category product count", the browser times out and it does nothing.

I have made sure everything is up todate:

CubeCart Version: 4.3.0

PHP Version: 5.2.6

MySQL Version: 5.0.45-community

Image upload folder size: 12.1 MB

Server Software: Apache/1.3.37 (Unix) PHP/4.4.8

Client Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)

But Still no joy. How can I get the product numbers to repair themselves.

Here is the site to see what I mean:

Site Address

Thanks for your help :D

Link to comment
Share on other sites

  • 1 month later...

Guest bootcamp

Has anyone figured out how to reset the product count within Cubecart?

Does anyone know a script that can be run to make it recount each category?

Thanks for your help :rolleyes:

Hi,

Wonder if anyone else is having this problem.

Client was updating some Categories in the cart and now some of the Categories are showing 0 product when there are products listed under them.

I have cleared the cache and that worked fine, But when I click "Rebuild category product count", the browser times out and it does nothing.

I have made sure everything is up todate:

CubeCart Version: 4.3.0

PHP Version: 5.2.6

MySQL Version: 5.0.45-community

Image upload folder size: 12.1 MB

Server Software: Apache/1.3.37 (Unix) PHP/4.4.8

Client Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)

But Still no joy. How can I get the product numbers to repair themselves.

Here is the site to see what I mean:

Site Address

Thanks for your help :rolleyes:

Link to comment
Share on other sites

Hi,

Wonder if anyone else is having this problem.

Client was updating some Categories in the cart and now some of the Categories are showing 0 product when there are products listed under them.

I have cleared the cache and that worked fine, But when I click "Rebuild category product count", the browser times out and it does nothing.

I have made sure everything is up todate:

CubeCart Version: 4.3.0

PHP Version: 5.2.6

MySQL Version: 5.0.45-community

Image upload folder size: 12.1 MB

Server Software: Apache/1.3.37 (Unix) PHP/4.4.8

Client Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)

But Still no joy. How can I get the product numbers to repair themselves.

Here is the site to see what I mean:

Site Address

Thanks for your help :rolleyes:

Hi,

We have the same problem.

On the left site on Category stay's 10 products but, the products are spilt in two lists from 10 and 3.

How can i make that he shows 13 by category?

Link to comment
Share on other sites

I have similar problem, but I get error message:

MySQL Error Occurred

Error Message:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT productId FROM CubeCart_inventory WHERE disable

SQL:

DELETE FROM CubeCart_cats_idx WHERE productId NOT IN (SELECT DISTINCT productId FROM CubeCart_inventory WHERE disabled = '0')

All categories stays with (0) product count :(

Link to comment
Share on other sites

  • 3 weeks later...

I have similar problem, but I get error message:

MySQL Error Occurred

Error Message:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT productId FROM CubeCart_inventory WHERE disable

SQL:

DELETE FROM CubeCart_cats_idx WHERE productId NOT IN (SELECT DISTINCT productId FROM CubeCart_inventory WHERE disabled = '0')

All categories stays with (0) product count :huh:

I have had this problem too since starting to set up my store but I am now too scared to do too much as everything else is working right enough for customers. I have no idea how I even managed to set cubecart up in the beginning when I read all the technical stuff. I have persevered with the (0) which I don't like but the only way I can get the product count to change is to click on edit for every item. This usually leads to incorrect counts but at least there is a number there. I have the same thing with the category count and don't know how to change that either. Is there an obvious thing I can check or change? I am now getting an error message when I try to do a rebuild category count Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 240 bytes) in /home/kissandc/public_html/classes/db/db.php on line 129 :P

Link to comment
Share on other sites

  • 2 weeks later...

I have similar problem, but I get error message:

MySQL Error Occurred

Error Message:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT productId FROM CubeCart_inventory WHERE disable

SQL:

DELETE FROM CubeCart_cats_idx WHERE productId NOT IN (SELECT DISTINCT productId FROM CubeCart_inventory WHERE disabled = '0')

All categories stays with (0) product count :)

I have had this problem too since starting to set up my store but I am now too scared to do too much as everything else is working right enough for customers. I have no idea how I even managed to set cubecart up in the beginning when I read all the technical stuff. I have persevered with the (0) which I don't like but the only way I can get the product count to change is to click on edit for every item. This usually leads to incorrect counts but at least there is a number there. I have the same thing with the category count and don't know how to change that either. Is there an obvious thing I can check or change? I am now getting an error message when I try to do a rebuild category count Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 240 bytes) in /home/kissandc/public_html/classes/db/db.php on line 129 :whistle:

My customer has been stocking her store and we find the exact same issue of showing (0) product count. I have cleared cache and tried Rebuild category product count but it just hangs and does not sort the problem. This has to be a bug? We have version 4.2.3 installed. Please help

Link to comment
Share on other sites

I have similar problem, but I get error message:

MySQL Error Occurred

Error Message:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT productId FROM CubeCart_inventory WHERE disable

SQL:

DELETE FROM CubeCart_cats_idx WHERE productId NOT IN (SELECT DISTINCT productId FROM CubeCart_inventory WHERE disabled = '0')

All categories stays with (0) product count :(

I have had this problem too since starting to set up my store but I am now too scared to do too much as everything else is working right enough for customers. I have no idea how I even managed to set cubecart up in the beginning when I read all the technical stuff. I have persevered with the (0) which I don't like but the only way I can get the product count to change is to click on edit for every item. This usually leads to incorrect counts but at least there is a number there. I have the same thing with the category count and don't know how to change that either. Is there an obvious thing I can check or change? I am now getting an error message when I try to do a rebuild category count Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 240 bytes) in /home/kissandc/public_html/classes/db/db.php on line 129 :P

My customer has been stocking her store and we find the exact same issue of showing (0) product count. I have cleared cache and tried Rebuild category product count but it just hangs and does not sort the problem. This has to be a bug? We have version 4.2.3 installed. Please help

contacted CC they advised it was a bug which they fixed for me.

Link to comment
Share on other sites

  • 3 months later...
Guest Online Creations

It would be nice to know what the fix was.

It seems quite a few are having the same or similar problem.

Please advise how to fix.

Thanks

Link to comment
Share on other sites

It would be nice to know what the fix was.

It seems quite a few are having the same or similar problem.

Please advise how to fix.

Thanks

Are you using the latest version as it will have previous bug fixes included, upgrading to the latest version should sort it out.

Link to comment
Share on other sites

Guest Online Creations

Unfortunately no I don't have the latest version, I can't because the server I'm on doesn't have the latest PHP version. I've been using Cubecart for a few years now and the problem came about today.

Cubecart 4.0.3 and PHP version 4.4.8, MySQL Version: 4.1.22-standard-log.

Are you able to tell me which file I need to update?reinstall? or fix (and how to fix it)?

I've also got a problem with a Sale Item having been deleted but is still appearing. The links on the item are not working and the image is not working.

You are most welcome to visit the site to check the problems - I'm not sure if they're related - I don't think so though.

The site is:

www.sachomewares.com.au

Thanks

Jannette

Link to comment
Share on other sites

Guest Online Creations

I've had a look and can't find anything to help.

Has anyone been able to figure this out yet?

Please let me know.

Thanks

Link to comment
Share on other sites

I am now getting an error message when I try to do a rebuild category count Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 240 bytes) in /home/kissandc/public_html/classes/db/db.php on line 129 :)

Hi

I know this response was quite a few months ago but as I have just answered it in another thread, thought that I would give the same answer here as well. I dont know whether it is CubeCart using more memory for some of these functions or what.

The cause of this is the value of the PHP memory_limit parameter as set by your hosting company (32MB is the usual default). This is set globally for the server although a few hosting companies do allow you to change this for your own hosting account. If you arent allowed to change it yourself (you need to check with them) then it is very unlikely that they would change it globally across the server as it would then affect every hosted domain on the server. If you cant change it, then you will have to either do without that functionality or look for another hosting company that either has a higher server default limit or allows you to change it per domain - as we do !!

regards

Ian

Link to comment
Share on other sites

Unfortunately no I don't have the latest version, I can't because the server I'm on doesn't have the latest PHP version. I've been using Cubecart for a few years now and the problem came about today.

Cubecart 4.0.3 and PHP version 4.4.8, MySQL Version: 4.1.22-standard-log.

Are you able to tell me which file I need to update?reinstall? or fix (and how to fix it)?

I've also got a problem with a Sale Item having been deleted but is still appearing. The links on the item are not working and the image is not working.

You are most welcome to visit the site to check the problems - I'm not sure if they're related - I don't think so though.

The site is:

www.sachomewares.com.au

Thanks

Jannette

Jannette

If your current hosting company cannot provide a server with the latest php version on, then I would suggest that you seriously look to move. You are on such an old version of CubeCart that you are going to have lots of issues like this as well as known security issues and you are missing out on a lot of functionality upgrades as well. Trying to patch individual bugs like this may be possible but is likely to cause even more problems and be costly in terms of time and money.

Regards

Ian

Link to comment
Share on other sites

  • 1 year later...
Guest Westhouse IT

I am now getting an error message when I try to do a rebuild category count Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 240 bytes) in /home/kissandc/public_html/classes/db/db.php on line 129 :)

Hi

I know this response was quite a few months ago but as I have just answered it in another thread, thought that I would give the same answer here as well. I dont know whether it is CubeCart using more memory for some of these functions or what.

The cause of this is the value of the PHP memory_limit parameter as set by your hosting company (32MB is the usual default). This is set globally for the server although a few hosting companies do allow you to change this for your own hosting account. If you arent allowed to change it yourself (you need to check with them) then it is very unlikely that they would change it globally across the server as it would then affect every hosted domain on the server. If you cant change it, then you will have to either do without that functionality or look for another hosting company that either has a higher server default limit or allows you to change it per domain - as we do !!

regards

Ian

Thanks for that Ian. Those kind of limits are generally set to protect the servers from runaway scripts. There's no reason it should take anywhere near 32MB RAM to process the changes unless the page/queries are really badly written. My customer's store has only a few hundred products.

Unfortunately it seems the CC developers are not willing (unable?) to fix this.

Without even looking at the code it's most likely either a stuck loop, not unsetting variables, or not processing changes transactionally. The fact that MyISAM is used rather than InnoDB indicates that the team doesn't have a skilled DBA or database designer.

Since it's not a major issue for my customer I won't be paid to fix it, but if I have some free time I'll look into it and post my findings. In the meantime I'll see if I can open a bug about it.

Well, I had half an hour so I quickly had a look. And I've got a (temporary) fix. Turns out the app doesn't check for cat_id = cat_father_id, which causes an endless loop. How it allowed that in the first place I haven't looked into yet. But a quick solution is to look at the Cubecart_category table for any rows where cat_id = cat_father_id and change cat_father_id to 0. Really this should be coded into app. But I'm not doing it now, off to watch some tele. :-)

Link to comment
Share on other sites

  • 1 year later...

I'm getting this as well:


Error Message:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT `productId` FROM CubeCart_inventory WHERE `disa

SQL:

DELETE FROM CubeCart_cats_idx WHERE productId NOT IN (SELECT DISTINCT `productId` FROM CubeCart_inventory WHERE `disabled` = '0')

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...