Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    help question Delete Duplicate Items

    While importing via EZ Populate, I did not notice that my vendor changed the formats of the Categories and Sub Categories. Categories like:
    ANTENNA - ACCES ............ are now
    ANTENNA - ACCESSORIES

    and so on and so forth, I have about 3,000 duplicate items with the same ID and "Invalid Master Category"

    Is there an SQL script I can run to delete items in bulk from the invalid categories? Without Deleting them from the remaining categories?

    Not sure of the SQL syntax but I am guessing something like
    Delete * from Category 9
    Delete * from Category 11
    Delete * from Category 46

    Will something like this do it? And for the SA's that want to make a smart remark, YES I already searched, but may not be searching for the right keywords, and if I already had a clue, I would not be asking here.

    THANKS ALL
    JOhn ><>
    Newest Site: ChargerPros - Stuff4Toys

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Delete Duplicate Items

    What and where in the db is Invalid Master Category

    Did these also have attributes?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Default Re: Delete Duplicate Items

    Quote Originally Posted by kobra View Post
    What and where in the db is Invalid Master Category

    Did these also have attributes?
    I don't believe "Invalid Master Category" IS in the database, I believe it is a function of Zen-Cart. See attached screen shot.

    So what I really need to do is delete the duplicate items, if I can do it in bulk for each category instead of deleting 3,000 duplicates one at a time.
    Attached Images Attached Images  
    Newest Site: ChargerPros - Stuff4Toys

  4. #4
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Default Re: Delete Duplicate Items

    No Attributes
    Newest Site: ChargerPros - Stuff4Toys

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Delete Duplicate Items

    Did not answer where??
    Assuming it is the products table - - and "Invalid Master Category" is not present - What is shown in the "products_id" record for a duplicate one and are the dups all shown the same?

    Code:
      products_id int(11) NOT NULL auto_increment,
      products_type int(11) NOT NULL default '1',
      products_quantity float NOT NULL default '0',
      products_model varchar(32) default NULL,
      products_image varchar(64) default NULL,
      products_price decimal(15,4) NOT NULL default '0.0000',
      products_virtual tinyint(1) NOT NULL default '0',
      products_date_added datetime NOT NULL default '0001-01-01 00:00:00',
      products_last_modified datetime default NULL,
      products_date_available datetime default NULL,
      products_weight float NOT NULL default '0',
      products_status tinyint(1) NOT NULL default '0',
      products_tax_class_id int(11) NOT NULL default '0',
      manufacturers_id int(11) default NULL,
      products_ordered float NOT NULL default '0',
      products_quantity_order_min float NOT NULL default '1',
      products_quantity_order_units float NOT NULL default '1',
      products_priced_by_attribute tinyint(1) NOT NULL default '0',
      product_is_free tinyint(1) NOT NULL default '0',
      product_is_call tinyint(1) NOT NULL default '0',
      products_quantity_mixed tinyint(1) NOT NULL default '0',
      product_is_always_free_shipping tinyint(1) NOT NULL default '0',
      products_qty_box_status tinyint(1) NOT NULL default '1',
      products_quantity_order_max float NOT NULL default '0',
      products_sort_order int(11) NOT NULL default '0',
      products_discount_type tinyint(1) NOT NULL default '0',
      products_discount_type_from tinyint(1) NOT NULL default '0',
      products_price_sorter decimal(15,4) NOT NULL default '0.0000',
      master_categories_id int(11) NOT NULL default '0',
      products_mixed_discount_quantity tinyint(1) NOT NULL default '1',
      metatags_title_status tinyint(1) NOT NULL default '0',
      metatags_products_name_status tinyint(1) NOT NULL default '0',
      metatags_model_status tinyint(1) NOT NULL default '0',
      metatags_price_status tinyint(1) NOT NULL default '0',
      metatags_title_tagline_status tinyint(1) NOT NULL default '0',
      PRIMARY KEY  (products_id),
      KEY idx_products_date_added_zen (products_date_added),
      KEY idx_products_status_zen (products_status),
      KEY idx_products_date_available_zen (products_date_available),
      KEY idx_products_ordered_zen (products_ordered),
      KEY idx_products_model_zen (products_model),
      KEY idx_products_price_sorter_zen (products_price_sorter),
      KEY idx_master_categories_id_zen (master_categories_id),
      KEY idx_products_sort_order_zen (products_sort_order),
      KEY idx_manufacturers_id_zen (manufacturers_id)
    And it might be easiest to restore a DB backup just prior to the EP upload(you do take them - - correct??) and upload the correct update
    Zen-Venom Get Bitten

  6. #6
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Default Re: Delete Duplicate Items

    kobra, I have great respect for your years of knowledge and the help you provide people, BUT why are you beating this to death. Did you not look at the screen shot? Zen Cart IS causing the "Invalid Master Category ID" to show up in that pull down

    Do you think I am making this up?

    I have gone into the ANTENNA - ACCES category and clicked the delete icon, it lists the item and both categories, I uncheck the category that I want the item to remain in and click delete. It deletes the item. When I check the item in the good category, all seems well.

    The real problem is that there are categories with over 600 duplicate items and I would just like to delete all the items in the category one category at a time then delete the empty category. This cannot be all that difficult to do.
    Newest Site: ChargerPros - Stuff4Toys

 

 

Similar Threads

  1. v151 How can I delete duplicate imported products?
    By RiverCity in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Mar 2014, 07:30 PM
  2. Add/delete menu items
    By stefaaaan in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Apr 2009, 12:07 PM
  3. Catagory Sidebox - delete # of items
    By peppyone in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 31 Dec 2007, 05:15 PM
  4. how to delete old items?
    By rhettius in forum General Questions
    Replies: 1
    Last Post: 12 Nov 2007, 05:48 PM
  5. One delete button to delete all checked items from cart
    By gsdcypher in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Jul 2007, 04:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg