/** * Populate model object properties by the passed data * * @param array $data Data to set * * @return void */ protected function setModelProperties(array $data) { $data['useCustomOG'] = $this->getPostedData('useCustomOG'); $nonFilteredData = \XLite\Core\Request::getInstance()->getNonFilteredData(); $data['ogMeta'] = isset($nonFilteredData['postedData']['ogMeta']) ? $nonFilteredData['postedData']['ogMeta'] : ''; parent::setModelProperties($data); }
/** * Populate model object properties by the passed data * * @param array $data Data to set * * @return void */ protected function setModelProperties(array $data) { $participateSale = $this->getPostedData('participateSale'); $data['participateSale'] = false; if ($participateSale) { $data['participateSale'] = true; $data['discountType'] = $this->getPostedData('discountType'); $data['salePriceValue'] = doubleval($this->getPostedData('salePriceValue')); } parent::setModelProperties($data); }