Jump to content

which way is correct


isaac_cm

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.