Last active
March 26, 2018 13:07
-
-
Save CajuCLC/7e1197310641d67b593f76ef209ed115 to your computer and use it in GitHub Desktop.
tenda atualizar preço produto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form action="trocapreco.php" method="post"> | |
Valor: <input type="text" name="preco"><br> | |
<input type="submit"> | |
</form> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$proxy = new SoapClient('https://www.tendagospel.com/index.php/api/v2_soap/?wsdl=1'); | |
$sessionId = $proxy->login('USUARIO', 'SENHA'); | |
$result = $proxy->catalogProductInfo($sessionId, '127.926'); | |
echo "<pre>"; | |
print_r($result); | |
echo "</pre>"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$preco = $_POST["preco"]; | |
$proxy = new SoapClient('https://www.tendagospel.com/index.php/api/v2_soap/?wsdl=1'); | |
$sessionId = $proxy->login('USUARIO', 'SENHA') | |
$result = $proxy->catalogProductUpdate($sessionId, '127.926', array( | |
'price' => $preco | |
)); | |
echo "<pre>"; | |
print_r($result); | |
echo "</pre>"; | |
echo "O preço do produto foi alterado para $preco."; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment