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 namespace ProcessWire; | |
use Aws\S3\S3Client; | |
use League\Flysystem\AwsS3v3\AwsS3Adapter; | |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\Local; | |
class ProcessSync extends WireData implements Module, ConfigurableModule { | |
public static function getModuleInfo() { |
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 | |
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"]; |