chrisg101 Posted February 3, 2003 Posted February 3, 2003 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.
jasonwood Posted February 3, 2003 Posted February 3, 2003 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?
chrisg101 Posted February 3, 2003 Author Posted February 3, 2003 Yep. That sounds like a usable solution. Thanks. Chris.
Recommended Posts
This topic is 8310 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now