$sql_add_where[] = "(v.instock>={
$this->sSettings
['instock_filter'
]} OR (v.instock IS NULL AND d.instock>={
$this->sSettings
['instock_filter'
]}))";
} if (!
empty($this->sSettings
['price_filter'
])) { if ($this->sCurrency === false
) { throw new RuntimeException('Currency could not be fetched correctly.'
);
} $sql_add_where[] = "ROUND(CAST(IFNULL(
$grouppricefield,
$pricefield)*(100+t.tax-IF(pd.discount IS NULL,0,pd.discount)-{
$this->sCustomergroup
['discount'
]})/100*{
$this->sCurrency
['factor'
]} AS DECIMAL(10,3)),2)>=" .
$this->sSettings
['price_filter'
];
} if (!
empty($this->sSettings
['own_filter'
]) &&
trim($this->sSettings
['own_filter'
])) { $sql_add_where[] = '(' .
$this->sSettings
['own_filter'
] . ')';
} if ($this->config->
offsetGet('hideNoInStock'
)) { $sql_add_where[] = '(
(a.laststock * v.instock >= a.laststock * v.minpurchase)
OR
(a.laststock * d.instock >= a.laststock * d.minpurchase)
)';
} $sql_add_join =
implode(' ',
$sql_add_join);
if (!
empty($sql_add_select)) { $sql_add_select = ', ' .
implode(', ',
$sql_add_select);
} else {