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 Quote Link to comment 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. Quote Link to comment 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 ? Quote Link to comment 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". Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 2, 2007 Author Share Posted September 2, 2007 ??? no reply Quote Link to comment Share on other sites More sharing options...
fenway Posted September 4, 2007 Share Posted September 4, 2007 So make it with name/value pairs. Quote Link to comment 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 Quote Link to comment 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..... Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 yes sure Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 9, 2007 Author Share Posted September 9, 2007 OK I JUST HATE MODIFICATIONS Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.