foreach ($specials as $special) {
if (($special['date_start'] == $always && $special['date_end'] == $always)
|| ($special['date_start'] <= $date && $special['date_end'] >= $date)
) {
if ((isset($priority) && $priority > $special['priority'])
|| !isset($priority)) {
/* if (empty($customer['customer_group_id'])) {
continue;
} */
$customer['customer_group_id'] = 1; /* Убрал проверку и задал группу пользователя из БД таб. oc_customer */
$specialSetting = $this->settingsManager->getSetting('special_' . $customer['customer_group_id']);
if ($special['customer_group_id'] == $customer['customer_group_id'] && !empty($specialSetting)) {
$item['priceType']['code'] = 'open-pric';/* $specialSetting; */
$priority = $special['priority'];
}
}
}
if (isset($properties)) $item['properties'] = $properties;
$this->data['items'][] = $item;
}
}
}
return $this;
$products = $this->db->query("SELECT price FROM " . DB_PREFIX . "product_special");
foreach($products->rows as $raw){
var_dump($raw['price']);
}