document.write( '
' );
document.write( '
' );
document.write( '\n' );
document.write( '\n' );
document.write( '
\n' );
document.write( '\n' );
document.getElementById("VicShopGetPriceOEM").innerHTML = "";
function GetPrice() {
var SKU=$('#VicShopGetPriceOEM_Button_SKU').val();
$('#VicShopGetPriceOEM_Button_SKU').val("");
$('#VicShopGetPriceOEM_Button').html('Buscando...');
$('#VicShopGetPriceOEM_Result').hide();
$.ajax({
url: 'https://vicshop.systeam.es/WebPlugins/GetPrice.php',
type: "POST",
dataType: 'json',
data: '&GetPrice=1&SKU='+SKU,
success: function (data) { console.log(data);
$('#VicShopGetPriceOEM_Result').show();
if(data.Alert!=="") {
$('#VicShopGetPriceOEM_Result').html(data.Alert);
} else {
$('#VicShopGetPriceOEM_Result').html(data.Price);
}
$('#VicShopGetPriceOEM_Button').html('Obtener precio');
},
error: function (data) {
console.log(data);
$('#VicShopGetPriceOEM_Button').html('Obtener precio');
$('#VicShopGetPriceOEM_Result').hide();
alert("Error, en este momento no podemos darle precio para esta referencia.");
}
});
}