/** * Loads selectlists for each artile in list if they exists * Returns true on success. * * @param string $sSelect SQL select string * * @return bool */ public function selectString($sSelect) { startProfile("loadinglists"); $oRes = parent::selectString($sSelect); stopProfile("loadinglists"); return $oRes; }
/** * Returns user payment history list object * * @param string $sOXID object ID (default is null) * * @return object oxList with oxuserpayments objects */ public function getUserPayments($sOXID = null) { if ($this->_oPayments === null) { if (!$sOXID) { $sOXID = $this->getId(); } $sSelect = 'select * from oxuserpayments where oxuserid = ' . oxDb::getDb()->quote($sOXID) . ' '; $this->_oPayments = oxNew('oxList'); $this->_oPayments->init('oxUserPayment'); $this->_oPayments->selectString($sSelect); } return $this->_oPayments; }
/** * Extra getter to guarantee compatibility with templates * * @param string $sName variable name * * @return string */ public function __get($sName) { switch ($sName) { case 'aPath': case 'aFullPath': return $this->getPath(); break; } return parent::__get($sName); }
/** * Sets parent for variant. This method is invoked for each element in oxList::assign() loop. * * @param oxSimleVariant $oListObject Simple variant * @param array $aDbFields Array of available */ protected function _assignElement($oListObject, $aDbFields) { $oListObject->setParent($this->_oParent); parent::_assignElement($oListObject, $aDbFields); }
/** * Class constructor, initiates parent constructor (parent::oxList()). * * @return null */ public function __construct() { parent::__construct('oxcontent'); }
/** * Creates oxorderarticle objects and assigns to them basket articles. * Updates quantity of sold articles (oxarticle::updateSoldAmount()). * * @param array $aArticleList article list */ protected function _setOrderArticles($aArticleList) { // reset articles list $this->_oArticles = oxNew('oxlist'); $iCurrLang = $this->getOrderLanguage(); // add all the products we have on basket to the order foreach ($aArticleList as $oContent) { //$oContent->oProduct = $oContent->getArticle(); // #M773 Do not use article lazy loading on order save $oProduct = $oContent->getArticle(true, null, true); // copy only if object is oxarticle type if ($oProduct->isOrderArticle()) { $oOrderArticle = $oProduct; } else { // if order language does not match product language article must be reloaded in order language if ($iCurrLang != $oProduct->getLanguage()) { $oProduct->loadInLang($iCurrLang, $oProduct->getProductId()); } // set chosen select list $sSelList = ''; if (count($aChosenSelList = $oContent->getChosenSelList())) { foreach ($aChosenSelList as $oItem) { if ($sSelList) { $sSelList .= ", "; } $sSelList .= "{$oItem->name} : {$oItem->value}"; } } $oOrderArticle = oxNew('oxorderarticle'); $oOrderArticle->setIsNewOrderItem(true); $oOrderArticle->copyThis($oProduct); $oOrderArticle->setId(); $oOrderArticle->oxorderarticles__oxartnum = clone $oProduct->oxarticles__oxartnum; $oOrderArticle->oxorderarticles__oxselvariant = new oxField(trim($sSelList . ' ' . $oProduct->oxarticles__oxvarselect->getRawValue()), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxshortdesc = new oxField($oProduct->oxarticles__oxshortdesc->getRawValue(), oxField::T_RAW); // #M974: duplicated entries for the name of variants in orders $oOrderArticle->oxorderarticles__oxtitle = new oxField(trim($oProduct->oxarticles__oxtitle->getRawValue()), oxField::T_RAW); // copying persistent parameters ... if (!is_array($aPersParams = $oProduct->getPersParams())) { $aPersParams = $oContent->getPersParams(); } if (is_array($aPersParams) && count($aPersParams)) { $oOrderArticle->oxorderarticles__oxpersparam = new oxField(serialize($aPersParams), oxField::T_RAW); } } // ids, titles, numbers ... $oOrderArticle->oxorderarticles__oxorderid = new oxField($this->getId()); $oOrderArticle->oxorderarticles__oxartid = new oxField($oContent->getProductId()); $oOrderArticle->oxorderarticles__oxamount = new oxField($oContent->getAmount()); // prices $oPrice = $oContent->getPrice(); $oOrderArticle->oxorderarticles__oxnetprice = new oxField($oPrice->getNettoPrice(), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxvatprice = new oxField($oPrice->getVatValue(), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxbrutprice = new oxField($oPrice->getBruttoPrice(), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxvat = new oxField($oPrice->getVat(), oxField::T_RAW); $oUnitPrice = $oContent->getUnitPrice(); $oOrderArticle->oxorderarticles__oxnprice = new oxField($oUnitPrice->getNettoPrice(), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxbprice = new oxField($oUnitPrice->getBruttoPrice(), oxField::T_RAW); // wrap id $oOrderArticle->oxorderarticles__oxwrapid = new oxField($oContent->getWrappingId(), oxField::T_RAW); // items shop id $oOrderArticle->oxorderarticles__oxordershopid = new oxField($oContent->getShopId(), oxField::T_RAW); // bundle? $oOrderArticle->oxorderarticles__oxisbundle = new oxField($oContent->isBundle()); // add information for eMail //P //TODO: check if this assign is needed at all $oOrderArticle->oProduct = $oProduct; $oOrderArticle->setArticle($oProduct); // simulation order article list $this->_oArticles->offsetSet($oOrderArticle->getId(), $oOrderArticle); } }
/** * Call parent class constructor */ public function __construct() { parent::__construct('oxaddress'); }
/** * Calls parent constructor and defines if Article vendor count is shown */ public function __construct() { $this->setShowVendorArticleCnt($this->getConfig()->getConfigParam('bl_perfShowActionCatArticleCnt')); parent::__construct('oxvendor'); }
/** * Class Constructor * * @param string $sObjectsInListName Associated list item object type */ public function __construct($sObjectsInListName = 'oxpayment') { $this->setHomeCountry($this->getConfig()->getConfigParam('aHomeCountry')); parent::__construct('oxpayment'); }
/** * Calls parent constructor * * @return null */ public function __construct() { return parent::__construct('oxshop'); }
/** * Call parent class constructor */ public function __construct() { parent::__construct('oxcountry'); }
/** * Class constructor * * @return null */ public function __construct() { parent::__construct('oxuser'); }
/** * Call parent class constructor * * @param string $sObjectsInListName Associated list item object type * * @return null */ public function __construct($sObjectsInListName = 'oxcountry') { parent::__construct('oxcountry'); }
/** * Class Constructor */ public function __construct() { $this->setHomeCountry($this->getConfig()->getConfigParam('aHomeCountry')); parent::__construct('oxpayment'); }
/** * Class constructor, sets callback so that Shopowner is able to add any information to the article. * * @param string $sObjectsInListName Object name (oxShop) * * @return null */ public function __construct($sObjectsInListName = 'oxshop') { return parent::__construct('oxshop'); }
/** * Calls parent constructor and defines if Article vendor count is shown * * @return null */ public function __construct() { $this->setShowManufacturerArticleCnt($this->getConfig()->getConfigParam('bl_perfShowActionCatArticleCnt')); parent::__construct('oxmanufacturer'); }
/** * Class constructor * * @return null */ public function __construct() { parent::__construct('oxbase'); $this->init('oxbase', 'oxprice2article'); }
/** * Class constructor, initiates class constructor (parent::oxbase()). */ public function __construct() { parent::__construct('oxorderarticle'); }
/** * Class constructor * * @param string $sObjectsInListName Associated list item object type * * @return null */ public function __construct($sObjectsInListName = 'oxattribute') { parent::__construct('oxattribute'); }
/** * Class Constructor */ public function __construct() { parent::__construct('oxdiscount'); }
/** * News list user getter * * @return oxuser */ public function getUser() { if ($this->_oUser == null) { $this->_oUser = parent::getUser(); } return $this->_oUser; }
/** * Calls parent constructor * * @return null */ public function __construct() { parent::__construct('oxvoucher'); }
/** * Class constructor */ public function __construct() { parent::__construct('oxattribute'); }
/** * @inheritdoc * In addition to the parent method, this method includes profiling. * * @param string $sql SQL select statement or prepared statement * @param array $parameters Parameters to be used in a prepared statement */ public function selectString($sql, array $parameters = array()) { startProfile("loadinglists"); parent::selectString($sql, $parameters); stopProfile("loadinglists"); }