public function getProductDiscounts($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND quantity > 1 AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity ASC, priority ASC, price ASC");
return $query->rows;
}
{% if discounts %}
<!-- <h5 class="heading"><span>{{ text_new_discount }}</span></h5> -->
<div class="product-page__discount">
{% for discount in discounts %}
<div class="product-page__discount-item">{{ discount.quantity }} {{ text_discount }} — {{ discount.price }}</div>
{% endfor %}
</div>
{% endif %}
window.onload = function() {
s = document.body.innerHTML;
let regularBadWordsArray = [
'слово-1',
'слово-2'
];
for (let i = 0; i < regularBadWordsArray.length; i++) {
let regularBadWord = new RegExp(
'\\B' + '[а-яА-Я]*' + regularBadWordsArray[i] + '[а-яА-Я]*' + '\\B',
'gi'
);
// Первый и последний симолы
let rbwFirstLetter = s.match(regularBadWord);
let rbwLastLetter = regularBadWord[-1];
s = s.replace(regularBadWord, m => '*'.repeat(m.length) );
console.log(rbwFirstLetter);
console.log(rbwLastLetter);
}
document.body.innerHTML=s;
};
.env в корне сайта
и
/config/database.js
Но в них нет нужных значений.
Вот содержимое второго файла:
Вот .env :
Насколько я понимаю, этого недостаточно для соединения.