Article manager. Creates fully detailed article object, with such information as VAT, discounts, etc.
Definition at line 17 of file oxarticle.php.
oxArticle.__construct | ( | $ | aParams = null |
) |
Class constructor, sets shop ID for article (oxconfig.getShopId()), initiates parent constructor (parent.oxI18n()).
array | $aParams The array of names and values of oxArticle instance properties to be set on object instantiation |
Definition at line 425 of file oxarticle.php.
oxArticle.__get | ( | $ | sName | ) |
Magic getter, deals with values which are loaded on demand. Additionally it sets default value for unknown picture fields
string | $sName Variable name |
Definition at line 444 of file oxarticle.php.
oxArticle.__set | ( | $ | sName, | |
$ | sValue | |||
) |
Sets article parameter
string | $sName name of parameter to set | |
mixed | $sValue parameter value |
Definition at line 463 of file oxarticle.php.
oxArticle._applyCurrency | ( | oxPrice $ | oPrice, | |
$ | oCur = null | |||
) | [protected] |
Applies currency factor
oxPrice | $oPrice Price object | |
object | $oCur Currency object |
Definition at line 3248 of file oxarticle.php.
oxArticle._applyRangePrice | ( | ) | [protected] |
Returns minimum brut price from all (already loaded) variants and if aplicable parent article
Definition at line 4149 of file oxarticle.php.
oxArticle._applyVAT | ( | oxPrice $ | oPrice, | |
$ | dVat | |||
) | [protected] |
Applies VAT to article
oxPrice | $oPrice Price object | |
double | $dVat VAT percent |
Definition at line 3196 of file oxarticle.php.
oxArticle._assignComparisonListFlag | ( | ) | [protected] |
Adds a flag if article is on comparisonlist.
Definition at line 3788 of file oxarticle.php.
oxArticle._assignDynImageDir | ( | ) | [protected] |
oxArticle._assignNotBuyableParent | ( | ) | [protected] |
if we have variants then depending on config option the parent may be non buyable
Definition at line 3650 of file oxarticle.php.
oxArticle._assignParentFieldValue | ( | $ | sFieldName | ) | [protected] |
Assigns parent field values to article
string | $sFieldName field name |
Definition at line 3563 of file oxarticle.php.
oxArticle._assignParentFieldValues | ( | ) | [protected] |
oxArticle._assignPersistentParam | ( | ) | [protected] |
oxArticle._assignPrices | ( | ) | [protected] |
Assigns prices to article
Definition at line 3737 of file oxarticle.php.
oxArticle._assignStock | ( | ) | [protected] |
oxArticle._calculatePrice | ( | $ | oPrice, | |
$ | dVat = null | |||
) | [protected] |
Calculates price of article (adds taxes, currency and discounts).
oxPrice | $oPrice price object | |
double | $dVat vat value, optional, if passed, bypasses "bl_perfCalcVatOnlyForBasketOrder" config value |
Definition at line 1840 of file oxarticle.php.
oxArticle._deletePics | ( | ) | [protected] |
oxArticle._deleteRecords | ( | $ | sOXID | ) | [protected] |
Deletes records in database
string | $sOXID Article ID |
Definition at line 3845 of file oxarticle.php.
oxArticle._deleteVariantRecords | ( | $ | sOXID | ) | [protected] |
Deletes variant records
string | $sOXID Article ID |
Definition at line 3905 of file oxarticle.php.
oxArticle._fillAmountPriceList | ( | $ | oAmPriceList | ) | [protected] |
Fills amount price list object and sets amount price for article object
object | $oAmPriceList Amount (staffel) price list |
Definition at line 3120 of file oxarticle.php.
oxArticle._generateSearchStr | ( | $ | sOXID, | |
$ | blSearchPriceCat = false | |||
) | [protected] |
Generates SearchString for getCategory()
string | $sOXID Article ID | |
bool | $blSearchPriceCat Whether to perform the search within price categories |
Definition at line 3376 of file oxarticle.php.
oxArticle._generateSearchStrForCustomerBought | ( | ) | [protected] |
Generates SQL select string for getCustomerAlsoBoughtThisProduct
Definition at line 3400 of file oxarticle.php.
oxArticle._generateSelectCatStr | ( | $ | sOXID, | |
$ | sCatId, | |||
$ | dPriceFromTo = false | |||
) | [protected] |
Generates select string for isAssignedToCategory()
string | $sOXID Article ID | |
string | $sCatId Category ID | |
bool | $dPriceFromTo Article price for price categories |
Definition at line 3460 of file oxarticle.php.
oxArticle._generateSimListSearchStr | ( | $ | sArticleTable, | |
$ | aList | |||
) | [protected] |
Generates search string for similar list.
string | $sArticleTable Article table name | |
array | $aList A list of original articles |
Definition at line 3338 of file oxarticle.php.
oxArticle._getAmountPrice | ( | $ | dAmount = 1 |
) | [protected] |
Modifies article price depending on given amount. Takes data from oxprice2article table.
double | $dAmount Basket amount |
Definition at line 3062 of file oxarticle.php.
oxArticle._getAmountPriceList | ( | ) | [protected] |
Collecting assigned to article amount-price list
Definition at line 3488 of file oxarticle.php.
oxArticle._getAttribsString | ( | &$ | sAttribs, | |
&$ | iCnt | |||
) | [protected] |
gets attribs string
string | &$sAttribs Attribute selection snippet | |
int | &$iCnt The number of selected attributes |
Definition at line 3266 of file oxarticle.php.
oxArticle._getGroupPrice | ( | ) | [protected] |
get user Group A, B or C price, returns db price if user is not in groups
Definition at line 3040 of file oxarticle.php.
oxArticle._getPrice | ( | ) | [protected] |
oxArticle._getPriceForView | ( | $ | oPrice | ) | [protected] |
Depending on view mode prepare price for viewing
oxPrice | $oPrice price object |
Definition at line 4530 of file oxarticle.php.
oxArticle._getPriceObject | ( | $ | blCalculationModeNetto = null |
) | [protected] |
Depending on view mode prepare oxPrice object
bool | $blCalculationModeNetto - if calculation mode netto - true |
Definition at line 4505 of file oxarticle.php.
oxArticle._getSelectCatIds | ( | $ | sOXID, | |
$ | blActCats = false | |||
) | [protected] |
Returns query for article categories select
string | $sOXID article id | |
bool | $blActCats select categories if all parents are active |
Definition at line 1537 of file oxarticle.php.
oxArticle._getSimList | ( | $ | sAttribs, | |
$ | iCnt | |||
) | [protected] |
Gets similar list.
string | $sAttribs Attribute selection snippet | |
int | $iCnt Similar list article count |
Definition at line 3296 of file oxarticle.php.
oxArticle._getSubShopVarMaxPrice | ( | ) | [protected] |
oxArticle._getSubShopVarMinPrice | ( | ) | [protected] |
oxArticle._getUserPriceSufix | ( | ) | [protected] |
oxArticle._getVariantsIds | ( | ) | [protected] |
Collects and returns article variants ids.
Definition at line 3157 of file oxarticle.php.
oxArticle._getVarMaxPrice | ( | ) | [protected] |
oxArticle._getVarMinPrice | ( | ) | [protected] |
oxArticle._hasAnyVariant | ( | $ | blForceCoreTable = null |
) | [protected] |
Checks if parent has ANY variant assigned
bool | $blForceCoreTable force core table usage |
Definition at line 1150 of file oxarticle.php.
oxArticle._hasMasterImage | ( | $ | iIndex | ) | [protected] |
Checks if article has uplodaded master image for selected picture
int | $iIndex master picture index |
Definition at line 4349 of file oxarticle.php.
oxArticle._insert | ( | ) | [protected] |
Sets article creation date (oxarticle.oxarticles__oxinsert). Then executes parent method parent._insert() and returns insertion status.
Definition at line 3806 of file oxarticle.php.
oxArticle._isFieldEmpty | ( | $ | sFieldName | ) | [protected] |
Detects if field is empty.
string | $sFieldName Field name |
Definition at line 3520 of file oxarticle.php.
oxArticle._isPriceViewModeNetto | ( | ) | [protected] |
Checks and return true if price view mode is netto
Definition at line 4486 of file oxarticle.php.
oxArticle._loadFromDb | ( | $ | sOXID | ) | [protected] |
Get data from db
string | $sOXID id |
Definition at line 823 of file oxarticle.php.
oxArticle._loadVariantList | ( | $ | blSimple, | |
$ | blRemoveNotOrderables = true , |
|||
$ | blForceCoreTable = null | |||
) | [protected] |
Loads and returns variants list.
bool | $blSimple If parameter $blSimple - list will be filled with oxSimpleVariant objects, else - oxArticle | |
bool | $blRemoveNotOrderables if true, removes from list not orderable articles, which are out of stock [optional] | |
bool | $blForceCoreTable if true forces core tabel use, default is false [optional] |
Definition at line 1267 of file oxarticle.php.
oxArticle._mergeDiscounts | ( | $ | aDiscounts, | |
$ | aItemDiscounts | |||
) | [protected] |
Merges two discount arrays. If there are two the same discounts, discount values will be added.
Definition at line 3022 of file oxarticle.php.
oxArticle._modifySelectListPrice | ( | $ | dPrice, | |
$ | aChosenList = null | |||
) | [protected] |
Modifies article price according to selected select list value
double | $dPrice Modifyable price | |
array | $aChosenList Selection list array |
Definition at line 3090 of file oxarticle.php.
oxArticle._onChangeResetCounts | ( | $ | sOxid, | |
$ | sVendorId = null , |
|||
$ | sManufacturerId = null | |||
) | [protected] |
Resets category and vendor counts. This method is supposed to be called on article change triger.
string | $sOxid object to reset id ID | |
string | $sVendorId Vendor ID | |
string | $sManufacturerId Manufacturer ID |
Definition at line 3958 of file oxarticle.php.
oxArticle._onChangeStockResetCount | ( | $ | sOxid | ) | [protected] |
Resets article count cache when stock value is zero and article goes offline.
string | $sOxid product id |
Definition at line 4030 of file oxarticle.php.
oxArticle._onChangeUpdateMinVarPrice | ( | $ | sParentID | ) | [protected] |
Updates variant min price. This method is supposed to be called on article change triger.
string | $sParentID Parent ID |
Definition at line 4113 of file oxarticle.php.
oxArticle._onChangeUpdateStock | ( | $ | sParentID | ) | [protected] |
Updates article stock. This method is supposed to be called on article change triger.
string | $sParentID product parent id |
Definition at line 3990 of file oxarticle.php.
oxArticle._onChangeUpdateVarCount | ( | $ | sParentID | ) | [protected] |
Updates variant count. This method is supposed to be called on article change triger.
string | $sParentID Parent ID |
Definition at line 4048 of file oxarticle.php.
oxArticle._preparePrice | ( | $ | dPrice, | |
$ | dVat, | |||
$ | blCalculationModeNetto = null | |||
) | [protected] |
Depending on view mode prepare price before calculation
double | $dPrice - price | |
double | $dVat - VAT | |
bool | $blCalculationModeNetto - if calculation mode netto - true |
Definition at line 4551 of file oxarticle.php.
oxArticle._saveArtLongDesc | ( | ) | [protected] |
inserts article long description to artextends table
Definition at line 2941 of file oxarticle.php.
oxArticle._setVarMinMaxPrice | ( | $ | sParentId | ) | [protected] |
Updates variant min price. This method is supposed to be called on article change triger.
string | $sParentId Parent ID |
Definition at line 4068 of file oxarticle.php.
oxArticle._skipSaveFields | ( | ) | [protected] |
Removes object data fields (oxarticles__oxtimestamp, oxarticles__oxparentid, oxarticles__oxinsert).
Definition at line 2997 of file oxarticle.php.
oxArticle._update | ( | ) | [protected] |
Executes oxarticle._skipSaveFields() and updates article information
Definition at line 3824 of file oxarticle.php.
oxArticle.addTag | ( | $ | sTag | ) |
Adds tag
string | $sTag new tag |
Definition at line 2569 of file oxarticle.php.
oxArticle.addToRatingAverage | ( | $ | iRating | ) |
Calculates and saves product rating average
integer | $iRating new rating value |
Definition at line 868 of file oxarticle.php.
oxArticle.appendLink | ( | $ | sAddParams, | |
$ | iLang = null | |||
) |
Appends article seo url with additional request parameters
string | $sAddParams additional parameters which needs to be added to product url | |
int | $iLang language id |
Definition at line 2347 of file oxarticle.php.
oxArticle.appendStdLink | ( | $ | sAddParams, | |
$ | iLang = null | |||
) |
Appends article dynemic url with additional request parameters
string | $sAddParams additional parameters which needs to be added to product url | |
int | $iLang language id |
Definition at line 2454 of file oxarticle.php.
oxArticle.applyDiscountsForVariant | ( | $ | oPrice | ) |
Applies discounts which should be applied in general case (for 0 amount)
oxprice | $oPrice Price object |
Definition at line 3225 of file oxarticle.php.
oxArticle.applyVats | ( | oxPrice $ | oPrice | ) |
apply article and article use
oxPrice | $oPrice target price |
Definition at line 3213 of file oxarticle.php.
oxArticle.assign | ( | $ | aRecord | ) |
Assigns to oxarticle object some base parameters/values (such as detaillink, moredetaillink, etc).
array | $aRecord Array representing current field values |
Definition at line 787 of file oxarticle.php.
oxArticle.checkForStock | ( | $ | dAmount, | |
$ | dArtStockAmount = 0 | |||
) |
Checks if stock configuration allows to buy user chosen amount $dAmount
double | $dAmount buyable amount | |
double | $dArtStockAmount stock amount |
Definition at line 2208 of file oxarticle.php.
oxArticle.delete | ( | $ | sOXID = null |
) |
Deletes record and other information related to this article such as images from DB, also removes variants. Returns true on success.
string | $sOXID Article id |
Definition at line 1930 of file oxarticle.php.
oxArticle.disablePriceLoad | ( | ) |
Disables article price loading. Should be called before assign(), or load()
Definition at line 613 of file oxarticle.php.
oxArticle.disableReminder | ( | ) |
Disables reminder functionality for article
Definition at line 2022 of file oxarticle.php.
oxArticle.getAccessoires | ( | ) |
Loads and returns array with accessoires information.
Definition at line 992 of file oxarticle.php.
oxArticle.getActiveCheckQuery | ( | $ | blForceCoreTable = null |
) |
Returns part of sql query used in active snippet. Query checks if product "oxactive = 1". If config option "blUseTimeCheck" is TRUE additionally checks if "oxactivefrom < current data < oxactiveto"
bool | $blForceCoreTable force core table usage |
Definition at line 494 of file oxarticle.php.
oxArticle.getAdminVariants | ( | $ | sLanguage = null |
) |
Loads article variants and returns variants list object. Article language may be set by passing with parameter, or GET/POST/Session variable.
string | $sLanguage shop language. |
Definition at line 1394 of file oxarticle.php.
oxArticle.getArticleFiles | ( | $ | blAddFromParent = false |
) |
Return article downloadable file list (oxlist of oxfile)
bool | $blAddFromParent - return with parent files if not buyable |
Definition at line 4426 of file oxarticle.php.
oxArticle.getArticleRatingAverage | ( | $ | blIncludeVariants = false |
) |
Returns product rating average
bool | $blIncludeVariants - include variant ratings |
Definition at line 913 of file oxarticle.php.
oxArticle.getArticleRatingCount | ( | $ | blIncludeVariants = false |
) |
Returns product rating count
bool | $blIncludeVariants - include variant ratings |
Definition at line 930 of file oxarticle.php.
oxArticle.getArticleUser | ( | ) |
oxArticle.getArticleVat | ( | ) |
oxArticle.getAttributes | ( | ) |
Loads and returns attribute list associated with this article
Definition at line 2313 of file oxarticle.php.
oxArticle.getAttributesDisplayableInBasket | ( | ) |
Loads and returns displayable in basket/order attributes list associated with this article
Definition at line 2328 of file oxarticle.php.
oxArticle.getBasePrice | ( | $ | dAmount = 1 |
) |
Returns base article price from database. Price may differ according to users group Override this function if you want e.g. different prices for diff. usergroups.
double | $dAmount article amount. Default is 1 |
Definition at line 1774 of file oxarticle.php.
oxArticle.getBaseSeoLink | ( | $ | iLang, | |
$ | blMain = false | |||
) |
Returns raw article seo url
int | $iLang language id | |
bool | $blMain force to return main url [optional] |
Definition at line 2367 of file oxarticle.php.
oxArticle.getBaseStdLink | ( | $ | iLang, | |
$ | blAddId = true , |
|||
$ | blFull = true | |||
) |
Returns base dynamic url: shopurl/index.php?cl=details
int | $iLang language id | |
bool | $blAddId add current object id to url or not [optional] | |
bool | $blFull return full including domain name [optional] |
Implements oxIUrl.
Definition at line 2475 of file oxarticle.php.
oxArticle.getBasketPrice | ( | $ | dAmount, | |
$ | aSelList, | |||
$ | oBasket | |||
) |
Creates, calculates and returns oxprice object for basket product.
double | $dAmount Amount | |
string | $aSelList Selection list | |
object | $oBasket User shopping basket object |
Definition at line 1898 of file oxarticle.php.
oxArticle.getCategory | ( | ) |
Loads and returns article category object. First tries to load assigned category and is such category does not exist, tries to load category by price
Definition at line 1427 of file oxarticle.php.
oxArticle.getCategoryIds | ( | $ | blActCats = false , |
|
$ | blSkipCache = false | |||
) |
Returns ID's of categories where this article is assigned
bool | $blActCats select categories if all parents are active | |
bool | $blSkipCache Whether to skip cache |
Definition at line 1478 of file oxarticle.php.
oxArticle.getCrossSelling | ( | ) |
Loads and returns array with crosselling information.
Definition at line 978 of file oxarticle.php.
oxArticle.getCustomerAlsoBoughtThisProducts | ( | ) |
Loads and returns articles list, bought by same customer.
Definition at line 1053 of file oxarticle.php.
oxArticle.getCustomVAT | ( | ) |
Returns custom article VAT value if possible By default value is taken from oxarticle__oxvat field
Definition at line 2193 of file oxarticle.php.
oxArticle.getDeliveryDate | ( | ) |
Returns formated delivery date. If the date is not set ('0000-00-00') returns false.
Definition at line 2720 of file oxarticle.php.
oxArticle.getDispSelList | ( | ) |
oxArticle.getDynImageDir | ( | ) |
oxArticle.getFileUrl | ( | ) |
oxArticle.getFMinPrice | ( | ) |
oxArticle.getFNetPrice | ( | ) |
Returns formated product's NETTO price.
Definition at line 2761 of file oxarticle.php.
oxArticle.getFPrice | ( | ) |
oxArticle.getFTPrice | ( | ) |
oxArticle.getFullVariants | ( | $ | blRemoveNotOrderables = true , |
|
$ | blForceCoreTable = null | |||
) |
Returns variant list (list contains oxArticle objects)
bool | $blRemoveNotOrderables if true, removes from list not orderable articles, which are out of stock [optional] | |
bool | $blForceCoreTable if true forces core tabel use, default is false [optional] |
Definition at line 1356 of file oxarticle.php.
oxArticle.getFUnitPrice | ( | ) |
oxArticle.getFVarMinPrice | ( | ) |
Returns formated min article variant price
Definition at line 4630 of file oxarticle.php.
oxArticle.getIconUrl | ( | $ | iIndex = 0 |
) |
Returns article icon picture url. If no index specified, will return main icon url.
int | $iIndex picture index |
Definition at line 2852 of file oxarticle.php.
oxArticle.getItemKey | ( | ) |
Returns item key used with oxuserbasket
Definition at line 623 of file oxarticle.php.
oxArticle.getLink | ( | $ | iLang = null , |
|
$ | blMain = false | |||
) |
Gets article link
int | $iLang language id [optional] | |
bool | $blMain force to return main url [optional] |
Definition at line 2384 of file oxarticle.php.
oxArticle.getLinkType | ( | ) |
oxArticle.getLongDesc | ( | ) |
get long description, parsed through smarty. should only be used by exports or so. In templates use [{oxeval var=$oProduct->getLongDescription()->getRawValue()}]
Definition at line 2288 of file oxarticle.php.
oxArticle.getLongDescription | ( | ) |
Get article long description
Definition at line 2257 of file oxarticle.php.
oxArticle.getMainLink | ( | $ | iLang = null |
) |
Returns main object URL. If SEO is ON returned link will be in SEO form, else URL will have dynamic form
int | $iLang language id [optional] |
Definition at line 2415 of file oxarticle.php.
oxArticle.getManufacturer | ( | $ | blShopCheck = true |
) |
Returns current article Manufacturer object. If $blShopCheck = false, then Manufacturer blReadOnly parameter will be set to true. If Manufacturer is not assigned to current shop
bool | $blShopCheck Set false if shop check is not required (default is true) |
Definition at line 1620 of file oxarticle.php.
oxArticle.getManufacturerId | ( | $ | blForceReload = false |
) |
Returns article object Manufacturer ID. Result is cached into self.$_aArticleManufacturers
bool | $blForceReload reloads id even if it is cached |
Definition at line 1600 of file oxarticle.php.
oxArticle.getMasterZoomPictureUrl | ( | $ | iIndex | ) |
Get master zoom picture url
int | $iIndex picture index |
Definition at line 4392 of file oxarticle.php.
oxArticle.getMdSubvariants | ( | ) |
Returns first level variants from multidimensional variants list
Definition at line 4337 of file oxarticle.php.
oxArticle.getMdVariants | ( | ) |
Returns multidimensional variant structure
Definition at line 4313 of file oxarticle.php.
oxArticle.getMediaUrls | ( | ) |
oxArticle.getMinPrice | ( | ) |
Returns article min price in calculation included variants
Definition at line 4672 of file oxarticle.php.
oxArticle.getMoreDetailLink | ( | ) |
oxArticle.getParentArticle | ( | ) |
oxArticle.getParentId | ( | ) |
Returns product parent id (oxparentid)
Definition at line 4230 of file oxarticle.php.
oxArticle.getPersParams | ( | ) |
oxArticle.getPictureFieldValue | ( | $ | sFieldName, | |
$ | iIndex = null | |||
) |
Return article picture file name
string | $sFieldName article picture field name | |
int | $iIndex article picture index |
Definition at line 4377 of file oxarticle.php.
oxArticle.getPictureGallery | ( | ) |
collect article pics, icons, zoompic and puts it all in an array structure of array (ActPicID, ActPic, MorePics, Pics, Icons, ZoomPic)
Definition at line 2050 of file oxarticle.php.
oxArticle.getPictureUrl | ( | $ | iIndex = 1 |
) |
Returns article picture
int | $iIndex picture index |
Definition at line 2831 of file oxarticle.php.
oxArticle.getPrice | ( | $ | dAmount = 1 |
) |
Calculates and returns price of article (adds taxes and discounts).
double | $dAmount article amount |
Definition at line 1798 of file oxarticle.php.
oxArticle.getPriceFromPrefix | ( | ) |
Returns string prefix (like "from") if needed or empty string.
Definition at line 2926 of file oxarticle.php.
oxArticle.getPricePerUnit | ( | ) |
Returns formated price per unit
Definition at line 2775 of file oxarticle.php.
oxArticle.getProductId | ( | ) |
Returns product id (oxid) (required for interface oxIArticle)
Definition at line 4208 of file oxarticle.php.
oxArticle.getProductParentId | ( | ) |
Returns product parent id (oxparentid)
Definition at line 4220 of file oxarticle.php.
oxArticle.getReviews | ( | ) |
Collects user written reviews about an article.
Definition at line 946 of file oxarticle.php.
oxArticle.getSelections | ( | $ | iLimit = null , |
|
$ | aFilter = null | |||
) |
Returns product selections lists array (used in azure theme)
int | $iLimit if given - will load limited count of selections [optional] | |
array | $aFilter selection filter [optional] |
Definition at line 1206 of file oxarticle.php.
oxArticle.getSelectLists | ( | $ | sKeyPrefix = null |
) |
Returns all selectlists this article has (used in oxbasket)
string | $sKeyPrefix Optionall key prefix |
Definition at line 1101 of file oxarticle.php.
oxArticle.getSimilarProducts | ( | ) |
oxArticle.getSimpleVariants | ( | ) |
Simple way to get variants without quering oxarticle table first. This is basically used for lists.
Definition at line 1379 of file oxarticle.php.
oxArticle.getSqlActiveSnippet | ( | $ | blForceCoreTable = null |
) |
Returns SQL select string with checks if items are available
bool | $blForceCoreTable forces core table usage (optional) |
Definition at line 582 of file oxarticle.php.
oxArticle.getSqlForPriceCategories | ( | $ | sFields = '' |
) |
get Sql for loading price categories which include this article
string | $sFields fields to load from oxcategories |
Definition at line 4274 of file oxarticle.php.
oxArticle.getStdLink | ( | $ | iLang = null , |
|
$ | aParams = array() | |||
) |
Returns standard URL to product
int | $iLang required language. optional | |
array | $aParams additional params to use [optional] |
Implements oxIUrl.
Definition at line 2495 of file oxarticle.php.
oxArticle.getStdTagLink | ( | $ | sTag | ) |
Returns standard product Tag URL
string | $sTag tag |
Definition at line 2515 of file oxarticle.php.
oxArticle.getStockCheckQuery | ( | $ | blForceCoreTable = null |
) |
Returns part of sql query used in active snippet. If config option "blUseStock" is TRUE checks if "oxstockflag != 2 or ( oxstock + oxvarstock ) > 0". If config option "blVariantParentBuyable" is TRUE checks if product has variants, and if has - checks is there at least one variant which is buyable. If config option option "blUseTimeCheck" is TRUE additionally checks if variants "oxactivefrom < current data < oxactiveto"
bool | $blForceCoreTable force core table usage |
Definition at line 523 of file oxarticle.php.
oxArticle.getStockStatus | ( | ) |
oxArticle.getTags | ( | ) |
oxArticle.getThumbnailUrl | ( | $ | bSsl = null |
) |
Returns article thumbnail picture url
bool | $bSsl wethere to force SSL |
Definition at line 2877 of file oxarticle.php.
oxArticle.getToBasketLink | ( | ) |
oxArticle.getTPrice | ( | ) |
oxArticle.getUnitName | ( | ) |
Returns oxarticles__oxunitname value processed by oxLang.translateString()
Definition at line 4412 of file oxarticle.php.
oxArticle.getUnitPrice | ( | ) |
oxArticle.getVariants | ( | $ | blRemoveNotOrderables = true , |
|
$ | blForceCoreTable = null | |||
) |
Collects and returns article variants.
bool | $blRemoveNotOrderables if true, removes from list not orderable articles, which are out of stock | |
bool | $blForceCoreTable if true forces core tabel use, default is false [optional] |
Definition at line 1369 of file oxarticle.php.
oxArticle.getVariantSelections | ( | $ | aFilterIds = null , |
|
$ | sActVariantId = null , |
|||
$ | iLimit = 0 | |||
) |
Returns variants selections lists array
array | $aFilterIds ids of active selections [optional] | |
string | $sActVariantId active variant id [optional] | |
int | $iLimit limit variant lists count (if non zero, return limited number of multidimensional variant selections) |
Definition at line 1183 of file oxarticle.php.
oxArticle.getVariantsQuery | ( | $ | blRemoveNotOrderables, | |
$ | blForceCoreTable = null | |||
) |
Returns part of query which checks if product is variant of current object. Additionally if config option "blUseStock" is TRUE checks stock state "( oxstock > 0 or ( oxstock <= 0 and ( oxstockflag = 1 or oxstockflag = 4 ) )"
bool | $blRemoveNotOrderables remove or leave non orderable products | |
bool | $blForceCoreTable force core table usage |
Definition at line 558 of file oxarticle.php.
oxArticle.getVarMinPrice | ( | ) |
Returns article min price of variants
Definition at line 4646 of file oxarticle.php.
oxArticle.getVendor | ( | $ | blShopCheck = true |
) |
Returns current article vendor object. If $blShopCheck = false, then vendor loading will fallback to oxI18n object and blReadOnly parameter will be set to true if vendor is not assigned to current shop
bool | $blShopCheck Set false if shop check is not required (default is true) |
Definition at line 1559 of file oxarticle.php.
oxArticle.getVendorId | ( | $ | blForceReload = false |
) |
Returns article object vendor ID. Result is cached into self.$_aArticleVendors
bool | $blForceReload reloads id even if it is cached |
Definition at line 1583 of file oxarticle.php.
oxArticle.getZoomPictureUrl | ( | $ | iIndex = '' |
) |
Returns article zoom picture url
int | $iIndex picture index |
Definition at line 2899 of file oxarticle.php.
oxArticle.hasAmountPrice | ( | ) |
oxArticle.hasMdVariants | ( | ) |
Checks if article has multidimensional variants
Definition at line 1169 of file oxarticle.php.
oxArticle.inCategory | ( | $ | sCatNid | ) |
Checks if article is assigned to category $sCatNID.
string | $sCatNid category ID |
Definition at line 1648 of file oxarticle.php.
oxArticle.inPriceCategory | ( | $ | sCatNid | ) |
Checks if artickle is assigned to price category $sCatNID.
string | $sCatNid Price category ID |
Definition at line 4293 of file oxarticle.php.
oxArticle.isAssignedToCategory | ( | $ | sCatId | ) |
Checks if article is assigned to passed category (even checks if this category is "price category"). Returns true on success.
string | $sCatId category ID |
Definition at line 1661 of file oxarticle.php.
oxArticle.isBuyable | ( | ) |
oxArticle.isDownloadable | ( | ) |
Returns oxarticles__oxisdownloadable value
Definition at line 4453 of file oxarticle.php.
oxArticle.isMdVariant | ( | ) |
Returns TRUE if product is multidimensional variant, and false if not
Definition at line 4260 of file oxarticle.php.
oxArticle.isMultilingualField | ( | $ | sFieldName | ) |
Returns true if the field is multilanguage
string | $sFieldName Field name |
Definition at line 732 of file oxarticle.php.
oxArticle.isNotBuyable | ( | ) |
oxArticle.isOnComparisonList | ( | ) |
Checks whether article is inluded in comparison list
Definition at line 681 of file oxarticle.php.
oxArticle.isOrderArticle | ( | ) |
Returns false if object is not derived from oxorderarticle class
Definition at line 4240 of file oxarticle.php.
oxArticle.isParentNotBuyable | ( | ) |
oxArticle.isRangePrice | ( | ) |
Returns true if article has variant with different price
Definition at line 4701 of file oxarticle.php.
oxArticle.isVariant | ( | ) |
Returns TRUE if product is variant, and false if not
Definition at line 4250 of file oxarticle.php.
oxArticle.isVisible | ( | ) |
Checks if article has visible status. Returns TRUE if its visible
Definition at line 748 of file oxarticle.php.
oxArticle.load | ( | $ | sOXID | ) |
Loads object data from DB (object data ID must be passed to method). Converts dates (oxarticle.oxarticles__oxinsert, oxarticle.oxarticles__oxtimestamp) to international format (oxutils.php oxRegistry.get("oxUtilsDate")->formatDBDate(...)). Returns true if article was loaded successfully.
string | $sOXID Article object ID |
Definition at line 840 of file oxarticle.php.
oxArticle.loadAmountPriceInfo | ( | ) |
Returns list object with info about article price that depends on amount in basket. Takes data from oxprice2article table. Returns false if such info is not set.
Definition at line 1078 of file oxarticle.php.
oxArticle.onChange | ( | $ | sAction = null , |
|
$ | sOXID = null , |
|||
$ | sParentID = null | |||
) |
This function is triggered whenever article is saved or deleted or after the stock is changed. Originally we need to update the oxstock for possible article parent in case parent is not buyable Plus you may want to extend this function to update some extended information. Call oxArticle.onChange($sAction, $sOXID) with ID parameter as static method when changes are executed over SQL. (or use module class instead of oxArticle if such exists)
string | $sAction Action constant | |
string | $sOXID Article ID | |
string | $sParentID Parent ID |
Definition at line 2137 of file oxarticle.php.
oxArticle.reduceStock | ( | $ | dAmount, | |
$ | blAllowNegativeStock = false | |||
) |
reduce article stock. return the affected amount
double | $dAmount amount to reduce | |
bool | $blAllowNegativeStock are negative stocks allowed? |
Definition at line 1967 of file oxarticle.php.
oxArticle.save | ( | ) |
(oxArticle._saveArtLongDesc()) save the object using parent.save() method.
Definition at line 2033 of file oxarticle.php.
oxArticle.saveTags | ( | $ | sTags | ) |
Saves article tags
string | $sTags article tag |
Definition at line 2542 of file oxarticle.php.
oxArticle.setArticleLongDesc | ( | $ | sDesc | ) |
Save article long description to oxartext table
string | $sDesc description to set |
Definition at line 2300 of file oxarticle.php.
oxArticle.setArticleUser | ( | $ | oUser | ) |
sets article user
oxUser | $oUser user to set |
Definition at line 1871 of file oxarticle.php.
oxArticle.setBuyableState | ( | $ | blBuyable = false |
) |
Sets product state - buyable or not
bool | $blBuyable state - buyable or not (default false) |
Definition at line 2807 of file oxarticle.php.
oxArticle.setId | ( | $ | sId = null |
) |
Sets object ID, additionally sets $this->oxarticles__oxnid field value
string | $sId New ID |
Definition at line 475 of file oxarticle.php.
oxArticle.setItemKey | ( | $ | sItemKey | ) |
Sets item key used with oxuserbasket
string | $sItemKey Item key |
Definition at line 635 of file oxarticle.php.
oxArticle.setLinkType | ( | $ | iType | ) |
Resets details link
int | $iType type of link to load |
Definition at line 2427 of file oxarticle.php.
oxArticle.setLoadParentData | ( | $ | blLoadParentData | ) |
A setter for $_blLoadParentData (whether article parent info should be laoded fully) class variable
bool | $blLoadParentData Whether to load parent data |
Definition at line 705 of file oxarticle.php.
oxArticle.setNoVariantLoading | ( | $ | blLoadVariants | ) |
Disables/enables variant loading
bool | $blLoadVariants skip variant loading or not |
Definition at line 647 of file oxarticle.php.
oxArticle.setOnComparisonList | ( | $ | blOnList | ) |
Set if article is inluded in comparison list
bool | $blOnList Whether is article on the list |
Definition at line 693 of file oxarticle.php.
oxArticle.setPrice | ( | oxPrice $ | oPrice | ) |
Sets the current oxPrice object
oxPrice | $oPrice the new price object |
Definition at line 1761 of file oxarticle.php.
oxArticle.setRangePrice | ( | $ | blIsRangePrice = true |
) |
Setter to set if article has range price
bool | $blIsRangePrice - true if range, else false |
Definition at line 4731 of file oxarticle.php.
oxArticle.setRatingAverage | ( | $ | iRating | ) |
Set product rating average
integer | $iRating new rating value |
Definition at line 889 of file oxarticle.php.
oxArticle.setRatingCount | ( | $ | iRatingCnt | ) |
Set product rating count
integer | $iRatingCnt new rating count |
Definition at line 901 of file oxarticle.php.
oxArticle.setSelectlist | ( | $ | aSelList | ) |
Sets selectlists of current product
array | $aSelList selectlist |
Definition at line 2819 of file oxarticle.php.
oxArticle.setSkipAbPrice | ( | $ | blSkipAbPrice = null |
) |
Set _blSkipAbPrice value. If is set to true, then "From price" is not calculated for this object.
bool | $blSkipAbPrice Whether to skip "From" price loading |
Definition at line 719 of file oxarticle.php.
oxArticle.setSkipAssign | ( | $ | blSkipAssign | ) |
Assign condition setter. In case article assignment is skipped ($_blSkipAssign = true), it does not perform additional
bool | $blSkipAssign Whether to skip assign process for the article |
Definition at line 603 of file oxarticle.php.
oxArticle.skipDiscounts | ( | ) |
Checks if discount should be skipped for this article in basket. Returns true if yes.
Definition at line 1728 of file oxarticle.php.
oxArticle.updateSoldAmount | ( | $ | dAmount = 0 |
) |
Recursive function. Updates quantity of sold articles. Return true on success
double | $dAmount Number of articles sold |
Definition at line 1992 of file oxarticle.php.
oxArticle.$_aArticleCats = array() [static, protected] |
Definition at line 346 of file oxarticle.php.
oxArticle.$_aArticleFiles = null [protected] |
Definition at line 414 of file oxarticle.php.
oxArticle.$_aArticleManufacturers = array() [static, protected] |
Definition at line 332 of file oxarticle.php.
oxArticle.$_aArticleVendors = array() [static, protected] |
Definition at line 339 of file oxarticle.php.
oxArticle.$_aCategoryCache = null [static, protected] |
Definition at line 402 of file oxarticle.php.
oxArticle.$_aCopyParentField [protected] |
array('oxarticles__oxnonmaterial', 'oxarticles__oxfreeshipping', 'oxarticles__oxremindactive', 'oxarticles__oxisdownloadable')
Definition at line 364 of file oxarticle.php.
oxArticle.$_aDispSelList [protected] |
Definition at line 224 of file oxarticle.php.
oxArticle.$_aLoadedParents [static, protected] |
Definition at line 210 of file oxarticle.php.
oxArticle.$_aMediaUrls = null [protected] |
Definition at line 203 of file oxarticle.php.
oxArticle.$_aNonCopyParentFields [protected] |
array('oxarticles__oxinsert', 'oxarticles__oxtimestamp', 'oxarticles__oxnid', 'oxarticles__oxid', 'oxarticles__oxparentid')
Definition at line 353 of file oxarticle.php.
oxArticle.$_aPersistParam = null [protected] |
Definition at line 80 of file oxarticle.php.
oxArticle.$_aSelections = array() [static, protected] |
Definition at line 396 of file oxarticle.php.
oxArticle.$_aSelList [static, protected] |
Definition at line 217 of file oxarticle.php.
oxArticle.$_aSeoAddParams = array() [protected] |
Definition at line 269 of file oxarticle.php.
oxArticle.$_aSeoUrls = array() [protected] |
Definition at line 262 of file oxarticle.php.
oxArticle.$_aStdAddParams = array() [protected] |
Definition at line 276 of file oxarticle.php.
oxArticle.$_aStdUrls = array() [protected] |
Definition at line 255 of file oxarticle.php.
oxArticle.$_aVariants = null [protected] |
Definition at line 102 of file oxarticle.php.
oxArticle.$_aVariantSelections = array() [protected] |
Definition at line 390 of file oxarticle.php.
oxArticle.$_aVariantsWithNotOrderables = null [protected] |
Definition at line 109 of file oxarticle.php.
oxArticle.$_blCalcPrice = true [protected] |
Definition at line 45 of file oxarticle.php.
oxArticle.$_blHasAmountPrice = null [static, protected] |
Definition at line 408 of file oxarticle.php.
oxArticle.$_blHasMdVariants = false [protected] |
$_blHasVariants is set to true if article has multidimensional variants.
Definition at line 130 of file oxarticle.php.
oxArticle.$_blHasVariants = false [protected] |
$_blHasVariants is set to true if article has any variants.
Definition at line 125 of file oxarticle.php.
oxArticle.$_blIsOnComparisonList = false [protected] |
Definition at line 136 of file oxarticle.php.
oxArticle.$_blIsRangePrice = null [protected] |
Definition at line 196 of file oxarticle.php.
oxArticle.$_blIsSeoObject = true [protected] |
Definition at line 231 of file oxarticle.php.
oxArticle.$_blLoadParentData = false [protected] |
Variable used to force load parent data in export
Definition at line 170 of file oxarticle.php.
oxArticle.$_blLoadPrice = true [protected] |
Definition at line 149 of file oxarticle.php.
oxArticle.$_blLoadVariants = true [protected] |
Definition at line 95 of file oxarticle.php.
oxArticle.$_blNotBuyable = false [protected] |
Definition at line 87 of file oxarticle.php.
oxArticle.$_blNotBuyableParent = false [protected] |
Definition at line 119 of file oxarticle.php.
oxArticle.$_blSkipAbPrice = false [protected] |
If $_blSkipAbPrice is set to true, then "From price" is not calculated for this object.
Definition at line 157 of file oxarticle.php.
oxArticle.$_blSkipAssign = false [protected] |
Variable used to force load parent data in export
Definition at line 175 of file oxarticle.php.
oxArticle.$_blSkipDiscounts = null [protected] |
Definition at line 182 of file oxarticle.php.
oxArticle.$_blUseLazyLoading = true [protected] |
Definition at line 31 of file oxarticle.php.
oxArticle.$_dAmountPrice = null [protected] |
Definition at line 325 of file oxarticle.php.
oxArticle.$_dArticleVat = null [protected] |
Definition at line 73 of file oxarticle.php.
oxArticle.$_dVarMaxPrice = null [protected] |
Definition at line 66 of file oxarticle.php.
oxArticle.$_dVarMinPrice = null [protected] |
Definition at line 59 of file oxarticle.php.
oxArticle.$_fPricePerUnit = null [protected] |
$_fPricePerUnit holds price per unit value in active shop currency. $_fPricePerUnit is calculated from oxArticle.oxarticles__oxunitquantity->value and from oxArticle.oxarticles__oxuniname->value. If either one of these values is empty then $_fPricePerUnit is not calculated. Example: In case when product price is 10 EUR and product quantity is 0.5 (liters) then $_fPricePerUnit would be 20,00
Definition at line 165 of file oxarticle.php.
oxArticle.$_iLinkType = 0 [protected] |
Definition at line 248 of file oxarticle.php.
oxArticle.$_iStockStatus = null [protected] |
Definition at line 304 of file oxarticle.php.
oxArticle.$_oAmountPriceInfo = null [protected] |
Definition at line 318 of file oxarticle.php.
oxArticle.$_oAmountPriceList = null [protected] |
Definition at line 238 of file oxarticle.php.
oxArticle.$_oAttributeList = null [protected] |
Object holding the list of attributes and attribute values associated with this article Attributes are loaded only when bl_perfLoadAttributes config option is set to true
Definition at line 188 of file oxarticle.php.
oxArticle.$_oLongDesc = null [protected] |
Definition at line 381 of file oxarticle.php.
oxArticle.$_oMdVariants = null [protected] |
Definition at line 374 of file oxarticle.php.
oxArticle.$_oPrice = null [protected] |
Definition at line 51 of file oxarticle.php.
oxArticle.$_oTPrice = null [protected] |
Definition at line 311 of file oxarticle.php.
oxArticle.$_oUser = null [protected] |
Definition at line 142 of file oxarticle.php.
oxArticle.$_sClassName = 'oxarticle' [protected] |
Definition at line 24 of file oxarticle.php.
oxArticle.$_sDynImageDir = null [protected] |
Definition at line 283 of file oxarticle.php.
oxArticle.$_sItemKey [protected] |
Definition at line 38 of file oxarticle.php.
oxArticle.$_sMoreDetailLink = null [protected] |
Definition at line 290 of file oxarticle.php.
oxArticle.$_sToBasketLink = null [protected] |
Definition at line 297 of file oxarticle.php.