Latest News: (loading..)
azer

Database Check Tool

34 posts in this topic

http://addons.oscommerce.com/info/5962

 

This contribution will check your database for duplicate product names, products price $0, products no weight, duplicate products_to_categories, categories no products and more. Results have clickable buttons and links to delete records or edit them through categories.php in admin. Minimum file editing for easy install. Please see the readme file for installation instructions and additional notes. Enjoy! :)

 

 

it s defintly a usefull report tools since you can monitor some important catalog problems within our site

 

let's share and improve this tool

 

thanks to geoffreywalton and ohioman

Share this post


Link to post
Share on other sites

I will do here a list of improvement i think we could work out :

 

REQ : Being able to update or change directly in the listing the field like with the contribution quick price update

BUG : Products with duplicate titles

i dont know why but i got several time the same product with the same model numer (id) so it s not a duplicate

 

like here :

 

70 1000-90-50 D-Squared2 - Chemise à M. L. - Multi 2006-03-05 20:55:04 D-Squared2 Click to delete record

71 1000-90-49 D-Squared2 - Chemise à M. L. - Multi 2006-03-05 20:55:05 D-Squared2 Click to delete record

70 1000-90-50 D-Squared2 - Chemise à M. L. - Multi 2006-03-05 20:55:04 D-Squared2 Click to delete record

71 1000-90-49 D-Squared2 - Chemise à M. L. - Multi 2006-03-05 20:55:05 D-Squared2 Click to delete record

Share this post


Link to post
Share on other sites

Hello thanks for your contribution is very good.

 

But such a module is missing here that would make the order in my database if it can be embedded in it?

After removing the old card I have free product number in the database which is bypassed and add new card numbers, whether it is possible to add these new products of deleted numbers

Share this post


Link to post
Share on other sites

Release 1.5 sorts above.

 

HTH

 

G

Share this post


Link to post
Share on other sites

Hi,

 

a really usefull contrib. Thank you very much.

 

Is it possible to ignore title-duplicates in different languages?

 

Thank you

Ollie

Share this post


Link to post
Share on other sites

@@geoffreywalton

 

In the latest version I just noticed that there was a language define error and the manufacturers name title is not shown correctly. Maybe the package needs updating.

 

In the langauge file there is

 

define('HEADING_ACTION_MANUFACTURERS_NAME', 'Manufacturer');

 

but in the includes/function/dbcheck.php there 5 instances of

 

<td align="center" class="dataTableHeadingRow"><?php echo HEADING_ACTION_MANUFACTURER;?></td>

 

I changed the above to

 

<td align="center" class="dataTableHeadingRow"><?php echo HEADING_ACTION_MANUFACTURERS_NAME;?></td>

 

which matches the define in the language file.

 

 

By the way this is a gret addon and very helpfull. Thanks

Share this post


Link to post
Share on other sites

define('HEADING_ACTION_MANUFACTURERS_NAME', 'Manufacturer');

Thanks for pointing that out.

 

I change the above to agree with the 5 so it now reads

 

define('HEADING_ACTION_MANUFACTURER', 'Manufacturer');

 

Version 1.7 uploaded.

 

Cheers

 

G

Share this post


Link to post
Share on other sites

@@geoffreywalton Great mod - thanks for uploading and supporting.

 

You mention in the install instructions that suggestions for expansion are gratefully accepted, well to make this tool a complete database check / cleaning tool it would be nice to see the following database features:

 

1) ability to identify and delete inactive customers - ones who have not visited the shop in a set period of time - time period selectable

2) ability to identify and delete orders at pending status over a certain age

3) ability to check integrity of orders - that all the data fields are filled as they should be (sometimes orders become corrupted especially after editing)

4) ability to clear sessions

 

Just some suggestions.........

Share this post


Link to post
Share on other sites

Thanks for coming up with suggestions.

 

The add-on is really to identify and repair inconsistent data rather than housekeeping.

 

1) ability to identify and delete inactive customers - ones who have not visited the shop in a set period of time - time period selectable

2) ability to identify and delete orders at pending status over a certain age

4) ability to clear sessions

1, 2 & 4 look like housekeeping and I am pretty sure I put clearing session in the db clear add-on.

 

3) ability to check integrity of orders - that all the data fields are filled as they should be (sometimes orders become corrupted especially after editing)

This one looks like fun, There are an awful lot of possible corruptions covered by "that all the data fields are filled as they should be".

 

If you are editing the db directly there are a multitude of possible errors you can make but if you are editng orders via a script/program if it corrupts an order then it would be better to corect that script rather than write a new one.

 

Cheers

 

G

Share this post


