<name>Беговая дорожка детская DFC VT-2301</name>
<vendorCode>VT-2301</vendorCode>
<brand>DFC</brand>
<attachments>
<value>url/index.php?dispatch=attachments.getfile&attachment_id=970</value>
</attachments>
<features>
<feature>
<name>Дисплей</name>
<value>4 х 4,5 см, монохромный LCD</value>
</feature>
<feature>
<name>Размер стола</name>
<value>67 х 53,5 х 78 см</value>
</feature>
<feature>
<name>Размер упаковки</name>
<value>53 х 18,5 х 75 см</value>
</feature>
<feature>
<name>Вес упаковки</name>
<value>10,88 кг</value>
</feature>
<feature>
<name>Вес</name>
<value>9,48 кг</value>
</feature>
<feature>
<name>Гарантия</name>
<value>12 месяцев</value>
</feature>
<feature>
<name>Страна производства</name>
<value>Китай</value>
</feature></features>preg_match_all('#<feature>(?:(?!</feature>).)*?<name>(.*?)</name>#is',$xml,$matches);$('#myLink').click(function(event) {
event.preventDefault();$('.checkbox').change(function(){
var data = [];
if (!this.checked) {
data.push( $(this).attr('name'));
$('#'+ data).html('');
} else if( $(this).is(':checked') ){
data.push( $(this).attr('name'));
$.ajax({
url: '/out.php',
type: 'GET',
data: data,
success: function(html) {
$('#'+ data).html(html);
}
});
}
}); product (
`product_id` int(11) NOT NULL,
`model` varchar(64) NOT NULL,
`sku` varchar(64) NOT NULL,
`upc` varchar(12) NOT NULL,
`ean` varchar(14) NOT NULL,
`jan` varchar(13) NOT NULL,
`isbn` varchar(17) NOT NULL,
`mpn` varchar(64) NOT NULL,
`location` varchar(128) NOT NULL,
`quantity` int(4) NOT NULL DEFAULT 0,
`stock_status_id` int(11) NOT NULL,
`image` varchar(255) DEFAULT NULL,
`manufacturer_id` int(11) NOT NULL,
`shipping` tinyint(1) NOT NULL DEFAULT 1,
`price` decimal(15,4) NOT NULL DEFAULT 0.0000,
`points` int(8) NOT NULL DEFAULT 0,
`tax_class_id` int(11) NOT NULL,
`date_available` date NOT NULL DEFAULT '0000-00-00',
`weight` decimal(15,3) NOT NULL DEFAULT 0.000,
`weight_class_id` int(11) NOT NULL DEFAULT 0,
`length` decimal(15,8) NOT NULL DEFAULT 0.00000000,
`width` decimal(15,8) NOT NULL DEFAULT 0.00000000,
`height` decimal(15,8) NOT NULL DEFAULT 0.00000000,
`length_class_id` int(11) NOT NULL DEFAULT 0,
`subtract` tinyint(1) NOT NULL DEFAULT 1,
`minimum` int(11) NOT NULL DEFAULT 1,
`sort_order` int(11) NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`viewed` int(5) NOT NULL DEFAULT 0,
`noindex` tinyint(1) NOT NULL DEFAULT 1,
`date_added` datetime NOT NULL,
`date_modified` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8По-хорошему, еще должна быть таблица на единицы измерения
Будет двойные накладные расходы.
product_id attribute_id text
1 10 200
2 10 230
3 10 200
1 12 80
2 12 80
3 12 80
1 15 15
2 15 13
3 15 15
1 80 Сони
2 80 Сони
3 80 Сони
1 90 66
2 90 60
3 90 71(БЕЗ ВСЯКОГО GET)
SELECT DISTINCT
p.text,
wdt.text wdt,
hgt.text hgt,
dia.text dia
FROM " . DB_PREFIX . "product_attribute p
JOIN " . DB_PREFIX . "product_attribute wdt ON p.product_id = wdt.product_id
JOIN " . DB_PREFIX . "product_attribute hgt ON p.product_id = hgt.product_id
JOIN " . DB_PREFIX . "product_attribute dia ON p.product_id = dia.product_id
WHERE p.attribute_id = '80' and wdt.text = '70' and hgt.text = '230' and dia.text = '15'