Внесу свои 5 копеек
Задача сделать так что бы весь товар выгружался в ЯМ, но у товара которого нет в наличии стоял статус available=false за основу взят файл
https://opencartforum.com/topic/2426-%d1%8f%d0%bd%d0%b4%d0%b5%d0%ba%d1%81-%d0%bc%d0%b0%d1%80%d0%ba%d0%b5%d1%82-%d0%bd%d0%b5%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d1%8c%d0%bd%d0%be%d0%b5-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5/page__view__findpost__p__16434
строки 52-55
$query = $this->db->query("SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, ss.name AS stock, wcd.unit AS weight_class FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN " . DB_PREFIX . "stock_status ss ON (p.stock_status_id = ss.stock_status_id) LEFT JOIN " . DB_PREFIX . "weight_class_description wcd ON (p.weight_class_id = wcd.weight_class_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND ss.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.date_available <= NOW() AND p.status = '1' AND p.quantity > 0");
foreach ($query->rows as $product) {
$output .= '<offer id="' . $product['product_id'] . '" available="true">' . $eof;
меняем на
$products = $this->model_catalog_product->getProducts();
foreach ($products as $product) {
if ($product['quantity'] > 0) {
$output .= '<offer id="' . $product['product_id'] . '" available="true">' . $eof;
} else {
$output .= '<offer id="' . $product['product_id'] . '" available="false">' . $eof;
}проверяем