Properties

$myConfig

$myConfig : object

Config object

Type

object

$oDb

$oDb : object

Database object

Type

object

$_blUseLazyLoading

$_blUseLazyLoading : boolean

Allow lazy loading

Type

boolean

Methods

getConfig()

getConfig() : object

Function to get config object

Returns

object

getDb()

getDb() : object

Function to get database object

Returns

object

fetchAllArticles()

fetchAllArticles(integer  $start, integer  $offset = 10, integer  $columns = '', integer  $langId) : array

Function to fetch all articles

Parameters

integer $start

start index of the fetchAllArticles result (optional)

integer $offset

offset index of the fetchAllArticles result (optional)

integer $columns

columns to be fetched for each article (optional)

integer $langId

in which language columns to be fetched for each article (optional)

Returns

array

getAllSelectFields()

getAllSelectFields() : string

Function to fetch all the column names from oxarticles table

Returns

string

fetchArticle()

fetchArticle(string  $articleId) : array

Function to fetch article details

Parameters

string $articleId

articleId to fetch article details

Returns

array

fetchArticleByColumns()

fetchArticleByColumns(string  $columns, string  $articleId, integer  $langId) : array

Function to fetch specified fields of article details

Parameters

string $columns

columns to be fetched, seperated with commas (Ex: OXID,OXARTNUM,OXTITLE)

string $articleId

oxid of the article to be fetched

integer $langId

in which language columns to be fetched for each article (optional)

Returns

array

insertArticle()

insertArticle(\JSONstring  $Article) : boolean

Function to insert article

Parameters

\JSONstring $Article

json string with article details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

boolean

insertArticles()

insertArticles(\JSONstring  $Articles) : array

Function to insert articles

Parameters

\JSONstring $Articles

json string with articles details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

array

insertArticleByColumns()

insertArticleByColumns(\JSONstring  $Article) : boolean

Function to insert specified fields of an article to create

Parameters

\JSONstring $Article

json string with article details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

boolean

updateArticle()

updateArticle(\JSONstring  $Article) : boolean

Function to update article

Parameters

\JSONstring $Article

json string with article details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

boolean

updateArticles()

updateArticles(\JSONstring  $Articles) : boolean

Function to update articles

Parameters

\JSONstring $Articles

json string with article details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

boolean

updateArticleByColumns()

updateArticleByColumns(\JSONstring  $Article) : boolean

Function to update specified fields of an article

Parameters

\JSONstring $Article

json string with article details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxtitle'=>'xxxxxx'.

Returns

boolean

updateStock()

updateStock(string  $ArticleId, string  $stock) : boolean

Function to update stock of an article

Parameters

string $ArticleId

articleId for which stock needs to be updated

string $stock

stock to update

Returns

boolean

fetchVariantArticles()

fetchVariantArticles(string  $articleId, string  $langId) : array

Function to get variant articles for an article

Parameters

string $articleId

articleId to get the variant articles

string $langId

langId to get the variant articles

Returns

array

fetchParentArticle()

fetchParentArticle(string  $ArticleId) : array

Function to get parent article of an article

Parameters

string $ArticleId

ArticleId to get the parent article

Returns

array

assignCategory()

assignCategory(string  $oxid, string  $ArticleId, string  $CatId) : boolean

Function to assign category to an article

Parameters

string $oxid

OXID

string $ArticleId

ArticleId to be assigned

string $CatId

Category Id to assign

Returns

boolean

unassignCategory()

unassignCategory(string  $ArticleId, string  $CatId) : boolean

Function to unassign category to an article

Parameters

string $ArticleId

ArticleId to be unassigned

string $CatId

Category Id to unassign

Returns

boolean

fetchLongDesc()

fetchLongDesc(string  $ArticleId) : \text

Function to get description of an article

Parameters

string $ArticleId

ArticleId to get description

Returns

\text

setArtLongDesc()

setArtLongDesc(string  $ArticleId, \text  $LongDesc) : boolean

Function to set description for an article

Parameters

string $ArticleId

ArticleId to set description

\text $LongDesc

description to set

Returns

boolean

setArtShortDesc()

setArtShortDesc(string  $ArticleId, \text  $shortDesc) : boolean

Function to set description for an article

Parameters

string $ArticleId

ArticleId to set description

\text $shortDesc

short description to set

Returns

boolean

fetchVat()

fetchVat(string  $ArticleId) : string

Function to get vat for an article

Parameters

string $ArticleId

ArticleId to get vat

Returns

string

getImages()

getImages(string  $ArticleId) : array

Function to get images for an article

Parameters

string $ArticleId

ArticleId to get images

Returns

array

fetchCatArticles()

fetchCatArticles(string  $CatId) : array

Function to get articles of a category

Parameters

string $CatId

Category Id to get its articles

Returns

array

getNetPrice()

getNetPrice(string  $ArticleId) : string

Function to get net price of an article

Parameters

string $ArticleId

ArticleId to get the net price

Returns

string

getGrossPrice()

getGrossPrice(string  $ArticleId) : string

Function to get gross price of an article

Parameters

string $ArticleId

ArticleId to get the gross price

Returns

string

fetchAllParentArticles()

fetchAllParentArticles(integer  $start, integer  $offset = 10) : array

Return all parent articles

Parameters

integer $start

start index of the fetchAllParentArticles result (optional)

integer $offset

offset index of the fetchAllParentArticles result (optional)

Returns

array

fetchAllUpdateParentArticles()

fetchAllUpdateParentArticles(\time  $time, integer  $start, integer  $offset = 10) : array

