BarneyJoe Posted March 2, 2007 Share Posted March 2, 2007 Hope someone can help with this. At the moment I have an online store all up and running that sells oriental rugs, but based on the assumption that each design is available at a single size and a single cost. The site has an admin section where the site owner can add new designs using a fairly simple insert form, filling in various details including size and cost, which adds a new record in a simple 'Carpets' table. What would be the best practice to add in the ability to specify different sizes, with different prices? I'm presuming I'm going to need at least one new table, ie split it out into Carpets and Carpet_Sizes perhaps? Carpets Carpet_ID Design_Ref etc Sizes Carpet_ID Size Price With a query Carpet_Sizes : Carpet_ID, Design_Ref, Size, Price 1, ABC1, 6x4, 599 1, ABC1, 2x3, 199 1, ABC1, 5x4, 399 2, ABC2, 6x4, 899 2, ABC2, 2x3, 599 3, ABC3, 5x4, 799 3, ABC3, 6x8, 999 What would be the easist way to allow the owner to add this info when adding new designs? Using checkboxes perhaps? Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/ Share on other sites More sharing options...
itsmeArry Posted March 2, 2007 Share Posted March 2, 2007 yup that will be the easiest thing to do Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/#findComment-197699 Share on other sites More sharing options...
BarneyJoe Posted March 2, 2007 Author Share Posted March 2, 2007 I'm kind of clear on the database structure, but less sure how to go about the page where the owner can add new designs. At the moment it's a single field for size and price - what would be the best way to go about entering different sizes and prices for each design? Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/#findComment-197705 Share on other sites More sharing options...
itsmeArry Posted March 2, 2007 Share Posted March 2, 2007 can you post the code which you are having right now... Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/#findComment-197709 Share on other sites More sharing options...
redarrow Posted March 2, 2007 Share Posted March 2, 2007 1.show us the database that the user insert's information to please that first? 2. show us the form you use to get the information to the database? exsplain what needed? Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/#findComment-197711 Share on other sites More sharing options...
BarneyJoe Posted March 2, 2007 Author Share Posted March 2, 2007 I'm away from the code at the moment, but will post later. But it's basically a single table, carpets : Carpet_ID (PK, Int) Carpet_Ref Description etc Price Size And the form is a basic, standard input form that adds a record to the carpets table with the values entered. What I want to be able to do is allow the user to specify different Sizes with different Prices of each carpet design. Link to comment https://forums.phpfreaks.com/topic/40835-adding-differenct-size-and-price-options-to-an-online-store-database/#findComment-197715 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.