https://api.telegram.org/bot[ТОКЕН_БОТА]/sendMessage?chat_id=@[USERNAME_КАНАЛА]&text=тест
. После перехода по ссылке будет выведен id канала, сохрани его. https://api.telegram.org/bot[ТОКЕН_БОТА]/sendMessage?chat_id=@[ID_КАНАЛА]&text=тест.
$url = 'https://site.com';
$ch = curl_init($url);
$jsonData = array(
//...
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
$data = file_get_contents("php://input");
$requestBody = json_decode($data, true);
catalog/controller/common/header.php
if (isset($this->request->get['product_id'])){
$data['is_product_page'] = 'Страница продукта с ID - ' . $this->request->get['product_id'];
}
catalog/view/theme/default/template/common/header.(twig/tpl)
var customOptions = {
onKeyPress: function(val, e, field, options) {
if (val.replace(/\D/g, '').length===2)
{
val = val.replace('8','');
field.val(val);
}
field.mask("+7 (999) 999-99-99", options);
},
placeholder: "+7 (___) ___-__-__"
};
$("input[name='phone']").mask("+7 (999) 999-99-99", customOptions);
$.mask.definitions['~']='[78]';
$("[name=phone]").mask("~ (999) 999-9999");
name="test"
<form method="GET" action="путь к вашей странице">сюда кнопку и input</form>
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('test');
window.addEventListener("load", function() {
const el = document.querySelector("primer1");
el.innerText=myParam;
});
<link rel="stylesheet" type="text/css" href="/styles/product.css">
<link rel="stylesheet" type="text/css" href="/styles/product_responsive.css">
А если делаю ON DUBLICATE KEY UPDATE `pipeline_name` = '$pipelinename' ,
то записи дублируются