Example #1
0
<?php

include_once '../../lib/phpWeFact/WeFact_Api.php';
include_once '../../lib/phpWeFact/WeFact_Model.php';
include_once '../../lib/phpWeFact/WeFact_Product.php';
/**
 * Unfortunately WeFact API doesn't provide all the information foreach object in this call
 * Something you want to keep in mind.
 *
 * call the renew() method to get all the latest information of the object
 */
$result = WeFact_Product::listAll();
var_dump($result);
Example #2
0
<?php

include_once '../../lib/phpWeFact/WeFact_Api.php';
include_once '../../lib/phpWeFact/WeFact_Model.php';
include_once '../../lib/phpWeFact/WeFact_Product.php';
$result = WeFact_Product::getByCode("P0007");
var_dump($result);
Example #3
0
<?php

include_once '../../lib/phpWeFact/WeFact_Api.php';
include_once '../../lib/phpWeFact/WeFact_Model.php';
include_once '../../lib/phpWeFact/WeFact_Product.php';
$product = WeFact_Product::getByCode("P0007");
$result = $product->remove();
var_dump($result);
Example #4
0
<?php

include_once '../../lib/phpWeFact/WeFact_Api.php';
include_once '../../lib/phpWeFact/WeFact_Model.php';
include_once '../../lib/phpWeFact/WeFact_Product.php';
$product = new WeFact_Product();
$product->setProductName("Super awesome product")->setProductKeyPhrase("So awesome everyone wants it")->setPriceExcl(13.37)->setTaxPercentage(0);
$result = $product->save();
var_dump($result);