/** * In case you want to use your own reference: **/ //$Reference->setKey('merchant_id'); // A site tag //$Reference->setValue(1234); // Value of the tag $ProductService->setReference($Reference); /** * you may specify which type of import you plan to send: * * a full import replaces all existing products (default, if not specified) * a delta import is used to update the latest full import * * note: one import/service has only one type */ //$ProductService->setImportType(\Productsup\Service\ProductData::TYPE_FULL); $ProductService->setImportType(\Productsup\Service\ProductData::TYPE_DELTA); /** * Adding one product to insert. * * A product is represented by an array. * There is no fixed structure you have to follow, * the keys you use will become the column name for the resulting upload * * note: you have to call commit() at the end before the data actually gets handled */ $ProductService->insert(array('id' => 123, 'price' => 39.9, 'description' => 'some text')); $ProductService->insert(array('id' => 124, 'price' => 99.98999999999999, 'description_de' => 'ein text')); // adding 5000 random "products" for ($i = 0; $i < 5000; $i++) { $ProductService->insert(array('id' => uniqid(), 'test' => md5(uniqid()), 'created' => microtime(true), 'price' => mt_rand(0, 1000000) / 100)); }