hell0men, в коде файла yandex_market.php вместо:
SELECT DISTINCT shop_items_catalog_table.*
FROM shop_items_catalog_table
INNER JOIN shop_groups_table
ON (shop_groups_table.shop_groups_id = shop_items_catalog_table.shop_groups_id
AND shop_groups_table.shop_groups_activity = 1)
OR shop_items_catalog_table.shop_groups_id = 0
WHERE shop_items_catalog_table.shop_items_catalog_shortcut_id = '0'
AND shop_items_catalog_table.shop_items_catalog_is_active = '1'
AND shop_items_catalog_table.shop_items_catalog_access IN(0,-1)
AND shop_items_catalog_table.shop_shops_id='{$shop_shops_id}'
AND (shop_items_catalog_table.shop_items_catalog_putend_date >= '{$current_date}'
OR shop_items_catalog_table.shop_items_catalog_putend_date ='0000-00-00 00:00:00')
AND shop_items_catalog_table.shop_items_catalog_putoff_date <= '{$current_date}'
AND shop_items_catalog_yandex_market_allow = '1'
ORDER BY shop_items_catalog_table.shop_items_catalog_order ASC,
shop_items_catalog_table.shop_items_catalog_name ASC
используйте:
SELECT DISTINCT shop_items_catalog_table.*, SUM(shop_warehouse_items_table.shop_warehouse_items_count) as `shop_items_catalog_rest`
FROM shop_items_catalog_table
LEFT JOIN shop_groups_table ON (shop_groups_table.shop_groups_id = shop_items_catalog_table.shop_groups_id AND shop_groups_table.shop_groups_activity = 1 )
OR shop_items_catalog_table.shop_groups_id = 0
LEFT JOIN shop_warehouse_items_table ON (shop_items_catalog_table.shop_items_catalog_item_id = shop_warehouse_items_table.shop_items_catalog_item_id)
WHERE shop_items_catalog_table.shop_items_catalog_shortcut_id = '0'
AND shop_items_catalog_table.shop_items_catalog_is_active = '1'
AND shop_items_catalog_table.shop_items_catalog_access IN(0,-1)
AND shop_items_catalog_table.shop_shops_id='{$shop_shops_id}'
AND (shop_items_catalog_table.shop_items_catalog_putend_date >= '{$current_date}'
OR shop_items_catalog_table.shop_items_catalog_putend_date ='0000-00-00 00:00:00')
AND shop_items_catalog_table.shop_items_catalog_putoff_date <= '{$current_date}'
AND shop_items_catalog_yandex_market_allow = '1'
GROUP BY shop_items_catalog_table.shop_items_catalog_item_id HAVING 1 AND `shop_items_catalog_rest` <= 0
ORDER BY shop_items_catalog_table.shop_items_catalog_order ASC,
shop_items_catalog_table.shop_items_catalog_name ASC
hell0men писал(а):
Кстати админка виснет при создании товаров в Chrome 10
- версия системы какая? Товар создается вручную или по средством импорта из файла?