Link to post
Share on other sites

Hello,

 

I use this addon for version 2.3.4.  I have over 5000 products with duplicate names. It's tedious to delete them one by one so what's the SQL syntax to accomplish the same task in phpmyadmin?

 

Thanks in advance. 

Share this post


Link to post
Share on other sites

@@geoffreywalton

 

My shop version is 2.3.4 BS. I was trying to delete over 5000 occurrences of duplicate product names. It would be tedious to delete them one by one. Can you suggest an SQL statement that will find and list duplicate product names in phpmyadmin that will accomplish this?

 

Thanks for your time and assistance

Share this post


Link to post
Share on other sites

Google

 

mysql how to delete duplicates

 

There are several solutions there.

 

HTH

 

G

Share this post


Link to post
Share on other sites

I have just found that I have several products that have identical model numbers.

 

Using

SELECT products_model, COUNT(*) as count
FROM products
GROUP BY products_model
HAVING COUNT(*) > 1
 
I have found the matching products and model number in the database..
 
It may be good to add something like this in this module to improve it further. I have looked at the code in admin/includes/functions/dbcheck.php but I got lost straight away and adding it in is beyond my skills.
 
Others may benefit from having it added.

Share this post


Link to post
Share on other sites

@@Steve, I think there are instances where some store may have duplicated products_model number. For example, a product model would have multiple colors and since there wasn't a sku field so we had treated the products_id as the sku. Well, I haven't checkout the new product variant, but it may solve that problem. We had our own PV hack to simplify things...

 

So may be this isn't something that would be beneficial in the dbcheck.php...now, if you know for sure that you don't want duplicate products_model and this would be a more proactive approach...

 

              CREATE UNIQUE INDEX id_prod_model_uindex ON products(products_model) USING BTREE;

 

To remove unique index...

 

              DROP INDEX id_prod_model_uindex ON products;

 

Oh, you should also drop any existing product model index...to show products indexes...

 

              SHOW INDEX FROM products;

 

Remove index for products_model...

 

              DROP INDEX idx_products_model ON products;

 

then you can build the unique index to prevent duplicate products model...

Share this post


Link to post
Share on other sites

I thought I would just mention something as it may be something that others could find useful and beneficial. The code though was a bit above me.

 

I found my duplicates by working in the database and altered some so there were none. I am also looking into finding a bit of code or something that will check for duplicates when entering the model number in all new products, but that will happen when I get round to updating my store in the very near future.

Share this post


Link to post
Share on other sites

@@14steve14...I get you it's good to be helpful...good karma.

 

https://github.com/clustersolutions/osc-database-check-tool/commit/b21af47c598eb2a336b1472bbd833c2724a72c79

 

U can apply the changes I made to v1.8 form the commit above. I don't use this tool as I try to be proactive about things...about the unique index...it may be problematic for the non-technical as things are not transactional in OSC and no rollbacks so it can break some logic...

 

LMK if there are bugs...

Edited by clustersolutions

Share this post


Link to post
Share on other sites

@@clustersolutions

 

Whilst I was not implying that something should be done straight away, many thanks for that. Looking at the code you added I would have certainly messed it up, but seeing what you have done has helped me understand it a bit better. Again thanks

Share this post


Link to post
Share on other sites

@@geoffreywalton

Hi Geoff

 

Just installed this addon on our latest site. Did have it on an older version of BS. Having a wee problem, and I think I've had it before.

When I click start I get taken back to the admin login panel, I login go to the Check Tool click start and back to Login again.

I can't recall how it was fixed last time can you please advise.

 

Many thanks

Grandpa

Share this post


Link to post
Share on other sites

Sorry as I wasn't involved in fixing the original problem when you first had it I am afraid I don't know what you did.

 

Are you installing it on a "supported" version?

 

Cheers

 

G

Share this post


Link to post
Share on other sites

Hello!

 

Nice tool! How can I make it recognice the fonts used in other tools?

 

Regards

 

Andreas

Share this post


Link to post
Share on other sites

andreas

 

What do you mean by

 

the fonts used in other tools?
 

 

Cheers

 

G

Share this post


Link to post
Share on other sites

andreas

 

What do you mean by

 

 

 

Cheers

 

G

I just mean the general layout of the admin site. I played around a bit within the database_check.php and found there is heavy use of stylesheet.css. I don't rememeber exactly but difining some own tags in stylesheet.css and redifining them in the database_check.php had

no effect.

 

I have attached two screenshots.

 

Regards

 

Andreas

post-196121-0-38683200-1442181985_thumb.png

post-196121-0-44812800-1442181997_thumb.png

Share this post


Link to post
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