Показать сообщение отдельно
  #3 (permalink)  
Старый 12.07.2016, 15:08
Новичок на форуме
Отправить личное сообщение для zahod5277 Посмотреть профиль Найти все сообщения от zahod5277
 
Регистрация: 06.04.2014
Сообщений: 8

Все опции хранятся в JSON в базе данных вот так:
[{"X_id":"1","name":"","description":"","size":"","price":"1234","paint":"123","paint2":"0","canvas":"3900","nodecor":"0","mont1":"231","mont2":"123","print":"1234","mont3":"2344"},
{"X_id":"2","name":"","description":"","size":"40*60","price":"3000","paint":"400","paint2":"0","canvas":"44","nodecor":"0","mont1":"213","mont2":"312","print":"222","mont3":"2345"},
{"X_id":"3","name":"","description":"","size":"60*90","price":"5000","paint":"333","paint2":"0","canvas":"22","nodecor":"0","mont1":"123","mont2":"423","print":"500","mont3":"2523"},
{"X_id":"4","name":"","description":"","size":"100*150","price":"10000","paint":"333","paint2":"0","canvas":"553","nodecor":"566","mont1":"23","mont2":"324","print":"123","mont3":"52325"},
{"X_id":"5","name":"","description":"","paint":"223","paint2":"343","canvas":"77","nodecor":"777","mont1":"342","mont2":"324","print":"1234","mont3":"52523"}]


Где name и description это описание размера, а остальное - наценка за определенные опции, за краску, тип ткани и все такое.
Но связей зависимостей одной опции от другой нигде никак не указано, это просто известно и не меняется никогда.
Ответить с цитированием