isaac_cm Posted August 30, 2007 Share Posted August 30, 2007 Hello, I have to in my site related product options size and available colors , I destined my admin panel so I can enter all attributes once ex: A) options --------- 10 - Red 10 - Blue 10 - White 12 - Red 12 - Blue 14 - White then select from previous options to assign to some product , the problem that is that way correct or I have to make the options unrelated like that B) options --------- 10 12 14 Red Blue White then when I select option I use "UNION SELECT" to combine the options together to get the result like options (B) , if I have to use this pattern I will need advice on the SQL I should use also if I virtually combine all the options how I prevent the user from deleting option "10" (B) because there is a product has this size like that "10 - Blue" assigned to it I need to make the options related so only available color appear to specific size Thanks Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/ Share on other sites More sharing options...
fenway Posted August 30, 2007 Share Posted August 30, 2007 Have 3 tables -- list of options, list of sizes, links between them. Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-338014 Share on other sites More sharing options...
isaac_cm Posted August 31, 2007 Author Share Posted August 31, 2007 Thanks but I want more generic way I dont want to make a table for size I want to give the ability to define whatever options, every option values and the relation between every option (parent/child) for example: table "options" ------------- size color style table "option_values" -------------------- 10 12 14 Red Blue Green table "product_options" ------------------------ size coloe (child of ) size Any idea ? Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-338510 Share on other sites More sharing options...
fenway Posted August 31, 2007 Share Posted August 31, 2007 I'm not sure I understand what you mean by "more generic". Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-338844 Share on other sites More sharing options...
isaac_cm Posted August 31, 2007 Author Share Posted August 31, 2007 I mean I dont want to create table and name it "size" I want my CMS to be more flexible and accept any options (size, color, style, etc...) Thanks Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-338948 Share on other sites More sharing options...
isaac_cm Posted September 2, 2007 Author Share Posted September 2, 2007 ??? no reply Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-339762 Share on other sites More sharing options...
fenway Posted September 4, 2007 Share Posted September 4, 2007 So make it with name/value pairs. Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-341539 Share on other sites More sharing options...
isaac_cm Posted September 4, 2007 Author Share Posted September 4, 2007 I did that , but the problem is I saw some CMS software admin panel and they handle options in a very complex way they first store every unique options and then the result options generated is a multiplication of all possible options , so do you think they are right ? but most of CMS uses the options independent of each others Thanks Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-341647 Share on other sites More sharing options...
schme16 Posted September 6, 2007 Share Posted September 6, 2007 Altering a pre-made CMS is difficult and annoying..... Often its simply easier to switch to one that offers support for your needs, or to build one for yourself..... Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-342619 Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 yes sure Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-343368 Share on other sites More sharing options...
fenway Posted September 8, 2007 Share Posted September 8, 2007 I did that , but the problem is I saw some CMS software admin panel and they handle options in a very complex way they first store every unique options and then the result options generated is a multiplication of all possible options , so do you think they are right ? but most of CMS uses the options independent of each others Thanks So What? Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-344449 Share on other sites More sharing options...
isaac_cm Posted September 9, 2007 Author Share Posted September 9, 2007 I was just asking about the more logic way to do it, I want to build CMS that can suit any one not just one customer Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-344510 Share on other sites More sharing options...
fenway Posted September 9, 2007 Share Posted September 9, 2007 I was just asking about the more logic way to do it, I want to build CMS that can suit any one not just one customer No such thing. Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-344561 Share on other sites More sharing options...
isaac_cm Posted September 9, 2007 Author Share Posted September 9, 2007 OK I JUST HATE MODIFICATIONS Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-344698 Share on other sites More sharing options...
fenway Posted September 9, 2007 Share Posted September 9, 2007 OK I JUST HATE MODIFICATIONS Agreed... that's why I write everything from scratch. Link to comment https://forums.phpfreaks.com/topic/67271-which-way-is-correct/#findComment-344746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.