Esempio n. 1
0
 /**
  * creates a search object and sets base criteria
  *
  * @param boolean $default Prepopulate object with default criterias
  * @return \Aimeos\MW\Criteria\Iface
  */
 public function createSearch($default = false)
 {
     if ($default === true) {
         $object = $this->createSearchBase('price');
         $currencyid = $this->getContext()->getLocale()->getCurrencyId();
         if ($currencyid !== null) {
             $expr = array($object->compare('==', 'price.currencyid', $currencyid), $object->getConditions());
             $object->setConditions($object->combine('&&', $expr));
         }
         return $object;
     }
     return parent::createSearch();
 }