seçenek kombinesi |
|||
Konuyu görüntüleyenler: 1 Misafir
|
|||
|
|||
|
|||
|
|||
bekircan
Acemi Üye Mesajlar: 2 Konular: 2 Katılma Tarihi: Dec 2013 Rep Puanı: 0 Teşekkürler: 0
0 Mesajına, 0 Teşekkür edildi. Kişisel Bilgileri:
Konu Tarihi: 11-26-2018 08:36 PM
Arkadaşlar merhaba bu oseçenek veri tablosu opencart belki biliyrsunuzdur CREATE TABLE `option` ( `option_id` int(11) NOT NULL, `type` varchar(32) COLLATE utf8_bin NOT NULL, `sort_order` int(3) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `option` (`option_id`, `type`, `sort_order`) VALUES (69, 'select', 0), (70, 'select', 1); -- -------------------------------------------------------- CREATE TABLE `option_description` ( `option_id` int(11) NOT NULL, `language_id` int(11) NOT NULL, `name` varchar(128) COLLATE utf8_bin NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `option_description` (`option_id`, `language_id`, `name`) VALUES (70, 1, 'Beden'), (69, 1, 'Renk'); -- -------------------------------------------------------- CREATE TABLE `option_value` ( `option_value_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `sort_order` int(3) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `option_value` (`option_value_id`, `option_id`, `sort_order`) VALUES (152, 69, 2), (151, 69, 1), (156, 70, 2), (155, 70, 1), (157, 70, 3), (158, 70, 4), (159, 70, 5); -- -------------------------------------------------------- CREATE TABLE `option_value_description` ( `option_value_id` int(11) NOT NULL, `language_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `name` varchar(128) COLLATE utf8_bin NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `option_value_description` (`option_value_id`, `language_id`, `option_id`, `name`) VALUES (158, 1, 70, '40'), (157, 1, 70, '38'), (156, 1, 70, '36'), (152, 1, 69, 'Mürdüm'), (155, 1, 70, '34'), (151, 1, 69, 'Siyah'), (159, 1, 70, '42'); bu ürünün secenek tablosu CREATE TABLE `product_option` ( `product_option_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `option_value` text COLLATE utf8_bin NOT NULL, `required` tinyint(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `product_option` (`product_option_id`, `product_id`, `option_id`, `option_value`, `required`) VALUES (20, 747, 70, '', 1), (19, 747, 69, '', 1); -- -------------------------------------------------------- CREATE TABLE `product_option_value` ( `product_option_value_id` int(11) NOT NULL, `product_option_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `option_value_id` int(11) NOT NULL, `quantity` int(3) NOT NULL, `subtract` tinyint(1) NOT NULL, `price` decimal(15,4) NOT NULL, `price_prefix` varchar(1) COLLATE utf8_bin NOT NULL, `doviz_kur` decimal(15,4) NOT NULL DEFAULT '0.0000', `doviz_cins` varchar(3) COLLATE utf8_bin NOT NULL DEFAULT '', `points` int(8) NOT NULL, `points_prefix` varchar(1) COLLATE utf8_bin NOT NULL, `weight` decimal(15,8) NOT NULL, `weight_prefix` varchar(1) COLLATE utf8_bin NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; INSERT INTO `product_option_value` (`product_option_value_id`, `product_option_id`, `product_id`, `option_id`, `option_value_id`, `quantity`, `subtract`, `price`, `price_prefix`, `doviz_kur`, `doviz_cins`, `points`, `points_prefix`, `weight`, `weight_prefix`) VALUES (48, 20, 747, 70, 156, 7, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (49, 20, 747, 70, 159, 15, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (47, 20, 747, 70, 155, 3, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (46, 19, 747, 69, 152, 30, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (45, 19, 747, 69, 151, 9, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (50, 20, 747, 70, 157, 6, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''), (51, 20, 747, 70, 158, 8, 1, '0.0000', '', '0.0000', '', 0, '', '0.00000000', ''); buda kombin CREATE TABLE `relatedoptions` ( `relatedoptions_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `quantity` int(4) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `relatedoptions` (`relatedoptions_id`, `product_id`, `quantity`) VALUES (8, 747, 2), (7, 747, 5), (6, 747, 3), (5, 747, 1), (9, 747, 4), (10, 747, 6), (11, 747, 8), (12, 747, 10); -- -------------------------------------------------------- CREATE TABLE `relatedoptions_option` ( `relatedoptions_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `option_value_id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `relatedoptions_option` (`relatedoptions_id`, `product_id`, `option_id`, `option_value_id`) VALUES (4, 1, 70, 154), (4, 1, 69, 153), (3, 1, 70, 154), (3, 1, 69, 152), (2, 1, 70, 155), (2, 1, 69, 151), (1, 1, 70, 154), (1, 1, 69, 151), (6, 747, 70, 156), (6, 747, 69, 151), (5, 747, 70, 155), (5, 747, 69, 151), (7, 747, 69, 151), (7, 747, 70, 159), (8, 747, 69, 152), (8, 747, 70, 155), (9, 747, 69, 152), (9, 747, 70, 156), (10, 747, 69, 152), (10, 747, 70, 157), (11, 747, 69, 152), (11, 747, 70, 158), (12, 747, 69, 152), (12, 747, 70, 159); çıktısını [quantity] => 5 [attributes] => Array ( [attribute] => Array ( [0] => Array ( [name] => Renk [value] => Siyah ) [1] => Array ( [name] => Beden [value] => 36 ) ) ) gibi çıktı vermem gerek yani quantity ve secenek verilerini relatedoptions tablosundan almam gerekiyor yarımcı olacak arkadas varmı teşekkürler |
|
|
|
|
Direk Link | |
HTML Link | |
BBCode Link | |
Sosyal Paylaş |
Benzeyen Konular | |||||
Konu: | Yazar | Cevaplar: | Gösterim: | Son Mesaj | |
Ürün secenek kısmındaki ağırlık ve puan kısmı na metin yazma | muglali20 | 7 | 1,902 |
01-22-2019 05:42 PM Son Mesaj: ibrahim_130 |
|
Ürün Düzenleme Sayfasında Seçenek Düzenleme | eno-7 | 0 | 2,027 |
06-19-2013 10:41 AM Son Mesaj: eno-7 |
|
Toplu seçenek modülü? | sabrican | 0 | 2,837 |
03-29-2013 11:17 PM Son Mesaj: sabrican |