Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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);