sankovskiy
Создатель
- Регистрация
- 4 Мар 2016
- Сообщения
- 29
- Реакции
- 0
у базы 2016 2q есть таблица SUPPLIER_LOGOS ? , если есть можете поделиться?
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?php if(!defined("TDM_PROLOG_INCLUDED") || TDM_PROLOG_INCLUDED!==true)die();
$ApiKey = '8Fx6M9jhFT5GutTgrW7-_C6l9Iqd8x6Kkjw3xuwl_pQVylXQpmyyaCNbnarZhquFHSD3eYOy_tuNMPL4W2dC3HDf92N8sBxGApVyPnSzUPB2SMkl01eflDkaUCzrnLUyFEjPUQ2Gl021723kWLmlRJgW2GnyDVzoGzTEAitngQzHrMFJJG48OfTzdbALUZHnCruFKSMfTZVxLXtIz4gEt-yYI_3bBpZawQYMcsIY3Zq410Tl-tdu_fE4End-ykmA-1Q-Fnratp9HUpaQSi9ywqMdyYuGg9BRpv7OfYyMc-MrqANWrdRbbLgjQ0v6QO7-ZpfxYKDk8esoBdJKNsRVxcUGBePJJahTmZAL4GNAUO4v6WB1a4UFPB4iBl2LweXz_B-hYpWG6dZFpZcWA9bIm9veN9RsHmOAihtgLDeVof94Jym8eDF_UFfN0czbNTdVME7AHXT2DSrzS-AZeQjHjSqN0k_AlA50tP2-kc3GmdHXE2RME9hXNTVOhBKv1PBH';
$ch1 = curl_init();
$fields = array("JSONparameter" => "{'Article': '554092'}");
curl_setopt($ch1, CURLOPT_URL, "api.tmparts.ru/api/ArticleBrandList?".http_build_query($fields));
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
$headers = array(
'Authorization: Bearer '.$ApiKey //$ApiKey находится в файле 'ApiKey.txt'
);
curl_setopt($ch1, CURLOPT_HTTPHEADER, $headers);
$Art_List = json_decode(curl_exec($ch1),true);
foreach($Art_List[BrandList] as $key1 => $brand)
{
$fields = array("JSONparameter" => "{'Brand': '".$brand[BrandName]."', 'Article': '".$Art_List[Article]."', 'is_main_warehouse':'0' }" ); //Параметр для Апи запроса в формате JSON. Например: {'Brand': 'Monroe', 'Article': 'd5471', 'is_main_warehouse': 0 }
curl_setopt($ch1, CURLOPT_URL, "api.tmparts.ru/api/StockByArticle?".http_build_query($fields));
$Art_List_With_Prices = json_decode(curl_exec($ch1),true);
foreach($arWsParts as $arPart){
foreach($Art_List_With_Prices as $key2 => $value2){
//echo print_r ($value2[warehouse_offers]);
foreach($value2[warehouse_offers] as $key3 => $value3) {
echo ''.$brand[BrandName].'</br>';
//Make valid Price array
$arPrice = TDMPriceArray();
//$arPrice["LINK_TO_BKEY"] = $arPart['BKEY']; //If links (cross) number returned
//$arPrice["LINK_TO_AKEY"] = $arPart['AKEY']; //If links (cross) number returned
//Webservice data
$arPrice["ARTICLE"] = '554092';
$arPrice["ALT_NAME"] = (string)$value3[BrandName];
$arPrice["BRAND"] = $brand[BrandName];
$arPrice["PRICE"] = (float)$value3[price];
$arPrice["CURRENCY"] = 'RUB';
$arPrice["delivery_period"] = $value3[branch_name];
$arPrice["AVAILABLE"] = $value3[quantity];
$arPrice["STOCK"] = $value2[warehouse_offers];
$arPrice["OPTIONS"] = TDMOptionsImplode($arOps,$arPrice);
//Add new record
$arPrices[] = $arPrice;
}
}
}//foreach
}
curl_close($ch1);
?>
<?php if(!defined("TDM_PROLOG_INCLUDED") || TDM_PROLOG_INCLUDED!==true)die();
$ApiKey = '8Fx6M9jhFT5GutTgrW7-_C6l9Iqd8x6Kkjw3xuwl_pQVylXQpmyyaCNbnarZhquFHSD3eYOy_tuNMPL4W2dC3HDf92N8sBxGApVyPnSzUPB2SMkl01eflDkaUCzrnLUyFEjPUQ2Gl021723kWLmlRJgW2GnyDVzoGzTEAitngQzHrMFJJG48OfTzdbALUZHnCruFKSMfTZVxLXtIz4gEt-yYI_3bBpZawQYMcsIY3Zq410Tl-tdu_fE4End-ykmA-1Q-Fnratp9HUpaQSi9ywqMdyYuGg9BRpv7OfYyMc-MrqANWrdRbbLgjQ0v6QO7-ZpfxYKDk8esoBdJKNsRVxcUGBePJJahTmZAL4GNAUO4v6WB1a4UFPB4iBl2LweXz_B-hYpWG6dZFpZcWA9bIm9veN9RsHmOAihtgLDeVof94Jym8eDF_UFfN0czbNTdVME7AHXT2DSrzS-AZeQjHjSqN0k_AlA50tP2-kc3GmdHXE2RME9hXNTVOhBKv1PBH';
$ch1 = curl_init();
$fields = array("JSONparameter" => "{'Article': '".$arPart['ARTICLE']."'}");
curl_setopt($ch1, CURLOPT_URL, "api.tmparts.ru/api/ArticleBrandList?".http_build_query($fields));
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
$headers = array(
'Authorization: Bearer '.$ApiKey //$ApiKey находится в файле 'ApiKey.txt'
);
curl_setopt($ch1, CURLOPT_HTTPHEADER, $headers);
$Art_List = json_decode(curl_exec($ch1),true);
foreach($Art_List[BrandList] as $key1 => $brand)
{
$fields = array("JSONparameter" => "{'Brand': '".$brand[BrandName]."', 'Article': '".$Art_List[Article]."', 'is_main_warehouse':'0' }" ); //Параметр для Апи запроса в формате JSON. Например: {'Brand': 'Monroe', 'Article': 'd5471', 'is_main_warehouse': 0 }
curl_setopt($ch1, CURLOPT_URL, "api.tmparts.ru/api/StockByArticle?".http_build_query($fields));
$Art_List_With_Prices = json_decode(curl_exec($ch1),true);
foreach($arWsParts as $arPart){
foreach($Art_List_With_Prices as $key2 => $value2){
//echo print_r ($value2[warehouse_offers]);
foreach($value2[warehouse_offers] as $key3 => $value3) {
//Make valid Price array
$arPrice = TDMPriceArray();
$arPrice["LINK_TO_BKEY"] = $arPart['BKEY']; //If links (cross) number returned
$arPrice["LINK_TO_AKEY"] = $arPart['AKEY']; //If links (cross) number returned
//Webservice data
$arPrice["ARTICLE"] = $value2[article];
$arPrice["ALT_NAME"] = (string)$value3[BrandName];
$arPrice["BRAND"] = $brand[BrandName];
$arPrice["PRICE"] = (float)$value3[price];
$arPrice["CURRENCY"] = $arWS['CURRENCY'];
$arPrice["DAY"] = $value3[delivery_period];
$arPrice["AVAILABLE"] = $value3[quantity];
$arPrice["STOCK"] = $value2[warehouse_offers];
$arPrice["OPTIONS"] = TDMOptionsImplode($arOps,$arPrice);
//Add new record
$arPrices[] = $arPrice;
}
}
}//foreach
}
curl_close($ch1);
?>
[/B]
так используй модуль вывода произвольного html кода и будет тебе счастье, это уже миллион раз обсуждалиФорумчане, не могу подключиться правильно скрипт и opencart, все выводить по адресу my domain/autoparts/ но если жду на главную, то оправляет на главную странице opencart, как как исправить?
Рассмотрю как вариант покупку готового рабочего бэкапа сайта на Opencart 2 + TecDoc. Какие варианты еще есть для бюджетного интернет магазина по продаже автозапчастей?
function __construct() {
$constr="Driver={Transbase ODBC TECDOC CD 2_2016};Database=TECDOC_CD_2_2016@localhost";
$this->db=odbc_connect($constr,"tecdoc","tcd_error_0") or odbc_errormsg();
}