2022-12-24 21:12:23 +05:00
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
21.12.2022
|
|
|
|
Обновляем статус категории товара
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
$(".check-status").click(function(event){
|
|
|
|
var id=$(this).data("id");
|
|
|
|
if ($(this).is(':checked'))
|
|
|
|
var status = 1;
|
|
|
|
else
|
|
|
|
var status = 0;
|
2022-12-11 13:55:49 +05:00
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
2022-12-24 21:12:23 +05:00
|
|
|
url: '/act/a_tovar_cat',
|
|
|
|
data: "act=updateStatus&id=" + id + "&status=" + status
|
2022-12-11 13:55:49 +05:00
|
|
|
});
|
|
|
|
})
|
2022-12-24 21:12:23 +05:00
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
21.12.2022
|
|
|
|
Пишет настройку отображения не опубликованных товаров и категорий
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
$("#setShowNoPublic").click(function(event){
|
|
|
|
if ($(this).is(':checked'))
|
|
|
|
var status = 1;
|
|
|
|
else
|
|
|
|
var status = 0;
|
2022-12-11 13:55:49 +05:00
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: '/act/a_tovar_cat',
|
2022-12-24 21:12:23 +05:00
|
|
|
data: "act=setSettings&showNoPublic=showNoPublic&val=" + status
|
2022-12-11 13:55:49 +05:00
|
|
|
});
|
2023-01-02 21:33:36 +05:00
|
|
|
})
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
02.01.2023
|
|
|
|
Сохраняем мета-теги
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
$(".save-meta").keyup(function(event){
|
|
|
|
var id=$(this).data('id');
|
|
|
|
var txt=$(this).val();
|
|
|
|
var pole=$(this).data('pole');
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: '/act/a_tovar_cat',
|
|
|
|
data: "act=savemeta&id=" + id + "&pole=" + pole + "&txt=" + txt
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
02.01.2023
|
|
|
|
Сохраняем заголок категории
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
$(".save-title").keyup(function(event){
|
|
|
|
var id=$(this).data('id');
|
|
|
|
var txt=$(this).val();
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: '/act/a_tovar_cat',
|
|
|
|
data: "act=savetitle&id=" + id + "&txt=" + txt
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|