Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Disposition, Content-Description
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Access-Control-Max-Age: 1000
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: keep-alive
Content-Type: text/html; charset=UTF-8
Date: Wed, 24 Apr 2019 12:28:00 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=60
location: http://thesushi.by/order/e79c9466da9537ecbe112d7cad922ce9
Pragma: no-cache
Server: nginx/1.14.2
Transfer-Encoding: chunked
X-Powered-By: PHP/5.6.30
function sendfronpad() {
var secret = '----'; //секрет авторизации
var product = [];
var product_kol = [];
{/literal}
{assign var="num" value="0"}
{foreach $purchases as $purchase}
product[{$num}] = '{$purchase->sku}'; //массив внешних кодов товаров
product_kol[{$num}] = '{$purchase->amount}'; //массив кол-ва товаров
{assign var="num" value=$num+1}
{/foreach}
var street = '{$address|escape}'; //адрес
var name = '{$name|escape}';
var mail = '{$email|escape}'; //mail
var phone = '{$phone|escape}'; //телефон
var descr = '{$comment|escape}{literal}'; //примечание
$.post("https://app.frontpad.ru/api/index.php?new_order", {
contentType: 'application/json',
crossDomain: true,
secret:secret,
'product[]':product,
'product_kol[]':product_kol,
street:street,
phone:phone,
descr:descr,
name:name,
mail:mail
});
}
Меняю только не выходит на JS я только пошёл учиться