Merge pull request #498 from lunika/fix

Fix
This commit is contained in:
Manuel Raynaud
2014-06-24 15:48:01 +02:00
12 changed files with 6 additions and 33 deletions

View File

@@ -127,10 +127,6 @@ class StartDate extends ConditionAbstract
*/
public function getSummary()
{
$i18nOperator = Operators::getI18n(
$this->translator, $this->operators[self::START_DATE]
);
$date = new \DateTime();
$date->setTimestamp($this->values[self::START_DATE]);
$strDate = $date->format($this->getDateFormat());

View File

@@ -1165,7 +1165,7 @@
</route>
<route id="export.customer.newsletter" path="/admin/export/customer/newsletter">
<default key="_controller">Thelia\Controller\Admin\CustomerExportController::NewsletterExportAction</default>
<default key="_controller">Thelia\Controller\Admin\CustomerExportController::newsletterExportAction</default>
</route>
<!-- The default route, to display a template -->

View File

@@ -14,7 +14,6 @@ namespace Thelia\Controller\Admin;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Router;
use Thelia\Condition\ConditionFactory;

View File

@@ -25,7 +25,7 @@ use Thelia\Model\NewsletterQuery;
class CustomerExportController extends BaseAdminController
{
public function NewsletterExportAction()
public function newsletterExportAction()
{
if (null !== $response = $this->checkAuth([AdminResources::EXPORT_CUSTOMER_NEWSLETTER], [], [AccessManager::VIEW])) {
return $response;

View File

@@ -181,13 +181,6 @@ class TranslationsController extends BaseAdminController
case 'ma' :
$template = new TemplateDefinition($item_name, TemplateDefinition::EMAIL);
break;
default:
/*
throw new \InvalidArgumentException(
$this->getTranslator()->trans("Undefined translation type: %item", ['%item' => $item_to_translate])
);
*/
}
if ($template) {

View File

@@ -14,7 +14,6 @@ namespace Thelia\Core\Event\Coupon;
use Thelia\Core\Event\ActionEvent;
use Thelia\Condition\ConditionCollection;
use Thelia\Model\Coupon;
use Thelia\Model\Exception\InvalidArgumentException;
/**
* Occurring when a Coupon is created or updated

View File

@@ -190,9 +190,6 @@ class Category extends BaseI18nLoop implements PropelSearchLoopInterface, Search
}
}
/* @todo */
$notEmpty = $this->getNot_empty();
return $search;
}

View File

@@ -152,9 +152,6 @@ class Coupon extends BaseI18nLoop implements PropelSearchLoopInterface
/** @var ConditionFactory $conditionFactory */
$conditionFactory = $this->container->get('thelia.condition.factory');
/** @var Request $request */
$request = $this->container->get('request');
/** @var MCoupon $coupon */
foreach ($loopResult->getResultDataCollection() as $coupon) {

View File

@@ -157,9 +157,6 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface, SearchLo
}
}
/* @todo */
$notEmpty = $this->getNot_empty();
return $search;
}

View File

@@ -230,17 +230,10 @@ class FreeProduct extends AbstractRemoveOnProducts
$this->setRelatedCartItem($eligibleProduct, $cartEvent->getCartItem()->getId());
$freeProductCartItem = $cartEvent->getCartItem();
// Setting product price is dangerous, as the customer could change the ordered quantity of this product.
// We will instead add the product price to the order discount.
// $cartEvent->getCartItem()->setPrice(0)->save();
}
}
if ($freeProductCartItem instanceof CartItem) {
$taxCountry = $this->facade->getDeliveryCountry();
// The discount is the product price.
$discount = $freeProductCartItem->getPromo() ?
$freeProductCartItem->getPromoPrice() : $freeProductCartItem->getPrice();

View File

@@ -11,6 +11,7 @@
/*************************************************************************************/
namespace Thelia\Coupon\Type;
use Thelia\Core\Translation\Translator;
/**
* A trait to manage a coupon which removes a percentage of cart items from the order total.

View File

@@ -95,10 +95,11 @@ class FileManager
if (!$model->save()) {
throw new ImageException(
sprintf(
'%s %s (%s) failed to be saved (image file)',
'%s %s (%s) with id %d failed to be saved (image file)',
ucfirst($parentType),
$model->getFile(),
$fileType
$fileType,
$parentId
)
);
}