Merge conflict

This commit is contained in:
touffies
2013-10-14 12:53:01 +02:00
5 changed files with 78 additions and 12 deletions

View File

@@ -9,6 +9,13 @@
<default key="_view">index</default>
</route>
<!-- Search routes -->
<route id="search" path="/search">
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
<default key="_view">search</default>
</route>
<!-- Customer routes : Register -->
<route id="customer.create.process" path="/register" methods="post">
<default key="_controller">Thelia\Controller\Front\CustomerController::createAction</default>

View File

@@ -87,6 +87,7 @@ class Product extends BaseI18nLoop
Argument::createIntTypeArgument('depth', 1),
Argument::createBooleanOrBothTypeArgument('visible', 1),
Argument::createIntTypeArgument('currency'),
Argument::createAnyTypeArgument('title'),
new Argument(
'order',
new TypeCollection(
@@ -171,6 +172,17 @@ class Product extends BaseI18nLoop
$search->filterByRef($ref, Criteria::IN);
}
$title = $this->getTitle();
if(!is_null($title)){
$search->where(" CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
}
$category = $this->getCategory();
$categoryDefault = $this->getCategoryDefault();