Merge branch 'master' into modules
This commit is contained in:
@@ -26,13 +26,13 @@ namespace Thelia\Controller\Admin;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Router;
|
||||
use Thelia\Condition\ConditionFactory;
|
||||
use Thelia\Condition\ConditionManagerInterface;
|
||||
use Thelia\Condition\Implementation\ConditionInterface;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Core\Event\Coupon\CouponCreateOrUpdateEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Coupon\CouponManager;
|
||||
use Thelia\Coupon\ConditionCollection;
|
||||
use Thelia\Condition\ConditionCollection;
|
||||
use Thelia\Coupon\Type\CouponInterface;
|
||||
use Thelia\Form\CouponCreationForm;
|
||||
use Thelia\Form\Exception\FormValidationException;
|
||||
@@ -227,7 +227,7 @@ class CouponController extends BaseAdminController
|
||||
|
||||
$args['conditionsObject'] = array();
|
||||
|
||||
/** @var ConditionManagerInterface $condition */
|
||||
/** @var ConditionInterface $condition */
|
||||
foreach ($conditions->getConditions() as $condition) {
|
||||
$args['conditionsObject'][] = array(
|
||||
'serviceId' => $condition->getServiceId(),
|
||||
@@ -519,7 +519,7 @@ class CouponController extends BaseAdminController
|
||||
$couponManager = $this->container->get('thelia.coupon.manager');
|
||||
$availableConditions = $couponManager->getAvailableConditions();
|
||||
$cleanedConditions = array();
|
||||
/** @var ConditionManagerInterface $availableCondition */
|
||||
/** @var ConditionInterface $availableCondition */
|
||||
foreach ($availableConditions as $availableCondition) {
|
||||
$condition = array();
|
||||
$condition['serviceId'] = $availableCondition->getServiceId();
|
||||
@@ -564,7 +564,7 @@ class CouponController extends BaseAdminController
|
||||
protected function cleanConditionForTemplate(ConditionCollection $conditions)
|
||||
{
|
||||
$cleanedConditions = array();
|
||||
/** @var $condition ConditionManagerInterface */
|
||||
/** @var $condition ConditionInterface */
|
||||
foreach ($conditions->getConditions() as $condition) {
|
||||
$cleanedConditions[] = $condition->getToolTip();
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ class HomeController extends BaseAdminController
|
||||
|
||||
public function loadStatsAjaxAction()
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(self::RESOURCE_CODE, array(), AccessManager::VIEW)) return $response;
|
||||
|
||||
$data = new \stdClass();
|
||||
|
||||
$data->title = "Stats on " . $this->getRequest()->query->get('month', date('m')) . "/" . $this->getRequest()->query->get('year', date('Y'));
|
||||
|
||||
@@ -652,7 +652,7 @@ class ProductController extends AbstractCrudController
|
||||
|
||||
$this->dispatch(
|
||||
TheliaEvents::PRODUCT_SET_TEMPLATE,
|
||||
new ProductSetTemplateEvent($product, $template_id)
|
||||
new ProductSetTemplateEvent($product, $template_id, $this->getCurrentEditionCurrency()->getId())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1201,10 +1201,10 @@ class ProductController extends AbstractCrudController
|
||||
}
|
||||
|
||||
return new JsonResponse(array(
|
||||
'price_with_tax' => NumberFormat::getInstance($this->getRequest())->format($price_with_tax, null, '.'),
|
||||
'price_without_tax' => NumberFormat::getInstance($this->getRequest())->format($price_without_tax, null, '.'),
|
||||
'sale_price_with_tax' => NumberFormat::getInstance($this->getRequest())->format($sale_price_with_tax, null, '.'),
|
||||
'sale_price_without_tax' => NumberFormat::getInstance($this->getRequest())->format($sale_price_without_tax, null, '.')
|
||||
'price_with_tax' => NumberFormat::getInstance($this->getRequest())->formatStandardNumber($price_with_tax),
|
||||
'price_without_tax' => NumberFormat::getInstance($this->getRequest())->formatStandardNumber($price_without_tax),
|
||||
'sale_price_with_tax' => NumberFormat::getInstance($this->getRequest())->formatStandardNumber($sale_price_with_tax),
|
||||
'sale_price_without_tax' => NumberFormat::getInstance($this->getRequest())->formatStandardNumber($sale_price_without_tax)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -1236,7 +1236,8 @@ class ProductController extends AbstractCrudController
|
||||
if ($convert != 0) {
|
||||
$return_price = $prix * Currency::getDefaultCurrency()->getRate();
|
||||
}
|
||||
|
||||
// Format the number using '.', to perform further calculation
|
||||
return NumberFormat::getInstance($this->getRequest())->format($return_price, null, '.');
|
||||
return NumberFormat::getInstance($this->getRequest())->formatStandardNumber($return_price);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,10 @@ class TranslationsController extends BaseAdminController
|
||||
case 'pf' :
|
||||
$template = new TemplateDefinition($item_id, TemplateDefinition::PDF);
|
||||
break;
|
||||
|
||||
case 'ma' :
|
||||
$template = new TemplateDefinition($item_id, TemplateDefinition::EMAIL);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($template) {
|
||||
|
||||
Reference in New Issue
Block a user