Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    170
    Plugin Contributions
    0

    Default Product Linking Via MySQL

    Hi All,

    In my auto parts ZC shop I currently have 450 products listed under categories such as 'Acura, Audi, Bentley, etc.' that allow the user to browse the products by auto type.

    I also have a set of categories such as 'Floor Mats, Grilles, Shades, etc.' that I would like to link the appropriate products to. However, using the admin area's Copy/Link function to update the settings for 450 products is going to be very tedious, so I am looking for a way to make this change via MySQL!

    It seems to me that I should be able to run an INSERT/UPDATE query that would assign the product_id's to the additional category_id's. In the 'products_to_categories' table it looks like there are only two columns, the product ID and master category ID - is there another place where I can link the product id's to another category ID (to replicate the product linking function)?

    My goal is to save time, hopefully there is a way to do so!

  2. #2
    Join Date
    Oct 2006
    Posts
    170
    Plugin Contributions
    0

    Default Re: Product Linking Via MySQL

    Also, I noticed in the Multiple Categories Link Manager, the other set of categories are not appearing in the list, and I'm afraid this is due to the current category structure:

    Browse Auto Type
    - Acura
    - Audi
    - BMW (and so on)


    Browse Product Type
    - Floor Mat
    - Auto Shade
    - Billet Grille (and so on)

    Is there a way to link products across categories like this? Or is my structure preventing this?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Product Linking Via MySQL

    The cross-linking is done via the products_to_categories table.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Can I run Backup MYSQL Plugin v1.4 via cron job?
    By Renz in forum General Questions
    Replies: 2
    Last Post: 23 Mar 2012, 06:25 AM
  2. Import Customers From CSV Via MySql?
    By suntower in forum Managing Customers and Orders
    Replies: 6
    Last Post: 15 Jun 2011, 06:54 AM
  3. Inserting Products manually via MySQL
    By NathanEvans in forum General Questions
    Replies: 2
    Last Post: 20 May 2008, 03:49 PM
  4. Replies: 2
    Last Post: 11 Dec 2007, 09:11 PM
  5. Sending a MySQL SET command via PHP from ZC code
    By nkostaki in forum General Questions
    Replies: 7
    Last Post: 26 Jul 2006, 08:05 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