Skip to content

Instantly share code, notes, and snippets.

View is-just-me's full-sized avatar

Johan Roure is-just-me

  • Chile, Santiago
View GitHub Profile
@is-just-me
is-just-me / test_functions.php
Last active November 15, 2022 07:36
Create combinations,products and update stock with Prestashop WEBSERVICE
<?php
function add_combination($data){
global $webService, $config;
try{
$xml = $webService->get(array('url' => $config["ps_shop"].'api/combinations?schema=blank'));
$combination = $xml->children()->children();
$combination->associations->product_option_values->product_option_values[0]->id = $data["option_id"];
$combination->reference = $data["code"];
$combination->id_product = $data["id_product"];