<script>
document.addEventListener('click', function(e) {
$('#option_'+<?php echo $pr; ?>+' option:selected, #option_'+<?php echo $pr; ?>+' input:checked').each(function() {
if (e.target.type === 'radio' ) {
e.target.closest('.capt').querySelector('.bl').textContent = $(this).attr('data-pr');
}
})
}
);</script>
document.addEventListener('click', function(e) {
var el = document.querySelector('#text-<?php echo $peremennaya; ?>');
if (e.target.type === 'radio' ) {
e.target.closest('.capt').querySelector('.bl').textContent = el.dataset.newtext;
}
});
<select name="seller[categ][]" multiple>
<?php foreach ($categories as $category) { ?>
<option value="seller[categ][<?php echo $category['category_id']; ?>]"><?php echo $category['name']; ?></option>
<?php } ?>
</select>
$sql = "UPDATE " . DB_PREFIX . "ms_seller
SET description = '" . $this->db->escape($data['description']) . "',
company = '" . $this->db->escape($data['company']) . "',
adress = '" . $this->db->escape($data['adress']) . "',
sites = '" . $this->db->escape($data['sites']) . "',
datas = '" . $this->db->escape($data['datas']) . "',
ports = '" . $this->db->escape($data['ports']) . "',
rubrs = '" . $this->db->escape($data['rubrs']) . "',
categ = '".implode(",", $data['categ'])."',
nickname = '" . $this->db->escape($data['nickname']) . "',
country_id = " . (int)$data['country'] . ",
zone_id = " . (int)$data['zone'] . ","
. (isset($data['status']) ? "seller_status= " . (int)$data['status'] . "," : '')
. (isset($data['approved']) ? "seller_approved= " . (int)$data['approved'] . "," : '')
. "paypal = '" . $this->db->escape($data['paypal']) . "',
banner = '" . $this->db->escape($banner) . "',
avatar = '" . $this->db->escape($avatar) . "'
WHERE seller_id = " . (int)$seller_id;
$this->db->query($sql);
public function escape($value) {
return $this->link->real_escape_string($value);
}
$sel = mysql_query("SELECT * FROM `oc_ms_product`, `oc_ms_seller` WHERE oc_ms_product.product_id IN (" . implode(',', $productId) . ") AND oc_ms_seller.categ = $cat_id" , $link);
if(!$sel)die("Ответ от базы не получен2");
while ($resul = mysql_fetch_array($sel)) {
$selId[] = $resul['seller_id'];
// echo $resul['seller_id'] . '<br>';
}
$('.close').click(function(){
$(".success").hide(200);// время закрытия 0,2 секунды. Можно изменить
});
в файл js сразу после $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
и все работает. Большое спасибо за помощь!