Return all parent articles that have to be updated

Parameters

\time $time

time to fetch updated articles within that time.

integer $start

start index of the fetchAllUpdateParentArticles result (optional)

integer $offset

offset index of the fetchAllUpdateParentArticles result (optional)

Returns

array

fetchCategoryTitles()

fetchCategoryTitles(string  $ArticleId) : array

Return titles of categories to which an article is assigned

Parameters

string $ArticleId

ArticleId to get the category title

Returns

array

fetchVariantValues()

fetchVariantValues(string  $ArticleId) : array

Return variant values of an article

Parameters

string $ArticleId

ArticleId to get the variant values

Returns

array

fetchAttributeValues()

fetchAttributeValues(string  $ArticleId) : array

Return attribute values of an article

Parameters

string $ArticleId

ArticleId to get the attribute values

Returns

array

fetchManufacturers()

fetchManufacturers(string  $ArticleId) : array

Return manufacturers of an article

Parameters

string $ArticleId

ArticleId to get the manufacturer title

Returns

array

fetchArticleTags()

fetchArticleTags(string  $ArticleId) : array

Return tags of an article

Parameters

string $ArticleId

ArticleId to get the article tags

Returns

array

fetchThumbnailUrl()

fetchThumbnailUrl(string  $ArticleId) : string

Return thumbnail url of an article

Parameters

string $ArticleId

ArticleId to get the thumbnail url

Returns

string

fetchIconUrl()

fetchIconUrl(string  $ArticleId) : string

Return icon url of an article

Parameters

string $ArticleId

ArticleId to get the icon url

Returns

string

fetchArticleLink()

fetchArticleLink(string  $ArticleId, integer  $lang) : string

Return url of an article

Parameters

string $ArticleId

ArticleId to get the article link

integer $lang

language id

Returns

string

fetchCategoryIds()

fetchCategoryIds(string  $ArticleId) : array

Return id's of categories to which the article is assigned

Parameters

string $ArticleId

ArticleId to get the category id

Returns

array

fetchVariantIds()

fetchVariantIds(string  $ArticleId) : array

Return id's of variants of an artcile

Parameters

string $ArticleId

ArticleId to get the variants oxid's

Returns

array

isArticleExist()

isArticleExist(string  $ArticleId) : string

To check if an article exists

Parameters

string $ArticleId

ArticleId to check whether article exists or not

Returns

string

fetchVariantsMinPrice()

fetchVariantsMinPrice(string  $ArticleId) : string

To return article variants min price

Parameters

string $ArticleId

ArticleId to get the article variants min price

Returns

string

fetchVariantsStock()

fetchVariantsStock(string  $ArticleId) : string

To return article variants stock

Parameters

string $ArticleId

ArticleId to get the article's variants stock

Returns

string

getMostOrderedArticles()

getMostOrderedArticles(string  $limit = 1, string  $type = null) : array

Function to fetch article which ordered most number of times.

Parameters

string $limit

limit count of articles to be fetched.

string $type

type of the request like most ordered article in current month, day, year, ...

Returns

array

searchArticle()

searchArticle(string  $searchKey) : array

Function to fetch article details based on search key (title or article number)

Parameters

string $searchKey

search keyword to fetch the article details based on title or article number.

Returns

array

fetchLowStockArticles()

fetchLowStockArticles(\JSONstring  $client_data) : array

Function to fetch articles details which are in low stock

Parameters

\JSONstring $client_data

json string with 'limit'=> minimum threshold value to define the low stock articles, 'start'=> start index of the fetchLowStockArticles result and 'offset'=> offset index of the fetchLowStockArticles result 'langId'=> language id to get the article details 'columns'=> required columns to get the data seperated by , (Ex: columns=>'oxtitle,oxartnum,oxid,...')

Returns

array

fetchLowStockArticlesMinMax()

fetchLowStockArticlesMinMax(\JSONstring  $client_data) : array

Function to fetch articles details which are in low stock

Parameters

\JSONstring $client_data

json string with 'minlimit'=> minimum threshold value to define the low stock articles, 'maxlimit'=> maximum threshold value to define the low stock articles 'start'=> start index of the fetchLowStockArticles result and 'offset'=> offset index of the fetchLowStockArticles result 'langId'=> language id to get the article details 'columns'=> required columns to get the data seperated by , (Ex: columns=>'oxtitle,oxartnum,oxid,...')

Returns

array

fetchLowStockArticlesCountMinMax()

fetchLowStockArticlesCountMinMax(string  $minlimit, string  $maxlimit) : array

Function to fetch articles count which are in low stock

Parameters

string $minlimit

minimum threshold value to define the low stock articles

string $maxlimit

maximum threshold value to define the low stock articles

Returns

array

fetchLowStockArticlesCount()

fetchLowStockArticlesCount(string  $limit) : array

Function to fetch articles count which are in low stock

Parameters

string $limit

minimum threshold value to define the low stock articles

Returns

array

fetchArticleByEAN()

fetchArticleByEAN(string  $articleEAN) : array

Function to fetch article details based on EAN

Parameters

string $articleEAN

article EAN to fetch article details

Returns

array

updateArticlePicture()

updateArticlePicture(string  $articleId, integer  $pictureId, string  $pictureStr, string  $title) : boolean

Function to update article picture

Parameters

string $articleId

ArticleId to update picture

integer $pictureId

picture number

string $pictureStr

picture binary data

string $title

article title for picture

Returns

boolean

createImage()

createImage(  $sImageData,   $filename) 

Parameters

$sImageData
$filename

clearCache()

clearCache()