February 3, 200322 yr I have the following situation and any help/advice would be appreciated. I have a simple product database and I'm creating an ordering table. Problem is this: I will have individual products available for ordering. But I'll also have groups of products available for ordering. I was thinking of creating a 'Packs' tables that had assigned a pack id and consisted of x number of products (via product_id). What I'm after is this: to be able to type in the product id or the pack id on the order page and the rest of the product details/pack details to be sucked through. So in a way I want to product id on the order page to check two different tables ('product' table and 'pack' table). Is this a simple case of making two relationships for the product id in the order table? If more explanation is needed please reply with the details you need. Thanks. Chris.
February 3, 200322 yr Here's how I would go about this. I'll give a general overview that hopefully will get you started. Put a field on your order, I'll call it addBundle, and put a button next to it. Every time you want to add a bundle of products to the order, enter the bundle number in the field and click the button. The system then adds the line items to the order, containing the products found in that bundle. The button would go to the related records (in bundles db), then loop through each item and add it to the line items for that order. This will involve several external scripts gong back and forth between the line items and bundles db's, and the orders db. Is that enough to get you started?
Create an account or sign in to comment