I want, in the latest module to be able to show only the products that don't have special price!
in model/catalog/product.php
I have modified getLatestProducts()
function from
foreach ($query->rows as $result) {
$product_data[$result['product_id']] = $this->getProduct($result['product_id']);
}
with
foreach ($query->rows as $result) {
$queryCheckSpecial = $this->db->query("SELECT product_id FROM ". DB_PREFIX ."product_special WHERE product_id =".$result['product_id']);
if (!$queryCheckSpecial->row){
$product_data[$result['product_id']] = $this->getProduct($result['product_id']);
}else{
continue;
}
}
but it's not working! What I'm doing wrong? any help will be apreciated!