Items Sold vQmod
1.1
2.X
Getsoftware
db->query("SELECT IFNULL(SUM(op.quantity), 1) AS total FROM `" . DB_PREFIX . "order_product` op LEFT JOIN `" . DB_PREFIX . "order` o ON (op.order_id = o.order_id) WHERE o.order_status_id > '0' AND op.product_id = '" . (int)$product_id . "'");
if ($query->row) {
return $query->row['total'];
}
}
]]>
load->model('catalog/review');
]]>
language->get('text_units_sold');
$data['units_sold'] = $this->model_catalog_product->getUnitsSold($product_id);
]]>
{{ text_stock }} {{ stock }}
]]>
{{ text_units_sold }} {{ units_sold }}
]]>