Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cleaning Up Database - Best Way


Mort-lemur

Recommended Posts

Posted

Hi,

 

Over the years my products database has seemed to gather lots (100s) of products that are either missing a title, a description, or both - is there an easy (and safe) way to clear these up?

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

do you mean to delete them ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted

do you mean to delete them ?

 

Yes, I could do it through phpmyadmin, but that would mean deleting from various products tables, but there must be an easier way...

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

a function to delete a product exists, but I'm not aware of any contribution that would list all products for deletion and delete them, should not be too hard to make a page for it.

 

I have a custom admin page that lists missing pictures with a link to edit and another to delete the product

the link to the admin page with the parameters should be like this snippet of php where $check_values is populated in the typical while loop construction to fetch the database results.

 

<a target="_cleanup" href="categories.php?cPath='.$check_values['categories_id'].'&pID=' . $check_values['products_id'] . '&action=delete_product">';

 

my code is not clean, very custom as it goes looking out on different vendor sites for missing pictures.

If you need more help, I could spend some time tomorrow to trim it down to the essentials for what you need.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted

@@bruyndoncx That is a good Idea - maybe I could alter my version of Product Monitor to achieve the same........http://addons.oscommerce.com/info/8341

 

If I get it working I will post an update...

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

@@bruyndoncx OK I amended product monitor to include a check for blank descriptions - seems to work ok, uploaded the new version here: http://addons.oscommerce.com/info/8341 screenshot below:

 

Many Thanks

post-253268-0-67418600-1390164614_thumb.png

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

I look at this monitor code, but I'm a bit puzzled.

It lists all products, I would expect it to list just the products that have issues.

I think it would be very slow on bigger sites, I'll give it a try to see.

 

I just looked a littel further in the code, using tep_not_null it also filters out empty strings, so in a way you need to fetch all records and make the comparison in php.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted

speed is ok, as it has pagination, but every product is listed for each language.

 

@@Mort-lemur

I just wonder how you use this products monitor

 

I would be inclined to add a category and/or manufacturers filter and an option to show most recent records first.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted

@@bruyndoncx I just use it as a simple check - I needed to mod it first time as It was a great aid in finding missing fields required for my google-base submissions, now I have added in the description column.

 

Fairly simple to use and alter - and is great for scanning what is missing - start on the last page (ie most recent)

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

I see it works well when you have your products data pretty much complete, in our case it is far from. That is why I need a category/manufacturer filter to systematically go through and fill out missing data ....

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Archived

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

×
×
  • Create New...