dolibarr 21.0.0-alpha
Dolistore Class Reference

Class Dolistore. More...

Public Member Functions

 __construct ($debug=false)
 Constructor.
 
 getRemoteCategories ()
 Load data from remote Dolistore market place.
 
 getRemoteProducts ($options=array('start'=> 0, 'end'=> 10, 'per_page'=> 50, 'categorie'=> 0, 'search'=> ''))
 Load data from remote Dolistore market place.
 
 get_categories ($parent=0)
 Return tree of Dolistore categories.
 
 get_products ()
 Return list of product formatted for output.
 
 get_previous_link ($text='<<')
 get previous link
 
 get_next_link ($text='> >')
 get next link
 
 get_previous_url ()
 get previous url
 
 get_next_url ()
 get next url
 
 version_compare ($v1, $v2)
 version compare
 

Detailed Description

Class Dolistore.

Definition at line 29 of file dolistore.class.php.

Constructor & Destructor Documentation

◆ __construct()

Dolistore::__construct ( $debug = false)

Constructor.

Parameters
boolean$debugEnable debug of request on screen

Definition at line 92 of file dolistore.class.php.

Member Function Documentation

◆ get_categories()

Dolistore::get_categories ( $parent = 0)

Return tree of Dolistore categories.

$this->categories must have been loaded before.

Parameters
int$parentId of parent category
Returns
string

Definition at line 242 of file dolistore.class.php.

References dol_escape_htmltag(), and get_categories().

Referenced by get_categories().

◆ get_next_link()

Dolistore::get_next_link ( $text = '>>')

get next link

Parameters
string$textsymbol next
Returns
string html next link

Definition at line 399 of file dolistore.class.php.

References dol_escape_htmltag().

◆ get_next_url()

Dolistore::get_next_url ( )

get next url

Returns
string next url

Definition at line 435 of file dolistore.class.php.

◆ get_previous_link()

Dolistore::get_previous_link ( $text = '<<')

get previous link

Parameters
string$textsymbol previous
Returns
string html previous link

Definition at line 386 of file dolistore.class.php.

References dol_escape_htmltag().

◆ get_previous_url()

Dolistore::get_previous_url ( )

get previous url

Returns
string previous url

Definition at line 411 of file dolistore.class.php.

◆ get_products()

Dolistore::get_products ( )

Return list of product formatted for output.

Returns
string HTML output

Definition at line 288 of file dolistore.class.php.

References dol_escape_htmltag(), dol_stringtotime(), price2num(), and version_compare().

◆ getRemoteCategories()

Dolistore::getRemoteCategories ( )

Load data from remote Dolistore market place.

This fills ->categories

Returns
void

Definition at line 115 of file dolistore.class.php.

References dol_syslog(), and getDolGlobalString().

◆ getRemoteProducts()

Dolistore::getRemoteProducts ( $options = array('start' => 0, 'end' => 10, 'per_page' => 50, 'categorie' => 0, 'search' => ''))

Load data from remote Dolistore market place.

This fills ->products

Parameters
array{start:int,end:int,per_page:int,categorie:int,search:string}$options Options. If 'categorie' is defined, we filter products on this category id
Returns
void

Definition at line 156 of file dolistore.class.php.

References dol_syslog(), and getDolGlobalString().

◆ version_compare()

Dolistore::version_compare ( $v1,
$v2 )

version compare

Parameters
string$v1version 1
string$v2version 2
Returns
int result of compare

Definition at line 461 of file dolistore.class.php.

Referenced by get_products().


The documentation for this class was generated from the following file: