diff --git a/core/lib/Thelia/Action/Category.php b/core/lib/Thelia/Action/Category.php
index 64254d734..25a94711f 100755
--- a/core/lib/Thelia/Action/Category.php
+++ b/core/lib/Thelia/Action/Category.php
@@ -160,6 +160,7 @@ class Category extends BaseAction implements EventSubscriberInterface
$content = new CategoryAssociatedContent();
$content
+ ->setDispatcher($this->getDispatcher())
->setCategory($event->getCategory())
->setContentId($event->getContentId())
->save()
@@ -174,7 +175,11 @@ class Category extends BaseAction implements EventSubscriberInterface
->filterByCategory($event->getCategory())->findOne()
;
- if ($content !== null) $content->delete();
+ if ($content !== null) {
+ $content
+ ->setDispatcher($this->getDispatcher())
+ ->delete();
+ }
}
diff --git a/core/lib/Thelia/Action/Order.php b/core/lib/Thelia/Action/Order.php
index 15266fac1..4a982673a 100755
--- a/core/lib/Thelia/Action/Order.php
+++ b/core/lib/Thelia/Action/Order.php
@@ -23,15 +23,17 @@
namespace Thelia\Action;
+use Propel\Runtime\Exception\PropelException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Thelia\Core\Event\CartEvent;
use Thelia\Core\Event\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
-use Thelia\Model\ProductPrice;
-use Thelia\Model\ProductPriceQuery;
-use Thelia\Model\CartItem;
-use Thelia\Model\CartItemQuery;
+use Thelia\Model\Base\AddressQuery;
+use Thelia\Model\ModuleQuery;
+use Thelia\Model\OrderStatus;
+use Thelia\Model\Map\OrderTableMap;
+use Thelia\Model\OrderAddress;
+use Thelia\Model\OrderStatusQuery;
use Thelia\Model\ConfigQuery;
/**
@@ -67,6 +69,135 @@ class Order extends BaseAction implements EventSubscriberInterface
$event->setOrder($order);
}
+ /**
+ * @param \Thelia\Core\Event\OrderEvent $event
+ */
+ public function setInvoiceAddress(OrderEvent $event)
+ {
+ $order = $event->getOrder();
+
+ $order->chosenInvoiceAddress = $event->getInvoiceAddress();
+
+ $event->setOrder($order);
+ }
+
+ /**
+ * @param \Thelia\Core\Event\OrderEvent $event
+ */
+ public function setPaymentModule(OrderEvent $event)
+ {
+ $order = $event->getOrder();
+
+ $order->setPaymentModuleId($event->getPaymentModule());
+
+ $event->setOrder($order);
+ }
+
+ /**
+ * @param \Thelia\Core\Event\OrderEvent $event
+ */
+ public function create(OrderEvent $event)
+ {
+ $con = \Propel\Runtime\Propel::getConnection(
+ OrderTableMap::DATABASE_NAME
+ );
+
+ $con->beginTransaction();
+
+ $sessionOrder = $event->getOrder();
+
+ /* use a copy to avoid errored reccord in session */
+ $placedOrder = $sessionOrder->copy();
+
+ $customer = $this->getSecurityContext()->getCustomerUser();
+ $currency = $this->getSession()->getCurrency();
+ $lang = $this->getSession()->getLang();
+ $deliveryAddress = AddressQuery::create()->findPk($sessionOrder->chosenDeliveryAddress);
+ $invoiceAddress = AddressQuery::create()->findPk($sessionOrder->chosenInvoiceAddress);
+
+ $paymentModule = ModuleQuery::findPk($placedOrder->getPaymentModuleId());
+
+ /* fulfill order */
+ $placedOrder->setCustomerId($customer->getId());
+ $placedOrder->setCurrencyId($currency->getId());
+ $placedOrder->setCurrencyRate($currency->getRate());
+ $placedOrder->setLangId($lang->getId());
+
+ /* hard save the delivery and invoice addresses */
+ $deliveryOrderAddress = new OrderAddress();
+ $deliveryOrderAddress
+ ->setCustomerTitleId($deliveryAddress->getTitleId())
+ ->setCompany($deliveryAddress->getCompany())
+ ->setFirstname($deliveryAddress->getFirstname())
+ ->setLastname($deliveryAddress->getLastname())
+ ->setAddress1($deliveryAddress->getAddress1())
+ ->setAddress2($deliveryAddress->getAddress2())
+ ->setAddress3($deliveryAddress->getAddress3())
+ ->setZipcode($deliveryAddress->getZipcode())
+ ->setCity($deliveryAddress->getCity())
+ ->setCountryId($deliveryAddress->getCountryId())
+ ->save($con)
+ ;
+
+ $invoiceOrderAddress = new OrderAddress();
+ $invoiceOrderAddress
+ ->setCustomerTitleId($invoiceAddress->getTitleId())
+ ->setCompany($invoiceAddress->getCompany())
+ ->setFirstname($invoiceAddress->getFirstname())
+ ->setLastname($invoiceAddress->getLastname())
+ ->setAddress1($invoiceAddress->getAddress1())
+ ->setAddress2($invoiceAddress->getAddress2())
+ ->setAddress3($invoiceAddress->getAddress3())
+ ->setZipcode($invoiceAddress->getZipcode())
+ ->setCity($invoiceAddress->getCity())
+ ->setCountryId($invoiceAddress->getCountryId())
+ ->save($con)
+ ;
+
+ $placedOrder->setDeliveryOrderAddressId($deliveryOrderAddress->getId());
+ $placedOrder->setInvoiceOrderAddressId($invoiceOrderAddress->getId());
+
+ $placedOrder->setStatusId(
+ OrderStatusQuery::create()->findOneByCode(OrderStatus::CODE_NOT_PAID)->getId()
+ );
+
+ $placedOrder->save($con);
+
+ /* fulfill order_products and decrease stock // @todo dispatch event */
+
+ /* discount @todo */
+
+ $con->commit();
+
+ /* T1style : dispatch mail event ? */
+
+ /* clear session ? */
+
+ /* call pay method */
+ $paymentModuleReflection = new \ReflectionClass($paymentModule->getFullNamespace());
+ $paymentModuleInstance = $paymentModuleReflection->newInstance();
+
+ $paymentModuleInstance->setRequest($this->request);
+ $paymentModuleInstance->setDispatcher($this->dispatcher);
+
+ $paymentModuleInstance->pay();
+ }
+
+ /**
+ * @param \Thelia\Core\Event\OrderEvent $event
+ */
+ public function setReference(OrderEvent $event)
+ {
+ $x = true;
+
+ $this->setRef($this->generateRef());
+ }
+
+ public function generateRef()
+ {
+ return sprintf('O', uniqid('', true), $this->getId());
+ }
+
/**
* Returns an array of event names this subscriber wants to listen to.
*
@@ -92,6 +223,40 @@ class Order extends BaseAction implements EventSubscriberInterface
return array(
TheliaEvents::ORDER_SET_DELIVERY_ADDRESS => array("setDeliveryAddress", 128),
TheliaEvents::ORDER_SET_DELIVERY_MODULE => array("setDeliveryModule", 128),
+ TheliaEvents::ORDER_SET_INVOICE_ADDRESS => array("setInvoiceAddress", 128),
+ TheliaEvents::ORDER_SET_PAYMENT_MODULE => array("setPaymentModule", 128),
+ TheliaEvents::ORDER_PAY => array("create", 128),
+ TheliaEvents::ORDER_SET_REFERENCE => array("setReference", 128),
);
}
+
+ /**
+ * Return the security context
+ *
+ * @return SecurityContext
+ */
+ protected function getSecurityContext()
+ {
+ return $this->container->get('thelia.securityContext');
+ }
+
+ /**
+ * @return \Symfony\Component\HttpFoundation\Request
+ */
+ protected function getRequest()
+ {
+ return $this->container->get('request');
+ }
+
+ /**
+ * Returns the session from the current request
+ *
+ * @return \Thelia\Core\HttpFoundation\Session\Session
+ */
+ protected function getSession()
+ {
+ $request = $this->getRequest();
+
+ return $request->getSession();
+ }
}
diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php
index cb7bb04df..69a07c157 100644
--- a/core/lib/Thelia/Action/Product.php
+++ b/core/lib/Thelia/Action/Product.php
@@ -44,6 +44,10 @@ use Thelia\Model\ProductCategory;
use Thelia\Model\TaxRule;
use Thelia\Model\TaxRuleQuery;
use Thelia\Model\TaxQuery;
+use Thelia\Model\AccessoryQuery;
+use Thelia\Model\Accessory;
+use Thelia\Core\Event\ProductAddAccessoryEvent;
+use Thelia\Core\Event\ProductDeleteAccessoryEvent;
class Product extends BaseAction implements EventSubscriberInterface
{
@@ -167,6 +171,7 @@ class Product extends BaseAction implements EventSubscriberInterface
$content = new ProductAssociatedContent();
$content
+ ->setDispatcher($this->getDispatcher())
->setProduct($event->getProduct())
->setContentId($event->getContentId())
->save()
@@ -181,9 +186,66 @@ class Product extends BaseAction implements EventSubscriberInterface
->filterByProduct($event->getProduct())->findOne()
;
- if ($content !== null) $content->delete();
+ if ($content !== null)
+ $content
+ ->setDispatcher($this->getDispatcher())
+ ->delete()
+ ;
}
+ public function addAccessory(ProductAddAccessoryEvent $event) {
+
+ if (AccessoryQuery::create()
+ ->filterByAccessory($event->getAccessoryId())
+ ->filterByProductId($event->getProduct()->getId())->count() <= 0) {
+
+ $accessory = new Accessory();
+
+ $accessory
+ ->setDispatcher($this->getDispatcher())
+ ->setProductId($event->getProduct()->getId())
+ ->setAccessory($event->getAccessoryId())
+ ->save()
+ ;
+ }
+ }
+
+ public function removeAccessory(ProductDeleteAccessoryEvent $event) {
+
+ $accessory = AccessoryQuery::create()
+ ->filterByAccessory($event->getAccessoryId())
+ ->filterByProductId($event->getProduct()->getId())->findOne()
+ ;
+
+ if ($accessory !== null)
+ $accessory
+ ->setDispatcher($this->getDispatcher())
+ ->delete()
+ ;
+ }
+
+
+ /**
+ * Changes position, selecting absolute ou relative change.
+ *
+ * @param ProductChangePositionEvent $event
+ */
+ public function updateAccessoryPosition(UpdatePositionEvent $event)
+ {
+ if (null !== $accessory = AccessoryQuery::create()->findPk($event->getObjectId())) {
+
+ $accessory->setDispatcher($this->getDispatcher());
+
+ $mode = $event->getMode();
+
+ if ($mode == UpdatePositionEvent::POSITION_ABSOLUTE)
+ return $accessory->changeAbsolutePosition($event->getPosition());
+ else if ($mode == UpdatePositionEvent::POSITION_UP)
+ return $accessory->movePositionUp();
+ else if ($mode == UpdatePositionEvent::POSITION_DOWN)
+ return $accessory->movePositionDown();
+ }
+ }
/**
* {@inheritDoc}
@@ -198,9 +260,12 @@ class Product extends BaseAction implements EventSubscriberInterface
TheliaEvents::PRODUCT_UPDATE_POSITION => array("updatePosition", 128),
- TheliaEvents::PRODUCT_ADD_CONTENT => array("addContent", 128),
- TheliaEvents::PRODUCT_REMOVE_CONTENT => array("removeContent", 128),
+ TheliaEvents::PRODUCT_ADD_CONTENT => array("addContent", 128),
+ TheliaEvents::PRODUCT_REMOVE_CONTENT => array("removeContent", 128),
+ TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION => array("updateAccessoryPosition", 128),
+ TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128),
+ TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128),
);
}
}
diff --git a/core/lib/Thelia/Cart/CartTrait.php b/core/lib/Thelia/Cart/CartTrait.php
index 8589f25b5..8ced1b6c1 100755
--- a/core/lib/Thelia/Cart/CartTrait.php
+++ b/core/lib/Thelia/Cart/CartTrait.php
@@ -139,4 +139,6 @@ trait CartTrait
return $id;
}
+
+ abstract public function getDispatcher();
}
diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml
index 6f8e838ed..876814d5d 100755
--- a/core/lib/Thelia/Config/Resources/config.xml
+++ b/core/lib/Thelia/Config/Resources/config.xml
@@ -18,7 +18,7 @@
-
+
@@ -31,6 +31,7 @@
+
@@ -101,6 +102,8 @@
+
+
@@ -227,6 +230,7 @@
+
diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml
index e09d24a90..4d176d2fc 100755
--- a/core/lib/Thelia/Config/Resources/routing/admin.xml
+++ b/core/lib/Thelia/Config/Resources/routing/admin.xml
@@ -24,6 +24,12 @@
Thelia\Controller\Admin\SessionController::checkLoginAction
+
+
+ Thelia\Controller\Admin\AdminController::updateAction
+
+
+
@@ -144,6 +150,8 @@
Thelia\Controller\Admin\ProductController::updatePositionAction
+
+
Thelia\Controller\Admin\ProductController::addRelatedContentAction
@@ -156,7 +164,33 @@
Thelia\Controller\Admin\ProductController::getAvailableRelatedContentAction
xml|json
-
+
+
+
+
+ Thelia\Controller\Admin\ProductController::addAccessoryAction
+
+
+
+ Thelia\Controller\Admin\ProductController::deleteAccessoryAction
+
+
+
+ Thelia\Controller\Admin\ProductController::getAvailableAccessoriesAction
+ xml|json
+
+
+
+ Thelia\Controller\Admin\ProductController::updateAccessoryPositionAction
+
+
+
+
+
+ Thelia\Controller\Admin\ProductController::updateAttributesAndFeaturesAction
+
+
+
Thelia\Controller\Admin\FolderController::indexAction
diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml
index c1e153af0..f254a817e 100755
--- a/core/lib/Thelia/Config/Resources/routing/front.xml
+++ b/core/lib/Thelia/Config/Resources/routing/front.xml
@@ -112,6 +112,9 @@
cart
+
+
+
Thelia\Controller\Front\OrderController::deliver
order_delivery
@@ -123,7 +126,7 @@
- Thelia\Controller\Front\OrderController::pay
+ Thelia\Controller\Front\OrderController::invoice
order_invoice
@@ -132,12 +135,9 @@
order_invoice
-
-
-
-
- Thelia\Controller\Front\DeliveryController::select
- \d+
+
+ Thelia\Controller\Front\OrderController::pay
+ order_payment
diff --git a/core/lib/Thelia/Controller/Admin/AdminController.php b/core/lib/Thelia/Controller/Admin/AdminController.php
index 2c252258d..2d3d80df1 100755
--- a/core/lib/Thelia/Controller/Admin/AdminController.php
+++ b/core/lib/Thelia/Controller/Admin/AdminController.php
@@ -33,4 +33,9 @@ class AdminController extends BaseAdminController
{
return $this->render("home");
}
+
+ public function updateAction()
+ {
+ return $this->render("profile-edit");
+ }
}
diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php
index 2dc57d3cb..27c559442 100644
--- a/core/lib/Thelia/Controller/Admin/ProductController.php
+++ b/core/lib/Thelia/Controller/Admin/ProductController.php
@@ -39,6 +39,10 @@ use Thelia\Model\FolderQuery;
use Thelia\Model\ContentQuery;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Model\ProductAssociatedContentQuery;
+use Thelia\Model\AccessoryQuery;
+use Thelia\Model\CategoryQuery;
+use Thelia\Core\Event\ProductAddAccessoryEvent;
+use Thelia\Core\Event\ProductDeleteAccessoryEvent;
/**
* Manages products
@@ -175,10 +179,11 @@ class ProductController extends AbstractCrudController
protected function getEditionArguments()
{
return array(
- 'category_id' => $this->getCategoryId(),
- 'product_id' => $this->getRequest()->get('product_id', 0),
- 'folder_id' => $this->getRequest()->get('folder_id', 0),
- 'current_tab' => $this->getRequest()->get('current_tab', 'general')
+ 'category_id' => $this->getCategoryId(),
+ 'product_id' => $this->getRequest()->get('product_id', 0),
+ 'folder_id' => $this->getRequest()->get('folder_id', 0),
+ 'accessory_category_id'=> $this->getRequest()->get('accessory_category_id', 0),
+ 'current_tab' => $this->getRequest()->get('current_tab', 'general')
);
}
@@ -275,6 +280,8 @@ class ProductController extends AbstractCrudController
);
}
+ // -- Related content management -------------------------------------------
+
public function getAvailableRelatedContentAction($productId, $folderId)
{
$result = array();
@@ -353,4 +360,118 @@ class ProductController extends AbstractCrudController
$this->redirectToEditionTemplate();
}
+
+
+ // -- Accessories management ----------------------------------------------
+
+ public function getAvailableAccessoriesAction($productId, $categoryId)
+ {
+ $result = array();
+
+ $categories = CategoryQuery::create()->filterById($categoryId)->find();
+
+ if ($categories !== null) {
+
+ $list = ProductQuery::create()
+ ->joinWithI18n($this->getCurrentEditionLocale())
+ ->filterByCategory($categories, Criteria::IN)
+ ->filterById(AccessoryQuery::create()->select('accessory')->findByProductId($productId), Criteria::NOT_IN)
+ ->find();
+ ;
+
+ if ($list !== null) {
+ foreach($list as $item) {
+ $result[] = array('id' => $item->getId(), 'title' => $item->getTitle());
+ }
+ }
+ }
+
+ return $this->jsonResponse(json_encode($result));
+ }
+
+ public function addAccessoryAction()
+ {
+ // Check current user authorization
+ if (null !== $response = $this->checkAuth("admin.products.update")) return $response;
+
+ $accessory_id = intval($this->getRequest()->get('accessory_id'));
+
+ if ($accessory_id > 0) {
+
+ $event = new ProductAddAccessoryEvent(
+ $this->getExistingObject(),
+ $accessory_id
+ );
+
+ try {
+ $this->dispatch(TheliaEvents::PRODUCT_ADD_ACCESSORY, $event);
+ }
+ catch (\Exception $ex) {
+ // Any error
+ return $this->errorPage($ex);
+ }
+ }
+
+ $this->redirectToEditionTemplate();
+ }
+
+ public function deleteAccessoryAction()
+ {
+
+ // Check current user authorization
+ if (null !== $response = $this->checkAuth("admin.products.update")) return $response;
+
+ $accessory_id = intval($this->getRequest()->get('accessory_id'));
+
+ if ($accessory_id > 0) {
+
+ $event = new ProductDeleteAccessoryEvent(
+ $this->getExistingObject(),
+ $accessory_id
+ );
+
+ try {
+ $this->dispatch(TheliaEvents::PRODUCT_REMOVE_ACCESSORY, $event);
+ }
+ catch (\Exception $ex) {
+ // Any error
+ return $this->errorPage($ex);
+ }
+ }
+
+ $this->redirectToEditionTemplate();
+ }
+
+ /**
+ * Update accessory position (only for objects whichsupport that)
+ */
+ public function updateAccessoryPositionAction()
+ {
+ // Check current user authorization
+ if (null !== $response = $this->checkAuth('admin.products.update')) return $response;
+
+ try {
+ $mode = $this->getRequest()->get('mode', null);
+
+ if ($mode == 'up')
+ $mode = UpdatePositionEvent::POSITION_UP;
+ else if ($mode == 'down')
+ $mode = UpdatePositionEvent::POSITION_DOWN;
+ else
+ $mode = UpdatePositionEvent::POSITION_ABSOLUTE;
+
+ $position = $this->getRequest()->get('position', null);
+
+ $event = new UpdatePositionEvent($mode, $position);
+
+ $this->dispatch(TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION, $event);
+ }
+ catch (\Exception $ex) {
+ // Any error
+ return $this->errorPage($ex);
+ }
+
+ $this->redirectToEditionTemplate();
+ }
+
}
diff --git a/core/lib/Thelia/Controller/Front/BaseFrontController.php b/core/lib/Thelia/Controller/Front/BaseFrontController.php
index 74e918b2d..b8a7c6a98 100755
--- a/core/lib/Thelia/Controller/Front/BaseFrontController.php
+++ b/core/lib/Thelia/Controller/Front/BaseFrontController.php
@@ -72,7 +72,13 @@ class BaseFrontController extends BaseController
if(null === $order || null === $order->chosenDeliveryAddress || null === $order->getDeliveryModuleId()) {
$this->redirectToRoute("order.delivery");
}
+ }
-
+ protected function checkValidInvoice()
+ {
+ $order = $this->getSession()->getOrder();
+ if(null === $order || null === $order->chosenInvoiceAddress || null === $order->getPaymentModuleId()) {
+ $this->redirectToRoute("order.invoice");
+ }
}
}
diff --git a/core/lib/Thelia/Controller/Front/OrderController.php b/core/lib/Thelia/Controller/Front/OrderController.php
index 75fa91b36..53d1e070b 100755
--- a/core/lib/Thelia/Controller/Front/OrderController.php
+++ b/core/lib/Thelia/Controller/Front/OrderController.php
@@ -121,7 +121,7 @@ class OrderController extends BaseFrontController
* set invoice address
* set payment module
*/
- public function pay()
+ public function invoice()
{
$this->checkAuth();
$this->checkCartNotEmpty();
@@ -134,23 +134,23 @@ class OrderController extends BaseFrontController
try {
$form = $this->validateForm($orderPayment, "post");
- $deliveryAddressId = $form->get("delivery-address")->getData();
- $deliveryModuleId = $form->get("delivery-module")->getData();
+ $invoiceAddressId = $form->get("invoice-address")->getData();
+ $paymentModuleId = $form->get("payment-module")->getData();
/* check that the invoice address belongs to the current customer */
- $deliveryAddress = AddressQuery::create()->findPk($deliveryAddressId);
- if($deliveryAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
+ $invoiceAddress = AddressQuery::create()->findPk($invoiceAddressId);
+ if($invoiceAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
throw new \Exception("Invoice address does not belong to the current customer");
}
$orderEvent = $this->getOrderEvent();
- $orderEvent->setInvoiceAddress($deliveryAddressId);
- $orderEvent->setPaymentModule($deliveryModuleId);
+ $orderEvent->setInvoiceAddress($invoiceAddressId);
+ $orderEvent->setPaymentModule($paymentModuleId);
- $this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_ADDRESS, $orderEvent);
- $this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_MODULE, $orderEvent);
+ $this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_INVOICE_ADDRESS, $orderEvent);
+ $this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_PAYMENT_MODULE, $orderEvent);
- $this->redirectToRoute("order.invoice");
+ $this->redirectToRoute("order.payment.process");
} catch (FormValidationException $e) {
$message = sprintf("Please check your input: %s", $e->getMessage());
@@ -161,7 +161,7 @@ class OrderController extends BaseFrontController
}
if ($message !== false) {
- Tlog::getInstance()->error(sprintf("Error during order delivery process : %s. Exception was %s", $message, $e->getMessage()));
+ Tlog::getInstance()->error(sprintf("Error during order payment process : %s. Exception was %s", $message, $e->getMessage()));
$orderPayment->setErrorMessage($message);
@@ -173,6 +173,25 @@ class OrderController extends BaseFrontController
}
+ public function pay()
+ {
+ /* check customer */
+ $this->checkAuth();
+
+ /* check cart count */
+ $this->checkCartNotEmpty();
+
+ /* check delivery address and module */
+ $this->checkValidDelivery();
+
+ /* check invoice address and payment module */
+ $this->checkValidInvoice();
+
+ $orderEvent = $this->getOrderEvent();
+
+ $this->getDispatcher()->dispatch(TheliaEvents::ORDER_PAY, $orderEvent);
+ }
+
protected function getOrderEvent()
{
$order = $this->getOrder($this->getRequest());
diff --git a/core/lib/Thelia/Controller/Front/DeliveryController.php b/core/lib/Thelia/Core/Event/AccessoryEvent.php
similarity index 70%
rename from core/lib/Thelia/Controller/Front/DeliveryController.php
rename to core/lib/Thelia/Core/Event/AccessoryEvent.php
index ef5913bc9..1e14e6fb7 100644
--- a/core/lib/Thelia/Controller/Front/DeliveryController.php
+++ b/core/lib/Thelia/Core/Event/AccessoryEvent.php
@@ -21,35 +21,34 @@
/* */
/*************************************************************************************/
-namespace Thelia\Controller\Front;
-use Thelia\Model\ModuleQuery;
-use Thelia\Tools\URL;
+namespace Thelia\Core\Event;
-/**
- * Class DeliveryController
- * @package Thelia\Controller\Front
- * @author Manuel Raynaud
- */
-class DeliveryController extends BaseFrontController
+use Thelia\Model\Accessory;
+use Thelia\Core\Event\ActionEvent;
+
+class AccessoryEvent extends ActionEvent
{
- public function select($delivery_id)
+ public $accessory = null;
+
+ public function __construct(Accessory $accessory = null)
{
- if ($this->getSecurityContext()->hasCustomerUser() === false) {
- $this->redirect(URL::getInstance()->getIndexPage());
- }
+ $this->accessory = $accessory;
+ }
- $request = $this->getRequest();
+ public function hasAccessory()
+ {
+ return ! is_null($this->accessory);
+ }
- $deliveryModule = ModuleQuery::create()
- ->filterById($delivery_id)
- ->filterByActivate(1)
- ->findOne()
- ;
+ public function getAccessory()
+ {
+ return $this->accessory;
+ }
- if ($deliveryModule) {
- $request->getSession()->setDelivery($delivery_id);
- } else {
- $this->pageNotFound();
- }
+ public function setAccessory(Accessory $accessory)
+ {
+ $this->accessory = $accessory;
+
+ return $this;
}
}
diff --git a/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php b/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php
new file mode 100644
index 000000000..1984a042c
--- /dev/null
+++ b/core/lib/Thelia/Core/Event/CategoryAssociatedContentEvent.php
@@ -0,0 +1,54 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Event;
+
+use Thelia\Model\CategoryAssociatedContent;
+use Thelia\Core\Event\ActionEvent;
+
+class CategoryAssociatedContentEvent extends ActionEvent
+{
+ public $content = null;
+
+ public function __construct(CategoryAssociatedContent $content = null)
+ {
+ $this->content = $content;
+ }
+
+ public function hasCategoryAssociatedContent()
+ {
+ return ! is_null($this->content);
+ }
+
+ public function getCategoryAssociatedContent()
+ {
+ return $this->content;
+ }
+
+ public function setCategoryAssociatedContent(CategoryAssociatedContent $content)
+ {
+ $this->content = $content;
+
+ return $this;
+ }
+}
diff --git a/core/lib/Thelia/Core/Event/OrderEvent.php b/core/lib/Thelia/Core/Event/OrderEvent.php
index 349fd53a1..a156b753f 100755
--- a/core/lib/Thelia/Core/Event/OrderEvent.php
+++ b/core/lib/Thelia/Core/Event/OrderEvent.php
@@ -33,6 +33,7 @@ class OrderEvent extends ActionEvent
protected $deliveryModule = null;
protected $paymentModule = null;
protected $postage = null;
+ protected $ref = null;
/**
* @param Order $order
@@ -55,7 +56,7 @@ class OrderEvent extends ActionEvent
*/
public function setInvoiceAddress($address)
{
- $this->deliveryAddress = $address;
+ $this->invoiceAddress = $address;
}
/**
@@ -90,6 +91,14 @@ class OrderEvent extends ActionEvent
$this->postage = $postage;
}
+ /**
+ * @param $ref
+ */
+ public function setRef($ref)
+ {
+ $this->ref = $ref;
+ }
+
/**
* @return null|Order
*/
@@ -137,4 +146,12 @@ class OrderEvent extends ActionEvent
{
return $this->postage;
}
+
+ /**
+ * @return null|int
+ */
+ public function getRef()
+ {
+ return $this->ref;
+ }
}
diff --git a/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php b/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php
new file mode 100644
index 000000000..d3f2ba19b
--- /dev/null
+++ b/core/lib/Thelia/Core/Event/ProductAddAccessoryEvent.php
@@ -0,0 +1,48 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Event;
+
+use Thelia\Model\Product;
+
+class ProductAddAccessoryEvent extends ProductEvent
+{
+ protected $accessory_id;
+
+ public function __construct(Product $product, $accessory_id)
+ {
+ parent::__construct($product);
+
+ $this->accessory_id = $accessory_id;
+ }
+
+ public function getAccessoryId()
+ {
+ return $this->accessory_id;
+ }
+
+ public function setAccessoryId($accessory_id)
+ {
+ $this->accessory_id = $accessory_id;
+ }
+}
diff --git a/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php b/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php
new file mode 100644
index 000000000..ba41b5ede
--- /dev/null
+++ b/core/lib/Thelia/Core/Event/ProductAssociatedContentEvent.php
@@ -0,0 +1,54 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Event;
+
+use Thelia\Model\ProductAssociatedContent;
+use Thelia\Core\Event\ActionEvent;
+
+class ProductAssociatedContentEvent extends ActionEvent
+{
+ public $content = null;
+
+ public function __construct(ProductAssociatedContent $content = null)
+ {
+ $this->content = $content;
+ }
+
+ public function hasProductAssociatedContent()
+ {
+ return ! is_null($this->content);
+ }
+
+ public function getProductAssociatedContent()
+ {
+ return $this->content;
+ }
+
+ public function setProductAssociatedContent(ProductAssociatedContent $content)
+ {
+ $this->content = $content;
+
+ return $this;
+ }
+}
diff --git a/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php b/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php
new file mode 100644
index 000000000..9644cdacc
--- /dev/null
+++ b/core/lib/Thelia/Core/Event/ProductDeleteAccessoryEvent.php
@@ -0,0 +1,48 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Event;
+
+use Thelia\Model\Product;
+
+class ProductDeleteAccessoryEvent extends ProductEvent
+{
+ protected $accessory_id;
+
+ public function __construct(Product $product, $accessory_id)
+ {
+ parent::__construct($product);
+
+ $this->accessory_id = $accessory_id;
+ }
+
+ public function getAccessoryId()
+ {
+ return $this->accessory_id;
+ }
+
+ public function setAccessoryId($accessory_id)
+ {
+ $this->accessory_id = $accessory_id;
+ }
+}
diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php
index 6a024f33b..75f5314f0 100755
--- a/core/lib/Thelia/Core/Event/TheliaEvents.php
+++ b/core/lib/Thelia/Core/Event/TheliaEvents.php
@@ -165,6 +165,17 @@ final class TheliaEvents
const BEFORE_UPDATECATEGORY = "action.before_updateCategory";
const AFTER_UPDATECATEGORY = "action.after_updateCategory";
+ // -- Categories Associated Content ----------------------------------------
+
+ const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent";
+ const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent";
+
+ const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContenty";
+ const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
+
+ const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent";
+ const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent";
+
// -- Product management -----------------------------------------------
const PRODUCT_CREATE = "action.createProduct";
@@ -176,6 +187,10 @@ final class TheliaEvents
const PRODUCT_ADD_CONTENT = "action.productAddContent";
const PRODUCT_REMOVE_CONTENT = "action.productRemoveContent";
+ const PRODUCT_ADD_ACCESSORY = "action.productAddAccessory";
+ const PRODUCT_REMOVE_ACCESSORY = "action.productRemoveAccessory";
+ const PRODUCT_UPDATE_ACCESSORY_POSITION = "action.updateProductPosition";
+
const BEFORE_CREATEPRODUCT = "action.before_createproduct";
const AFTER_CREATEPRODUCT = "action.after_createproduct";
@@ -185,6 +200,28 @@ final class TheliaEvents
const BEFORE_UPDATEPRODUCT = "action.before_updateProduct";
const AFTER_UPDATEPRODUCT = "action.after_updateProduct";
+ // -- Product Accessories --------------------------------------------------
+
+ const BEFORE_CREATEACCESSORY = "action.before_createAccessory";
+ const AFTER_CREATEACCESSORY = "action.after_createAccessory";
+
+ const BEFORE_DELETEACCESSORY = "action.before_deleteAccessory";
+ const AFTER_DELETEACCESSORY = "action.after_deleteAccessory";
+
+ const BEFORE_UPDATEACCESSORY = "action.before_updateAccessory";
+ const AFTER_UPDATEACCESSORY = "action.after_updateAccessory";
+
+ // -- Product Associated Content --------------------------------------------------
+
+ const BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.before_createProductAssociatedContent";
+ const AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.after_createProductAssociatedContent";
+
+ const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContenty";
+ const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
+
+ const BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.before_updateProductAssociatedContent";
+ const AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.after_updateProductAssociatedContent";
+
/**
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
*/
@@ -215,9 +252,12 @@ final class TheliaEvents
/**
* Order linked event
*/
- const ORDER_SET_BILLING_ADDRESS = "action.order.setBillingAddress";
const ORDER_SET_DELIVERY_ADDRESS = "action.order.setDeliveryAddress";
const ORDER_SET_DELIVERY_MODULE = "action.order.setDeliveryModule";
+ const ORDER_SET_INVOICE_ADDRESS = "action.order.setInvoiceAddress";
+ const ORDER_SET_PAYMENT_MODULE = "action.order.setPaymentModule";
+ const ORDER_PAY = "action.order.pay";
+ const ORDER_SET_REFERENCE = "action.order.setReference";
/**
* Sent on image processing
diff --git a/core/lib/Thelia/Core/Template/Element/BaseI18nLoop.php b/core/lib/Thelia/Core/Template/Element/BaseI18nLoop.php
index 283aad797..557c64901 100644
--- a/core/lib/Thelia/Core/Template/Element/BaseI18nLoop.php
+++ b/core/lib/Thelia/Core/Template/Element/BaseI18nLoop.php
@@ -65,6 +65,8 @@ abstract class BaseI18nLoop extends BaseLoop
{
/* manage translations */
+ $fr = $this->getForce_return();
+
return ModelCriteriaTools::getI18n(
$this->getBackend_context(),
$this->getLang(),
diff --git a/core/lib/Thelia/Core/Template/Loop/Accessory.php b/core/lib/Thelia/Core/Template/Loop/Accessory.php
index 69b2e09d9..6dc269b62 100755
--- a/core/lib/Thelia/Core/Template/Loop/Accessory.php
+++ b/core/lib/Thelia/Core/Template/Loop/Accessory.php
@@ -93,8 +93,10 @@ class Accessory extends Product
$accessories = $this->search($search);
$accessoryIdList = array(0);
+ $accessoryPosition = array();
foreach ($accessories as $accessory) {
array_push($accessoryIdList, $accessory->getAccessory());
+ $accessoryPosition[$accessory->getAccessory()] = $accessory->getPosition();
}
$receivedIdList = $this->getId();
@@ -106,7 +108,15 @@ class Accessory extends Product
$this->args->get('id')->setValue( implode(',', array_intersect($receivedIdList, $accessoryIdList)) );
}
- return parent::exec($pagination);
+ $loopResult = parent::exec($pagination);
+
+ foreach($loopResult as $loopResultRow) {
+ $loopResultRow
+ ->set("POSITION" , $accessoryPosition[$loopResultRow->get('ID')])
+ ;
+ }
+
+ return $loopResult;
}
}
diff --git a/core/lib/Thelia/Core/Template/Loop/Argument/Argument.php b/core/lib/Thelia/Core/Template/Loop/Argument/Argument.php
index 54c2e3bf2..418a76220 100755
--- a/core/lib/Thelia/Core/Template/Loop/Argument/Argument.php
+++ b/core/lib/Thelia/Core/Template/Loop/Argument/Argument.php
@@ -58,7 +58,19 @@ class Argument
public function setValue($value)
{
- $this->value = $value === null ? null : (string) $value;
+ $x = $value === null;
+
+ if($value === null) {
+ $this->value = null;
+ } else {
+ if(false === $value) {
+ /* (string) $value = "" */
+ $this->value = 0;
+ } else {
+ $this->value = (string) $value;
+ }
+ }
+ //$this->value = $value === null ? null : (string) $value;
}
public static function createAnyTypeArgument($name, $default=null, $mandatory=false, $empty=true)
diff --git a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php
index d85f75fa6..20fe5cb1e 100755
--- a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php
+++ b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php
@@ -97,9 +97,9 @@ class AssociatedContent extends Content
$exclude_product = $this->getExcludeProduct();
- // If we have to filter by template, find all attributes assigned to this template, and filter by found IDs
+ // If we have to filter by product, find all products assigned to this product, and filter by found IDs
if (null !== $exclude_product) {
- // Exclure tous les attribut qui sont attachés aux templates indiqués
+ // Exclude all contents related to the given product
$search->filterById(
ProductAssociatedContentQuery::create()->filterByProductId($exclude_product)->select('product_id')->find(),
Criteria::NOT_IN
@@ -108,7 +108,7 @@ class AssociatedContent extends Content
$exclude_category = $this->getExcludeCategory();
- // If we have to filter by template, find all attributes assigned to this template, and filter by found IDs
+ // If we have to filter by category, find all contents assigned to this category, and filter by found IDs
if (null !== $exclude_category) {
// Exclure tous les attribut qui sont attachés aux templates indiqués
$search->filterById(
diff --git a/core/lib/Thelia/Core/Template/Loop/Cart.php b/core/lib/Thelia/Core/Template/Loop/Cart.php
index 3c8724d68..16c108135 100755
--- a/core/lib/Thelia/Core/Template/Loop/Cart.php
+++ b/core/lib/Thelia/Core/Template/Loop/Cart.php
@@ -110,4 +110,13 @@ class Cart extends BaseLoop
return $result;
}
+ /**
+ * Return the event dispatcher,
+ *
+ * @return \Symfony\Component\EventDispatcher\EventDispatcher
+ */
+ public function getDispatcher()
+ {
+ return $this->dispatcher;
+ }
}
diff --git a/core/lib/Thelia/Core/Template/Loop/FolderTree.php b/core/lib/Thelia/Core/Template/Loop/FolderTree.php
new file mode 100644
index 000000000..9549f2467
--- /dev/null
+++ b/core/lib/Thelia/Core/Template/Loop/FolderTree.php
@@ -0,0 +1,118 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Template\Loop;
+use Propel\Runtime\ActiveQuery\Criteria;
+use Thelia\Core\Template\Element\LoopResult;
+use Thelia\Core\Template\Element\LoopResultRow;
+
+use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
+use Thelia\Core\Template\Loop\Argument\Argument;
+
+use Thelia\Model\FolderQuery;
+use Thelia\Type;
+use Thelia\Type\BooleanOrBothType;
+use Thelia\Core\Template\Element\BaseI18nLoop;
+
+/**
+ *
+ * Folder tree loop, to get a folder tree from a given folder to a given depth.
+ *
+ * - folder is the folder id
+ * - depth is the maximum depth to go, default unlimited
+ * - visible if true or missing, only visible categories will be displayed. If false, all categories (visible or not) are returned.
+ *
+ * @package Thelia\Core\Template\Loop
+ * @author Franck Allimant
+ */
+class FolderTree extends BaseI18nLoop
+{
+ /**
+ * @return ArgumentCollection
+ */
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntTypeArgument('folder', null, true),
+ Argument::createIntTypeArgument('depth', PHP_INT_MAX),
+ Argument::createBooleanOrBothTypeArgument('visible', true, false),
+ Argument::createIntListTypeArgument('exclude', array())
+ );
+ }
+
+ // changement de rubrique
+ protected function buildFolderTree($parent, $visible, $level, $max_level, $exclude, LoopResult &$loopResult)
+ {
+ if ($level > $max_level) return;
+
+ $search = FolderQuery::create();
+
+ $locale = $this->configureI18nProcessing($search, array(
+ 'TITLE'
+ ));
+
+ $search->filterByParent($parent);
+
+ if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible);
+
+ if ($exclude != null) $search->filterById($exclude, Criteria::NOT_IN);
+
+ $search->orderByPosition(Criteria::ASC);
+
+ $results = $search->find();
+
+ foreach ($results as $result) {
+
+ $loopResultRow = new LoopResultRow();
+
+ $loopResultRow
+ ->set("ID", $result->getId())->set("TITLE", $result->getVirtualColumn('i18n_TITLE'))
+ ->set("PARENT", $result->getParent())->set("URL", $result->getUrl($locale))
+ ->set("VISIBLE", $result->getVisible() ? "1" : "0")->set("LEVEL", $level)
+ ;
+
+ $loopResult->addRow($loopResultRow);
+
+ $this->buildFolderTree($result->getId(), $visible, 1 + $level, $max_level, $exclude, $loopResult);
+ }
+ }
+
+ /**
+ * @param $pagination (ignored)
+ *
+ * @return \Thelia\Core\Template\Element\LoopResult
+ */
+ public function exec(&$pagination)
+ {
+ $id = $this->getFolder();
+ $depth = $this->getDepth();
+ $visible = $this->getVisible();
+ $exclude = $this->getExclude();
+
+ $loopResult = new LoopResult();
+
+ $this->buildFolderTree($id, $visible, 0, $depth, $exclude, $loopResult);
+
+ return $loopResult;
+ }
+}
diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php
index ffad52785..fe203e7b8 100755
--- a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php
+++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php
@@ -24,6 +24,7 @@
namespace Thelia\Core\Template\Smarty\Plugins;
use Propel\Runtime\ActiveQuery\ModelCriteria;
+use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
use Thelia\Core\Security\SecurityContext;
@@ -53,12 +54,14 @@ class DataAccessFunctions extends AbstractSmartyPlugin
private $securityContext;
protected $parserContext;
protected $request;
+ protected $dispatcher;
- public function __construct(Request $request, SecurityContext $securityContext, ParserContext $parserContext)
+ public function __construct(Request $request, SecurityContext $securityContext, ParserContext $parserContext, ContainerAwareEventDispatcher $dispatcher)
{
$this->securityContext = $securityContext;
$this->parserContext = $parserContext;
$this->request = $request;
+ $this->dispatcher = $dispatcher;
}
/**
@@ -195,6 +198,12 @@ class DataAccessFunctions extends AbstractSmartyPlugin
return $order->getPostage();
case 'delivery_address':
return $order->chosenDeliveryAddress;
+ case 'invoice_address':
+ return $order->chosenInvoiceAddress;
+ case 'delivery_module':
+ return $order->getDeliveryModuleId();
+ case 'payment_module':
+ return $order->getPaymentModuleId();
}
throw new \InvalidArgumentException(sprintf("%s has no '%s' attribute", 'Order', $attribute));
@@ -320,4 +329,14 @@ class DataAccessFunctions extends AbstractSmartyPlugin
new SmartyPluginDescriptor('function', 'order', $this, 'orderDataAccess'),
);
}
+
+ /**
+ * Return the event dispatcher,
+ *
+ * @return \Symfony\Component\EventDispatcher\EventDispatcher
+ */
+ public function getDispatcher()
+ {
+ return $this->dispatcher;
+ }
}
diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php
index 37801f4c8..bd2c10513 100755
--- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php
+++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php
@@ -132,6 +132,8 @@ class TheliaLoop extends AbstractSmartyPlugin
$loopResults = $loop->exec(self::$pagination[$name]);
+ $loopResults->rewind();
+
$this->loopstack[$name] = $loopResults;
// Pas de résultat ? la boucle est terminée, ne pas évaluer le contenu.
diff --git a/core/lib/Thelia/Coupon/CouponBaseAdapter.php b/core/lib/Thelia/Coupon/CouponBaseAdapter.php
index f9fae8651..046b4ac81 100644
--- a/core/lib/Thelia/Coupon/CouponBaseAdapter.php
+++ b/core/lib/Thelia/Coupon/CouponBaseAdapter.php
@@ -266,4 +266,14 @@ class CouponBaseAdapter implements CouponAdapterInterface
{
return $this->container->get('thelia.constraint.validator');
}
+
+ /**
+ * Return the event dispatcher,
+ *
+ * @return \Symfony\Component\EventDispatcher\EventDispatcher
+ */
+ public function getDispatcher()
+ {
+ return $this->container->get('event_dispatcher');
+ }
}
diff --git a/core/lib/Thelia/Form/OrderDelivery.php b/core/lib/Thelia/Form/OrderDelivery.php
index 3ef1444f6..e23ae92b2 100755
--- a/core/lib/Thelia/Form/OrderDelivery.php
+++ b/core/lib/Thelia/Form/OrderDelivery.php
@@ -85,6 +85,13 @@ class OrderDelivery extends BaseForm
if(null === $module) {
$context->addViolation("Delivery module ID not found");
}
+
+ $moduleReflection = new \ReflectionClass($module->getFullNamespace());
+ if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
+ $context->addViolation(
+ sprintf("delivery module %s is not a Thelia\Module\DeliveryModuleInterface", $module->getCode())
+ );
+ }
}
public function getName()
diff --git a/core/lib/Thelia/Form/OrderPayment.php b/core/lib/Thelia/Form/OrderPayment.php
index d3ebe4daf..6a6305971 100755
--- a/core/lib/Thelia/Form/OrderPayment.php
+++ b/core/lib/Thelia/Form/OrderPayment.php
@@ -80,11 +80,18 @@ class OrderPayment extends BaseForm
->filterByType(BaseModule::PAYMENT_MODULE_TYPE)
->filterByActivate(1)
->filterById($value)
- ->find();
+ ->findOne();
if(null === $module) {
$context->addViolation("Payment module ID not found");
}
+
+ $moduleReflection = new \ReflectionClass($module->getFullNamespace());
+ if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
+ $context->addViolation(
+ sprintf("delivery module %s is not a Thelia\Module\PaymentModuleInterface", $module->getCode())
+ );
+ }
}
public function getName()
diff --git a/core/lib/Thelia/Form/ProductCreationForm.php b/core/lib/Thelia/Form/ProductCreationForm.php
index a4ffdde32..9329ca2ec 100644
--- a/core/lib/Thelia/Form/ProductCreationForm.php
+++ b/core/lib/Thelia/Form/ProductCreationForm.php
@@ -43,35 +43,29 @@ class ProductCreationForm extends BaseForm
$this->formBuilder
->add("ref", "text", array(
"constraints" => $ref_constraints,
- "label" => "Product reference *",
- "label_attr" => array(
- "for" => "ref"
- )
+ "label" => "Product reference *",
+ "label_attr" => array("for" => "ref")
))
->add("title", "text", array(
"constraints" => array(
new NotBlank()
),
"label" => "Product title *",
- "label_attr" => array(
- "for" => "title"
- )
+ "label_attr" => array("for" => "title")
))
->add("default_category", "integer", array(
- "constraints" => array(
- new NotBlank()
- )
+ "constraints" => array(new NotBlank()),
+ "label" => Translator::getInstance()->trans("Default product category."),
+ "label_attr" => array("for" => "default_category_field")
))
->add("locale", "text", array(
- "constraints" => array(
- new NotBlank()
- )
+ "constraints" => array(new NotBlank())
))
->add("visible", "integer", array(
- "label" => Translator::getInstance()->trans("This product is online."),
- "label_attr" => array("for" => "visible_create")
+ "label" => Translator::getInstance()->trans("This product is online."),
+ "label_attr" => array("for" => "visible_field")
))
- ;
+ ;
}
public function checkDuplicateRef($value, ExecutionContextInterface $context)
diff --git a/core/lib/Thelia/Form/ProfileModificationForm.php b/core/lib/Thelia/Form/ProfileModificationForm.php
new file mode 100644
index 000000000..e3119cfee
--- /dev/null
+++ b/core/lib/Thelia/Form/ProfileModificationForm.php
@@ -0,0 +1,119 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Form;
+
+use Symfony\Component\Validator\Constraints;
+use Thelia\Core\Translation\Translator;
+use Thelia\Model\ConfigQuery;
+
+/**
+ * Class ProfileModification
+ * @package Thelia\Form
+ * @author Manuel Raynaud
+ */
+class ProfileModificationForm extends BaseForm
+{
+
+
+ protected function buildForm()
+ {
+
+ $this->formBuilder
+ ->add("firstname", "text", array(
+ "constraints" => array(
+ new Constraints\NotBlank()
+ ),
+ "label" => Translator::getInstance()->trans("First Name"),
+ "label_attr" => array(
+ "for" => "firstname"
+ )
+ ))
+ ->add("lastname", "text", array(
+ "constraints" => array(
+ new Constraints\NotBlank()
+ ),
+ "label" => Translator::getInstance()->trans("Last Name"),
+ "label_attr" => array(
+ "for" => "lastname"
+ )
+ ))
+ ->add("default_language", "text", array(
+ "constraints" => array(
+ new Constraints\NotBlank()
+ ),
+ "label" => Translator::getInstance()->trans("Default language"),
+ "label_attr" => array(
+ "for" => "default_language"
+ )
+ ))
+ ->add("editing_language_default", "text", array(
+ "constraints" => array(
+ new Constraints\NotBlank()
+ ),
+ "label" => Translator::getInstance()->trans("Editing language default"),
+ "label_attr" => array(
+ "for" => "editing_language_default"
+ )
+ ))
+ ->add("old_password", "password", array(
+ "constraints" => array(
+ new Constraints\NotBlank(),
+ new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
+ ),
+ "label" => Translator::getInstance()->trans("Old password"),
+ "label_attr" => array(
+ "for" => "old_password"
+ )
+ ))
+ ->add("password", "password", array(
+ "constraints" => array(
+ new Constraints\NotBlank(),
+ new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
+ ),
+ "label" => Translator::getInstance()->trans("Password"),
+ "label_attr" => array(
+ "for" => "password"
+ )
+ ))
+ ->add("password_confirm", "password", array(
+ "constraints" => array(
+ new Constraints\NotBlank(),
+ new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4))),
+ new Constraints\Callback(array("methods" => array(
+ array($this, "verifyPasswordField")
+ )))
+ ),
+ "label" => "Password confirmation",
+ "label_attr" => array(
+ "for" => "password_confirmation"
+ )
+ ))
+ ;
+ }
+
+ public function getName()
+ {
+ return "thelia_profile_modification";
+ }
+}
diff --git a/core/lib/Thelia/Model/Accessory.php b/core/lib/Thelia/Model/Accessory.php
index 2e927ff7c..f24aab680 100755
--- a/core/lib/Thelia/Model/Accessory.php
+++ b/core/lib/Thelia/Model/Accessory.php
@@ -3,7 +3,77 @@
namespace Thelia\Model;
use Thelia\Model\Base\Accessory as BaseAccessory;
+use Thelia\Core\Event\TheliaEvents;
+use Propel\Runtime\Connection\ConnectionInterface;
+use Thelia\Core\Event\AccessoryEvent;
class Accessory extends BaseAccessory {
+ use \Thelia\Model\Tools\ModelEventDispatcherTrait;
+
+ use \Thelia\Model\Tools\PositionManagementTrait;
+
+ /**
+ * Calculate next position relative to our product
+ */
+ protected function addCriteriaToPositionQuery($query) {
+ $query->filterByProductId($this->getProductId());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preInsert(ConnectionInterface $con = null)
+ {
+ $this->setPosition($this->getNextPosition());
+
+ $this->dispatchEvent(TheliaEvents::BEFORE_CREATEACCESSORY, new AccessoryEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_CREATEACCESSORY, new AccessoryEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_UPDATEACCESSORY, new AccessoryEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_UPDATEACCESSORY, new AccessoryEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_DELETEACCESSORY, new AccessoryEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_DELETEACCESSORY, new AccessoryEvent($this));
+ }
+
}
diff --git a/core/lib/Thelia/Model/CategoryAssociatedContent.php b/core/lib/Thelia/Model/CategoryAssociatedContent.php
index 9296e6274..9154767bc 100644
--- a/core/lib/Thelia/Model/CategoryAssociatedContent.php
+++ b/core/lib/Thelia/Model/CategoryAssociatedContent.php
@@ -3,7 +3,66 @@
namespace Thelia\Model;
use Thelia\Model\Base\CategoryAssociatedContent as BaseCategoryAssociatedContent;
+use Thelia\Core\Event\CategoryAssociatedContentEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Propel\Runtime\Connection\ConnectionInterface;
class CategoryAssociatedContent extends BaseCategoryAssociatedContent {
+ use \Thelia\Model\Tools\ModelEventDispatcherTrait;
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_CREATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_DELETECATEGORY_ASSOCIATED_CONTENT, new CategoryAssociatedContentEvent($this));
+ }
+
}
diff --git a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
index bc283a3e8..f29ed9464 100644
--- a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
+++ b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
@@ -150,7 +150,7 @@ class OrderStatusTableMap extends TableMap
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
- $this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null);
+ $this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
} // initialize()
diff --git a/core/lib/Thelia/Model/Map/OrderTableMap.php b/core/lib/Thelia/Model/Map/OrderTableMap.php
index ae43bd768..7daabb665 100644
--- a/core/lib/Thelia/Model/Map/OrderTableMap.php
+++ b/core/lib/Thelia/Model/Map/OrderTableMap.php
@@ -215,7 +215,7 @@ class OrderTableMap extends TableMap
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
$this->addForeignKey('INVOICE_ORDER_ADDRESS_ID', 'InvoiceOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
$this->addForeignKey('DELIVERY_ORDER_ADDRESS_ID', 'DeliveryOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
- $this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', true, null, null);
+ $this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', false, null, null);
$this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', true, null, null);
$this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', true, null, null);
$this->addColumn('TRANSACTION_REF', 'TransactionRef', 'VARCHAR', false, 100, null);
diff --git a/core/lib/Thelia/Model/Order.php b/core/lib/Thelia/Model/Order.php
index e2eb43971..c5d03b7e7 100755
--- a/core/lib/Thelia/Model/Order.php
+++ b/core/lib/Thelia/Model/Order.php
@@ -2,13 +2,28 @@
namespace Thelia\Model;
+use Propel\Runtime\Connection\ConnectionInterface;
+use Thelia\Core\Event\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Base\Order as BaseOrder;
class Order extends BaseOrder
{
+ use \Thelia\Model\Tools\ModelEventDispatcherTrait;
+
public $chosenDeliveryAddress = null;
public $chosenInvoiceAddress = null;
+ /**
+ * {@inheritDoc}
+ */
+ public function preInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::ORDER_SET_REFERENCE, new OrderEvent($this));
+
+ return true;
+ }
+
/**
* calculate the total amount
*
diff --git a/core/lib/Thelia/Model/OrderStatus.php b/core/lib/Thelia/Model/OrderStatus.php
index 2927019d0..f78e9c79d 100755
--- a/core/lib/Thelia/Model/OrderStatus.php
+++ b/core/lib/Thelia/Model/OrderStatus.php
@@ -4,6 +4,11 @@ namespace Thelia\Model;
use Thelia\Model\Base\OrderStatus as BaseOrderStatus;
-class OrderStatus extends BaseOrderStatus {
-
+class OrderStatus extends BaseOrderStatus
+{
+ const CODE_NOT_PAID = "not_paid";
+ const CODE_PAID = "paid";
+ const CODE_PROCESSED = "processed";
+ const CODE_SENT = "sent";
+ const CODE_CANCELED = "canceled";
}
diff --git a/core/lib/Thelia/Model/ProductAssociatedContent.php b/core/lib/Thelia/Model/ProductAssociatedContent.php
index 9b007baf1..e07ee2cd6 100644
--- a/core/lib/Thelia/Model/ProductAssociatedContent.php
+++ b/core/lib/Thelia/Model/ProductAssociatedContent.php
@@ -3,7 +3,65 @@
namespace Thelia\Model;
use Thelia\Model\Base\ProductAssociatedContent as BaseProductAssociatedContent;
+use Propel\Runtime\Connection\ConnectionInterface;
+use Thelia\Core\Event\ProductAssociatedContentEvent;
+use Thelia\Core\Event\TheliaEvents;
class ProductAssociatedContent extends BaseProductAssociatedContent {
+ use \Thelia\Model\Tools\ModelEventDispatcherTrait;
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT, new ProductAssociatedContentEvent($this));
+ }
}
diff --git a/core/lib/Thelia/Module/BaseModule.php b/core/lib/Thelia/Module/BaseModule.php
index 56b2c23af..f559c1fd5 100755
--- a/core/lib/Thelia/Module/BaseModule.php
+++ b/core/lib/Thelia/Module/BaseModule.php
@@ -105,7 +105,7 @@ abstract class BaseModule extends ContainerAware
$image = new ModuleImage();
$image->setModuleId($module->getId());
$image->setPosition($imagePosition);
- $image->save();
+ $image->save($con);
$imageDirectory = sprintf("%s/../../../../local/media/images/module", __DIR__);
$imageFileName = sprintf("%s-%d-%s", $module->getCode(), $image->getId(), $fileName);
@@ -131,7 +131,7 @@ abstract class BaseModule extends ContainerAware
}
$image->setFile($imageFileName);
- $image->save();
+ $image->save($con);
$con->commit();
$imagePosition++;
diff --git a/install/insert.sql b/install/insert.sql
index f44374d4b..aa7573d12 100755
--- a/install/insert.sql
+++ b/install/insert.sql
@@ -1167,3 +1167,22 @@ INSERT INTO `tax_rule_i18n` (`id`, `locale`, `title`)
INSERT INTO `tax_rule_country` (`tax_rule_id`, `country_id`, `tax_id`, `position`, `created_at`, `updated_at`)
VALUES
(1, 64, 1, 1, NOW(), NOW());
+
+INSERT INTO `order_status`(`id`, `code`, `created_at`, `updated_at`) VALUES
+(1, 'not_paid', NOW(), NOW()),
+(2, 'paid', NOW(), NOW()),
+(3, 'processing', NOW(), NOW()),
+(4, 'sent', NOW(), NOW()),
+(5, 'canceled', NOW(), NOW());
+
+INSERT INTO `order_status_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
+(1, 'en_US', 'Not paid', '', '', ''),
+(1, 'fr_FR', 'Non payée', '', '', ''),
+(2, 'en_US', 'Paid', '', '', ''),
+(2, 'fr_FR', 'Payée', '', '', ''),
+(3, 'en_US', 'Processing', '', '', ''),
+(3, 'fr_FR', 'Traitement', '', '', ''),
+(4, 'en_US', 'Sent', '', '', ''),
+(4, 'fr_FR', 'Envoyée', '', '', ''),
+(5, 'en_US', 'Canceled', '', '', ''),
+(5, 'fr_FR', 'Annulée', '', '', '');
diff --git a/install/thelia.sql b/install/thelia.sql
index 398cb04c2..bd983d26d 100755
--- a/install/thelia.sql
+++ b/install/thelia.sql
@@ -641,7 +641,7 @@ CREATE TABLE `order`
`customer_id` INTEGER NOT NULL,
`invoice_order_address_id` INTEGER NOT NULL,
`delivery_order_address_id` INTEGER NOT NULL,
- `invoice_date` DATE NOT NULL,
+ `invoice_date` DATE,
`currency_id` INTEGER NOT NULL,
`currency_rate` FLOAT NOT NULL,
`transaction_ref` VARCHAR(100) COMMENT 'transaction reference - usually use to identify a transaction with banking modules',
@@ -788,10 +788,11 @@ DROP TABLE IF EXISTS `order_status`;
CREATE TABLE `order_status`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
- `code` VARCHAR(45),
+ `code` VARCHAR(45) NOT NULL,
`created_at` DATETIME,
`updated_at` DATETIME,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ UNIQUE INDEX `code_UNIQUE` (`code`)
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
diff --git a/local/config/schema.xml b/local/config/schema.xml
index f33cedbe5..b767580ef 100755
--- a/local/config/schema.xml
+++ b/local/config/schema.xml
@@ -500,7 +500,7 @@
-
+
@@ -613,11 +613,14 @@
-
+
+
+
+
diff --git a/local/modules/Cheque/Cheque.php b/local/modules/Cheque/Cheque.php
index d6b462194..f4438db4e 100755
--- a/local/modules/Cheque/Cheque.php
+++ b/local/modules/Cheque/Cheque.php
@@ -56,7 +56,7 @@ class Cheque extends BaseModule implements PaymentModuleInterface
public function pay()
{
- // TODO: Implement pay() method.
+ // no special process, waiting for the cheque.
}
public function install()
diff --git a/templates/admin/default/admin-layout.tpl b/templates/admin/default/admin-layout.tpl
index 8221fa90a..553466def 100644
--- a/templates/admin/default/admin-layout.tpl
+++ b/templates/admin/default/admin-layout.tpl
@@ -51,27 +51,27 @@
-
-
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
+
+
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
+
+
+
{module_include location='inside_topbar'}
-
-
+
@@ -86,96 +86,98 @@
+
+
+
-
+
+
-
-
+
-
+ {loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
+
+ {/loop}
- {loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
-
+ {loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
+
+ {/loop}
+
+ {loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
+
+ {/loop}
+
+ {loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"}
+
+ {/loop}
+
+ {loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
+
+ {/loop}
+
+ {loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
+
+ {/loop}
+
+ {loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
+
+
+ {module_include location='in_top_menu_items'}
+
+ {/loop}
+
+
+ {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
+
{/loop}
- {loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
-
- {/loop}
-
- {loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
-
- {/loop}
-
- {loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"}
-
- {/loop}
-
- {loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
-
- {/loop}
-
- {loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
-
- {/loop}
-
- {loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
-
-
- {module_include location='in_top_menu_items'}
-
- {/loop}
-
-
- {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
-
- {/loop}
-
-
+
+
diff --git a/templates/admin/default/ajax/template-attribute-list.html b/templates/admin/default/ajax/template-attribute-list.html
index 772ed5883..a630aaa61 100644
--- a/templates/admin/default/ajax/template-attribute-list.html
+++ b/templates/admin/default/ajax/template-attribute-list.html
@@ -25,7 +25,8 @@
{/elseloop}
-
+
+
{intl l='ID'}
@@ -72,7 +73,7 @@
{/elseloop}
-
+
{* Delete value confirmation dialog *}
{capture "delete_attribute_dialog"}
diff --git a/templates/admin/default/ajax/template-feature-list.html b/templates/admin/default/ajax/template-feature-list.html
index a20ff7125..58bb4cf8b 100644
--- a/templates/admin/default/ajax/template-feature-list.html
+++ b/templates/admin/default/ajax/template-feature-list.html
@@ -25,7 +25,8 @@
{/elseloop}
-
+
+
{intl l='ID'}
@@ -72,6 +73,7 @@
{/elseloop}
+
{* Delete value confirmation dialog *}
diff --git a/templates/admin/default/assets/less/thelia/grid.less b/templates/admin/default/assets/less/thelia/grid.less
new file mode 100644
index 000000000..6ea63b46b
--- /dev/null
+++ b/templates/admin/default/assets/less/thelia/grid.less
@@ -0,0 +1,11 @@
+@media (max-width: @screen-desktop) {
+
+ .navbar-form{
+ width: 100%;
+
+ .form-group{
+ width: 94%;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/templates/admin/default/assets/less/thelia/navbar.less b/templates/admin/default/assets/less/thelia/navbar.less
index 26f9cd569..a0080e775 100755
--- a/templates/admin/default/assets/less/thelia/navbar.less
+++ b/templates/admin/default/assets/less/thelia/navbar.less
@@ -30,4 +30,8 @@
.navbar-default .navbar-toggle .icon-bar{
background-color: @btn-primary-color;
+}
+
+.navbar-form{
+ padding: 0;
}
\ No newline at end of file
diff --git a/templates/admin/default/assets/less/thelia/tables.less b/templates/admin/default/assets/less/thelia/tables.less
index 8a4baa897..e542786ec 100755
--- a/templates/admin/default/assets/less/thelia/tables.less
+++ b/templates/admin/default/assets/less/thelia/tables.less
@@ -1,3 +1,22 @@
+// Baseline styles
+
+.table {
+
+ // Cells
+ thead,
+ tbody,
+ tfoot {
+ > tr {
+ > th,
+ > td {
+ vertical-align: middle;
+ }
+ }
+ }
+
+}
+
+
tfoot{
.pagination{
diff --git a/templates/admin/default/assets/less/thelia/thelia.less b/templates/admin/default/assets/less/thelia/thelia.less
index 466f9d419..822130a5c 100644
--- a/templates/admin/default/assets/less/thelia/thelia.less
+++ b/templates/admin/default/assets/less/thelia/thelia.less
@@ -2,6 +2,7 @@
@import "navbar.less";
@import "scaffolding.less";
@import "type.less";
+@import "grid.less";
@import "breadcrumbs.less";
@import "forms.less";
@import "datepicker.less";
diff --git a/templates/admin/default/attribute-edit.html b/templates/admin/default/attribute-edit.html
index 882edd60c..676a99baa 100644
--- a/templates/admin/default/attribute-edit.html
+++ b/templates/admin/default/attribute-edit.html
@@ -77,95 +77,97 @@
{intl l="Enter here all possible attribute values."}
+
+
+
+
+
+
+ {admin_sortable_header
+ current_order=$attributeav_order
+ order='id'
+ reverse_order='id_reverse'
+ request_parameter_name='attributeav_order'
+ path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
+ label="{intl l='ID'}"
+ }
+
-
+ {elseloop rel="list"}
+
+
+
+ {intl l="No value has been created yet. Click the + button to create one."}
+
+
+
+ {/elseloop}
+
+
+
{/form}
diff --git a/templates/admin/default/attributes.html b/templates/admin/default/attributes.html
index 348219f5c..c207d02fa 100644
--- a/templates/admin/default/attributes.html
+++ b/templates/admin/default/attributes.html
@@ -21,117 +21,119 @@
diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html
index 3c2e6f00a..990cafd56 100755
--- a/templates/admin/default/categories.html
+++ b/templates/admin/default/categories.html
@@ -15,163 +15,164 @@
-
-
-
-
- {* display parent category name, and get current cat ID *}
- {loop name="category_title" type="category" visible="*" id=$category_id}
- {intl l="Categories in %cat" cat=$TITLE}
- {$cat_id = $ID}
- {/loop}
- {elseloop rel="category_title"}
- {intl l="Top level categories"}
- {/elseloop}
-
- {module_include location='category_list_caption'}
-
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
-
-
-
- {/loop}
-
-
- {ifloop rel="category_list"}
-
-
-
- {admin_sortable_header
- current_order=$category_order
- order='id'
- reverse_order='id_reverse'
- path={url path='/admin/categories' id_category=$category_id}
- request_parameter_name='category_order'
- label="{intl l='ID'}"
- }
-
-
-
-
-
- {admin_sortable_header
- current_order=$category_order
- order='alpha'
- reverse_order='alpha_reverse'
- path={url path='/admin/categories' id_category=$category_id}
- request_parameter_name='category_order'
- label="{intl l='Category title'}"
- }
-
-
- {module_include location='category_list_header'}
-
-
- {admin_sortable_header
- current_order=$category_order
- order='visible'
- reverse_order='visible_reverse'
- path={url path='/admin/categories' id_category=$category_id}
- request_parameter_name='category_order'
- label="{intl l='Online'}"
- }
-
-
-
- {admin_sortable_header
- current_order=$category_order
- order='manual'
- reverse_order='manual_reverse'
- path={url path='/admin/categories' id_category=$category_id}
- request_parameter_name='category_order'
- label="{intl l='Position'}"
- }
-
-
- {intl l='Actions'}
-
-
-
-
- {loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
-
- {$ID}
-
-
- {loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
-
- {/loop}
-
-
-
-
- {$TITLE}
-
-
-
- {module_include location='category_list_row'}
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
-
-
-
+
+
+
+
+ {* display parent category name, and get current cat ID *}
+ {loop name="category_title" type="category" visible="*" id=$category_id}
+ {intl l="Categories in %cat" cat=$TITLE}
+ {$cat_id = $ID}
{/loop}
-
- {elseloop rel="can_change"}
-
-
-
+ {elseloop rel="category_title"}
+ {intl l="Top level categories"}
{/elseloop}
-
-
- {admin_position_block
- permission="admin.categories.edit"
- path={url path='admin/categories/update-position' category_id=$ID}
- url_parameter="category_id"
- in_place_edit_class="categoryPositionChange"
- position=$POSITION
- id=$ID
- }
-
+ {module_include location='category_list_caption'}
-
-
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
-
- {/loop}
-
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
-
- {/loop}
-
-
-
- {/loop}
-
- {/ifloop}
-
- {elseloop rel="category_list"}
-
-
-
-
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
- {intl l="This category has no sub-categories. To create a new one, click the + button above."}
+
+
+
{/loop}
+
- {elseloop rel="can_create"}
- {intl l="This category has no sub-categories."}
- {/elseloop}
-
-
-
-
- {/elseloop}
-
+ {ifloop rel="category_list"}
+
+
+
+ {admin_sortable_header
+ current_order=$category_order
+ order='id'
+ reverse_order='id_reverse'
+ path={url path='/admin/categories' id_category=$category_id}
+ request_parameter_name='category_order'
+ label="{intl l='ID'}"
+ }
+
+
+
+
+
+ {admin_sortable_header
+ current_order=$category_order
+ order='alpha'
+ reverse_order='alpha_reverse'
+ path={url path='/admin/categories' id_category=$category_id}
+ request_parameter_name='category_order'
+ label="{intl l='Category title'}"
+ }
+
+
+ {module_include location='category_list_header'}
+
+
+ {admin_sortable_header
+ current_order=$category_order
+ order='visible'
+ reverse_order='visible_reverse'
+ path={url path='/admin/categories' id_category=$category_id}
+ request_parameter_name='category_order'
+ label="{intl l='Online'}"
+ }
+
+
+
+ {admin_sortable_header
+ current_order=$category_order
+ order='manual'
+ reverse_order='manual_reverse'
+ path={url path='/admin/categories' id_category=$category_id}
+ request_parameter_name='category_order'
+ label="{intl l='Position'}"
+ }
+
+
+ {intl l='Actions'}
+
+
+
+
+ {loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
+
+ {$ID}
+
+
+ {loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
+
+ {/loop}
+
+
+
+
+ {$TITLE}
+
+
+
+ {module_include location='category_list_row'}
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
+
+
+
+ {/loop}
+
+ {elseloop rel="can_change"}
+
+
+
+ {/elseloop}
+
+
+
+ {admin_position_block
+ permission="admin.categories.edit"
+ path={url path='admin/categories/update-position' category_id=$ID}
+ url_parameter="category_id"
+ in_place_edit_class="categoryPositionChange"
+ position=$POSITION
+ id=$ID
+ }
+
+
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
+
+ {/loop}
+
+
+
+ {/loop}
+
+ {/ifloop}
+
+ {elseloop rel="category_list"}
+
+
+
+
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
+ {intl l="This category has no sub-categories. To create a new one, click the + button above."}
+ {/loop}
+
+ {elseloop rel="can_create"}
+ {intl l="This category has no sub-categories."}
+ {/elseloop}
+
+
+
+
+ {/elseloop}
+
+
@@ -181,7 +182,7 @@
-
+
{* display parent category name *}
@@ -266,14 +267,14 @@
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
-
+
{/loop}
- {$REF}
+ {$REF}
- {$TITLE}
+ {$TITLE}
{module_include location='product_list_row'}
@@ -305,7 +306,7 @@
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
-
+
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"}
@@ -326,8 +327,7 @@
{/elseloop}
-
-
+
diff --git a/templates/admin/default/category-edit.html b/templates/admin/default/category-edit.html
index ddf39f5f2..b974a4564 100755
--- a/templates/admin/default/category-edit.html
+++ b/templates/admin/default/category-edit.html
@@ -40,24 +40,23 @@
-
+
{form name="thelia.admin.category.modification"}
-
-
-
-
- {intl l='ID'}
+
+
+
+
+ {intl l='ID'}
- {intl l='Attribute title'}
+ {intl l='Content title'}
- {module_include location='category_contents_table_header'}
+ {module_include location='category_contents_table_header'}
- {intl l="Actions"}
-
-
+ {intl l="Actions"}
+
+
-
- {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
-
- {$ID}
+
+ {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
+
+ {$ID}
-
- {$TITLE}
-
+
+ {$TITLE}
+
- {module_include location='category_contents_table_row'}
+ {module_include location='category_contents_table_row'}
-
-
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
-
-
-
- {/loop}
-
-
-
- {/loop}
+
+
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
+
+
+
+ {/loop}
+
+
+
+ {/loop}
- {elseloop rel="assigned_contents"}
-
-
-
- {intl l="This category contains no contents"}
-
-
-
- {/elseloop}
-
-
+ {elseloop rel="assigned_contents"}
+
+
+
+ {intl l="This category contains no contents"}
+
+
+
+ {/elseloop}
+
+
+
-
+
-
@@ -287,7 +297,7 @@
{block name="javascript-initialization"}
-
+
@@ -317,12 +327,6 @@ $(function() {
ev.preventDefault();
});
- // Show proper tab, if defined
- {if ! empty($current_tab)}
- $('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
- {/if}
-
-
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {
$('#content_delete_id').val($(this).data('id'));
@@ -331,28 +335,41 @@ $(function() {
// Load content on folder selection
$('#folder_id').change(function(event) {
- $.ajax({
- url : '{url path="/admin/category/$category_id/available-related-content/"}' + $(this).val() + '.xml',
- type : 'get',
- dataType : 'json',
- success : function(json) {
- $('#content_id :not(:first-child)').remove();
- var have_content = false;
+ var val = $(this).val();
- $.each(json, function(idx, value) {
- $('#content_id').append($('
').text(value.title).attr('value', value.id));
+ if (val != "") {
+ $.ajax({
+ url : '{url path="/admin/category/$category_id/available-related-content/"}' + val + '.xml',
+ type : 'get',
+ dataType : 'json',
+ success : function(json) {
+ $('#content_id :not(:first-child)').remove();
- have_content = true; // Lame...
- });
+ var have_content = false;
- if (have_content)
- $('#content_selector').removeClass('hide');
- else
- $('#content_selector').addClass('hide');
+ $.each(json, function(idx, value) {
+ $('#content_id').append($(' ').text(value.title).attr('value', value.id));
- }
- });
+ have_content = true; // Lame...
+ });
+
+ if (have_content) {
+ $('#content_selector_empty').addClass('hide');
+ $('#content_selector').removeClass('hide');
+ }
+ else {
+ $('#content_selector_empty').removeClass('hide');
+ $('#content_selector').addClass('hide');
+ }
+
+ }
+ });
+ }
+ else {
+ $('#content_selector_empty').addClass('hide');
+ $('#content_selector').addClass('hide');
+ }
});
// Initialize folder (id={$folder_id}) select value
diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html
index 0bf0e9bed..50e9296ac 100644
--- a/templates/admin/default/configuration.html
+++ b/templates/admin/default/configuration.html
@@ -17,151 +17,156 @@
diff --git a/templates/admin/default/countries.html b/templates/admin/default/countries.html
index 982db557f..fe1b614a1 100644
--- a/templates/admin/default/countries.html
+++ b/templates/admin/default/countries.html
@@ -23,80 +23,80 @@
diff --git a/templates/admin/default/coupon-list.html b/templates/admin/default/coupon-list.html
index 2eafde586..3abc9268d 100755
--- a/templates/admin/default/coupon-list.html
+++ b/templates/admin/default/coupon-list.html
@@ -22,73 +22,77 @@
-
-
- {intl l='Enabled coupons'}
-
-
-
- {block name="coupon-label-code"}{intl l='Code'}{/block}
- {block name="coupon-label-title"}{intl l='Title'}{/block}
- {block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}
- {block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}
- {block name="coupon-label-action"}{/block}
-
-
-
- {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
-
- {block name="coupon-code"}{$CODE} {/block}
- {block name="coupon-title"}{$TITLE}{/block}
- {block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}
- {block name="coupon-usage-left"}{$USAGE_LEFT}{/block}
-
- {block name="coupon-action"}
-
- {intl l='Edit'}
-
- {/block}
-
-
- {/loop}
-
-
+
+
+
+ {intl l='Enabled coupons'}
+
+
+
+ {block name="coupon-label-code"}{intl l='Code'}{/block}
+ {block name="coupon-label-title"}{intl l='Title'}{/block}
+ {block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}
+ {block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}
+ {block name="coupon-label-action"}{/block}
+
+
+
+ {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
+
+ {block name="coupon-code"}{$CODE} {/block}
+ {block name="coupon-title"}{$TITLE}{/block}
+ {block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}
+ {block name="coupon-usage-left"}{$USAGE_LEFT}{/block}
+
+ {block name="coupon-action"}
+
+ {intl l='Edit'}
+
+ {/block}
+
+
+ {/loop}
+
+
+
-
-
- {intl l='Disabled coupons'}
-
-
-
- {block name="coupon-label-code"}{intl l='Code'}{/block}
- {block name="coupon-label-title"}{intl l='Title'}{/block}
- {block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}
- {block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}
- {block name="coupon-label-action"}{/block}
-
-
-
- {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
-
- {block name="coupon-code"}{$CODE} {/block}
- {block name="coupon-title"}{$TITLE}{/block}
- {block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}
- {block name="coupon-usage-left"}{$USAGE_LEFT}{/block}
-
- {block name="coupon-action"}
-
- {intl l='Edit'}
-
- {/block}
-
-
- {/loop}
-
-
+
+
+
+ {intl l='Disabled coupons'}
+
+
+
+ {block name="coupon-label-code"}{intl l='Code'}{/block}
+ {block name="coupon-label-title"}{intl l='Title'}{/block}
+ {block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}
+ {block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}
+ {block name="coupon-label-action"}{/block}
+
+
+
+ {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
+
+ {block name="coupon-code"}{$CODE} {/block}
+ {block name="coupon-title"}{$TITLE}{/block}
+ {block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}
+ {block name="coupon-usage-left"}{$USAGE_LEFT}{/block}
+
+ {block name="coupon-action"}
+
+ {intl l='Edit'}
+
+ {/block}
+
+
+ {/loop}
+
+
+
diff --git a/templates/admin/default/coupon-read.html b/templates/admin/default/coupon-read.html
index 4ae5e5c68..8f14dd44f 100755
--- a/templates/admin/default/coupon-read.html
+++ b/templates/admin/default/coupon-read.html
@@ -27,120 +27,122 @@
{intl l='This coupon is disabled, you can enable to the bottom of this form.'}
{/if}
-
-
-
-
- {intl l='Title'}
- {$TITLE}
-
-
-
- {if $IS_ENABLED}
-
- {intl l="Is enabled"}
-
- {else}
-
- {intl l="Is disabled"}
-
- {/if}
-
-
-
-
- {$TOOLTIP}
-
-
-
- {intl l='Amount'}
- {$AMOUNT}
-
-
- {intl l='Expiration date'}
- {$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})
-
-
- {intl l='Usage left'}
-
- {if $USAGE_LEFT}
-
- {$USAGE_LEFT}
-
- {else}
-
- 0
-
- {/if}
-
-
-
-
- {if $IS_CUMULATIVE}
-
- {intl l="May be cumulative"}
-
- {else}
-
- {intl l="Can't be cumulative"}
-
- {/if}
-
-
-
-
- {if $IS_REMOVING_POSTAGE}
-
- {intl l="Will remove postage"}
-
- {else}
-
- {intl l="Won't remove postage"}
-
- {/if}
-
-
-
-
- {if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
-
- {intl l="Will be available on special offers"}
-
- {else}
-
- {intl l="Won't be available on special offers"}
-
- {/if}
-
-
-
- {intl l='Application field'}
-
-
- {foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
- {if !$smarty.foreach.rulesForeach.first}
- {intl l='And'}
- {/if}
- {$rule nofilter}
- {/foreach}
-
-
-
-
- {$SHORT_DESCRIPTION}
-
-
- {$DESCRIPTION}
-
-
-
-
- {intl l='Edit'}
-
-
-
-
-
+
+
+
+
+
+ {intl l='Title'}
+ {$TITLE}
+
+
+
+ {if $IS_ENABLED}
+
+ {intl l="Is enabled"}
+
+ {else}
+
+ {intl l="Is disabled"}
+
+ {/if}
+
+
+
+
+ {$TOOLTIP}
+
+
+
+ {intl l='Amount'}
+ {$AMOUNT}
+
+
+ {intl l='Expiration date'}
+ {$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})
+
+
+ {intl l='Usage left'}
+
+ {if $USAGE_LEFT}
+
+ {$USAGE_LEFT}
+
+ {else}
+
+ 0
+
+ {/if}
+
+
+
+
+ {if $IS_CUMULATIVE}
+
+ {intl l="May be cumulative"}
+
+ {else}
+
+ {intl l="Can't be cumulative"}
+
+ {/if}
+
+
+
+
+ {if $IS_REMOVING_POSTAGE}
+
+ {intl l="Will remove postage"}
+
+ {else}
+
+ {intl l="Won't remove postage"}
+
+ {/if}
+
+
+
+
+ {if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
+
+ {intl l="Will be available on special offers"}
+
+ {else}
+
+ {intl l="Won't be available on special offers"}
+
+ {/if}
+
+
+
+ {intl l='Application field'}
+
+
+ {foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
+ {if !$smarty.foreach.rulesForeach.first}
+ {intl l='And'}
+ {/if}
+ {$rule nofilter}
+ {/foreach}
+
+
+
+
+ {$SHORT_DESCRIPTION}
+
+
+ {$DESCRIPTION}
+
+
+
+
+ {intl l='Edit'}
+
+
+
+
+
+
{/loop}
diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html
index fe4cfe882..11b52cd24 100644
--- a/templates/admin/default/currencies.html
+++ b/templates/admin/default/currencies.html
@@ -23,166 +23,166 @@
diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html
index 10f4f3abf..9bcba75b9 100644
--- a/templates/admin/default/customer-edit.html
+++ b/templates/admin/default/customer-edit.html
@@ -142,52 +142,54 @@
+
+
+
+
+
+ {intl l="Address"}
+ {intl l="Actions"}
+
+
+
+ {loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
+
+
+
+ {loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}
+ {$ADDRESS1}
+ {$ADDRESS2}
+ {$ADDRESS3}
+ {if $PHONE}
+ P: {$PHONE}
+ {/if}
+ {if $CELLPHONE}
+ P: {$CELLPHONE}
+ {/if}
+
+
+
+
-
-
-
- {intl l="Address"}
- {intl l="Actions"}
-
-
-
- {loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
-
-
-
- {loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}
- {$ADDRESS1}
- {$ADDRESS2}
- {$ADDRESS3}
- {if $PHONE}
- P: {$PHONE}
- {/if}
- {if $CELLPHONE}
- P: {$CELLPHONE}
- {/if}
-
-
-
-
-
-
- {/loop}
-
-
+
+
+
+ {/loop}
+
+
+
diff --git a/templates/admin/default/customers.html b/templates/admin/default/customers.html
index d69ce970b..9d74835d7 100644
--- a/templates/admin/default/customers.html
+++ b/templates/admin/default/customers.html
@@ -22,121 +22,123 @@
-
-
- {intl l="Customers list"}
+
+
+
+ {intl l="Customers list"}
- {module_include location='customer_list_caption'}
+ {module_include location='customer_list_caption'}
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
-
-
-
- {/loop}
-
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
+
+
+
+ {/loop}
+
- {ifloop rel="customer_list"}
-
-
-
- {intl l="customer ref"}
-
-
-
- {intl l="company"}
-
-
- {module_include location='category_list_header'}
-
-
- {intl l="firstname & lastname"}
-
-
-
- {intl l="last order"}
-
-
- {intl l='order amount'}
-
- {intl l='Actions'}
-
-
-
-
- {loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
+ {ifloop rel="customer_list"}
+
- {$REF}
+
+ {intl l="customer ref"}
+
-
- {$COMPANY}
-
+
+ {intl l="company"}
+
-
- {$FIRSTNAME} {$LASTNAME}
-
+ {module_include location='category_list_header'}
- {module_include location='customer_list_row'}
+
+ {intl l="firstname & lastname"}
+
-
- {format_date date=$LASTORDER_DATE}
-
+
+ {intl l="last order"}
+
-
- {format_number number=$LASTORDER_AMOUNT}
-
-
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
-
- {/loop}
- {loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
-
- {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
-
- {/loop}
-
-
+ {intl l='order amount'}
+ {intl l='Actions'}
- {/loop}
-
-
-
-
-
-
-
+ {/pageloop}
+ {if $PAGE == $LAST && $LAST != $CURRENT}
+
»
+ {else}
+
»
+ {/if}
+
+
+
+
+
+
+ {/ifloop}
+
+
diff --git a/templates/admin/default/feature-edit.html b/templates/admin/default/feature-edit.html
index 7bbed5965..a21c63f61 100644
--- a/templates/admin/default/feature-edit.html
+++ b/templates/admin/default/feature-edit.html
@@ -77,95 +77,97 @@
{intl l="Enter here all possible feature values."}
+
+
+
+
+
+
+ {admin_sortable_header
+ current_order=$featureav_order
+ order='id'
+ reverse_order='id_reverse'
+ request_parameter_name='featureav_order'
+ path={url path='/admin/configuration/features/update' feature_id=$feature_id}
+ label="{intl l='ID'}"
+ }
+
-
+ {elseloop rel="list"}
+
+
+
+ {intl l="No value has been created yet. Click the + button to create one."}
+
+
+
+ {/elseloop}
+
+
+
{/form}
diff --git a/templates/admin/default/features.html b/templates/admin/default/features.html
index 69ed1d5d4..683374aa8 100644
--- a/templates/admin/default/features.html
+++ b/templates/admin/default/features.html
@@ -21,117 +21,119 @@
diff --git a/templates/admin/default/folders.html b/templates/admin/default/folders.html
index e836770ab..90646c9bc 100644
--- a/templates/admin/default/folders.html
+++ b/templates/admin/default/folders.html
@@ -15,163 +15,164 @@
-
+
+
+
+
+ {* display parent folder name, and get current folder ID *}
+ {loop name="folder_title" type="folder" visible="*" id=$folder_id}
+ {intl l="Folders in %fold" fold=$TITLE}
+ {$fold_id = $ID}
+ {/loop}
+ {elseloop rel="folder_title"}
+ {intl l="Top level folders"}
+ {/elseloop}
-
-
- {* display parent folder name, and get current folder ID *}
- {loop name="folder_title" type="folder" visible="*" id=$folder_id}
- {intl l="Folders in %fold" fold=$TITLE}
- {$fold_id = $ID}
- {/loop}
- {elseloop rel="folder_title"}
- {intl l="Top level folders"}
- {/elseloop}
+ {module_include location='folder_list_caption'}
- {module_include location='folder_list_caption'}
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
+
+
+
+ {/loop}
+
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
-
-
-
- {/loop}
-
+ {ifloop rel="folder_list"}
+
+
+
+ {admin_sortable_header
+ current_order=$folder_order
+ order='id'
+ reverse_order='id_reverse'
+ path={url path='/admin/folders' id_folder=$folder_id}
+ request_parameter_name='folder_order'
+ label="{intl l='ID'}"
+ }
+
- {ifloop rel="folder_list"}
+
+
+
+ {admin_sortable_header
+ current_order=$folder_order
+ order='alpha'
+ reverse_order='alpha_reverse'
+ path={url path='/admin/folders' id_folder=$folder_id}
+ request_parameter_name='folder_order'
+ label="{intl l='Folder title'}"
+ }
+
+
+ {module_include location='folder_list_header'}
+
+
+ {admin_sortable_header
+ current_order=$folder_order
+ order='visible'
+ reverse_order='visible_reverse'
+ path={url path='/admin/folders' id_folder=$folder_id}
+ request_parameter_name='folder_order'
+ label="{intl l='Online'}"
+ }
+
+
+
+ {admin_sortable_header
+ current_order=$folder_order
+ order='manual'
+ reverse_order='manual_reverse'
+ path={url path='/admin/folders' id_folder=$folder_id}
+ request_parameter_name='folder_order'
+ label="{intl l='Position'}"
+ }
+
+
+ {intl l='Actions'}
+
+
+
+
+ {loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
+
+ {$ID}
+
+
+ {loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
+
+ {/loop}
+
+
+
+
+ {$TITLE}
+
+
+
+ {module_include location='folder_list_row'}
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
+
+
+
+ {/loop}
+
+ {elseloop rel="can_change"}
+
+
+
+ {/elseloop}
+
+
+
+ {admin_position_block
+ permission="admin.folders.edit"
+ path={url path='admin/folders/update-position' folder_id=$ID}
+ url_parameter="folder_id"
+ in_place_edit_class="folderPositionChange"
+ position=$POSITION
+ id=$ID
+ }
+
+
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
+
+ {/loop}
+
+
+
+ {/loop}
+
+ {/ifloop}
+
+ {elseloop rel="folder_list"}
-
- {admin_sortable_header
- current_order=$folder_order
- order='id'
- reverse_order='id_reverse'
- path={url path='/admin/folders' id_folder=$folder_id}
- request_parameter_name='folder_order'
- label="{intl l='ID'}"
- }
-
+
+
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
+ {intl l="This folder has no sub-folders. To create a new one, click the + button above."}
+ {/loop}
-
-
-
- {admin_sortable_header
- current_order=$folder_order
- order='alpha'
- reverse_order='alpha_reverse'
- path={url path='/admin/folders' id_folder=$folder_id}
- request_parameter_name='folder_order'
- label="{intl l='Folder title'}"
- }
-
-
- {module_include location='folder_list_header'}
-
-
- {admin_sortable_header
- current_order=$folder_order
- order='visible'
- reverse_order='visible_reverse'
- path={url path='/admin/folders' id_folder=$folder_id}
- request_parameter_name='folder_order'
- label="{intl l='Online'}"
- }
-
-
-
- {admin_sortable_header
- current_order=$folder_order
- order='manual'
- reverse_order='manual_reverse'
- path={url path='/admin/folders' id_folder=$folder_id}
- request_parameter_name='folder_order'
- label="{intl l='Position'}"
- }
-
-
- {intl l='Actions'}
+ {elseloop rel="can_create"}
+ {intl l="This folder has no sub-folders."}
+ {/elseloop}
+
+
-
-
- {loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
-
- {$ID}
-
-
- {loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
-
- {/loop}
-
-
-
-
- {$TITLE}
-
-
-
- {module_include location='folder_list_row'}
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
-
-
-
- {/loop}
-
- {elseloop rel="can_change"}
-
-
-
- {/elseloop}
-
-
-
- {admin_position_block
- permission="admin.folders.edit"
- path={url path='admin/folders/update-position' folder_id=$ID}
- url_parameter="folder_id"
- in_place_edit_class="folderPositionChange"
- position=$POSITION
- id=$ID
- }
-
-
-
-
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
-
- {/loop}
-
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
-
- {/loop}
-
-
-
- {/loop}
-
- {/ifloop}
-
- {elseloop rel="folder_list"}
-
-
-
-
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
- {intl l="This folder has no sub-folders. To create a new one, click the + button above."}
- {/loop}
-
- {elseloop rel="can_create"}
- {intl l="This folder has no sub-folders."}
- {/elseloop}
-
-
-
-
- {/elseloop}
-
+ {/elseloop}
+
+
@@ -181,7 +182,7 @@
-
+
{* display parent folder name *}
@@ -314,7 +315,7 @@
{/elseloop}
-
+
diff --git a/templates/admin/default/home.html b/templates/admin/default/home.html
index c5683620f..3371a1d9f 100755
--- a/templates/admin/default/home.html
+++ b/templates/admin/default/home.html
@@ -21,8 +21,8 @@
-
{intl l="Turnover"}
-
{intl l="Registrations"}
+
{intl l="Sales"}
+
{intl l="New customers"}
{intl l="Orders"}
{intl l="First orders"}
{intl l="Aborted orders"}
@@ -34,7 +34,7 @@
-
+
@@ -47,51 +47,53 @@
-
{intl l="Informations site"}
-
-
-
- {intl l="Customers"}
- 1
-
-
- {intl l="Sections"}
- 8
-
-
- {intl l="Products"}
- 43
-
-
- {intl l="Products online"}
- 43
-
-
- {intl l="Products offline"}
- 0
-
-
- {intl l="Orders"}
- 1
-
-
- {intl l="Orders pending"}
- 1
-
-
- {intl l="Orders treatment"}
- 0
-
-
- {intl l="Shipped orders"}
- 0
-
-
- {intl l="Canceled orders"}
- 0
-
-
-
+
{intl l="Shop Informations"}
+
+
+
+
+ {intl l="Customers"}
+ 1
+
+
+ {intl l="Categories"}
+ 8
+
+
+ {intl l="Products"}
+ 43
+
+
+ {intl l="Online products"}
+ 43
+
+
+ {intl l="Offline products"}
+ 0
+
+
+ {intl l="Orders"}
+ 1
+
+
+ {intl l="Pending orders"}
+ 1
+
+
+ {intl l="In process orderst"}
+ 0
+
+
+ {intl l="Shipped orders"}
+ 0
+
+
+ {intl l="Canceled orders"}
+ 0
+
+
+
+
@@ -107,106 +109,112 @@
-
-
-
- {intl l="C. A. TTC"}
- 2000.00 €
-
-
- {intl l="C. A. TTC hors frais de port"}
- 2500.00 €
-
-
- {intl l="C. A. TTC précédent"}
- 1700.00 €
-
-
- {intl l="Commandes en instance"}
- 4
-
-
- {intl l="Commandes en traitement"}
- 52
-
-
- {intl l="Commandes annulées"}
- 3
-
-
- {intl l="Panier moyen TTC"}
- 25.00 €
-
-
-
+
+
+
+
+ {intl l="Overall sales"}
+ 2500.00 €
+
+
+ {intl l="Sales excluding shipping"}
+ 2000.00 €
+
+
+ {intl l="Yesterday sales"}
+ 1700.00 €
+
+
+ {intl l="Waiting orders"}
+ 4
+
+
+ {intl l="In process orders"}
+ 52
+
+
+ {intl l="Canceled orders"}
+ 3
+
+
+ {intl l="Average cart"}
+ 25.00 €
+
+
+
+
-
-
-
- {intl l="C. A. TTC"}
- 2000.00 €
-
-
- {intl l="C. A. TTC hors frais de port"}
- 2500.00 €
-
-
- {intl l="C. A. TTC précédent"}
- 1700.00 €
-
-
- {intl l="Commandes en instance"}
- 4
-
-
- {intl l="Commandes en traitement"}
- 52
-
-
- {intl l="Commandes annulées"}
- 3
-
-
- {intl l="Panier moyen TTC"}
- 25.00 €
-
-
-
+
+
+
+
+ {intl l="Overall sales"}
+ 2500.00 €
+
+
+ {intl l="Sales excluding shipping"}
+ 2000.00 €
+
+
+ {intl l="Previous month sales"}
+ 1700.00 €
+
+
+ {intl l="Waiting orders"}
+ 4
+
+
+ {intl l="In process orders"}
+ 52
+
+
+ {intl l="Canceled orders"}
+ 3
+
+
+ {intl l="Average cart"}
+ 25.00 €
+
+
+
+
-
-
-
- {intl l="C. A. TTC"}
- 2000.00 €
-
-
- {intl l="C. A. TTC hors frais de port"}
- 2500.00 €
-
-
- {intl l="C. A. TTC précédent"}
- 1700.00 €
-
-
- {intl l="Commandes en instance"}
- 4
-
-
- {intl l="Commandes en traitement"}
- 52
-
-
- {intl l="Commandes annulées"}
- 3
-
-
- {intl l="Panier moyen TTC"}
- 25.00 €
-
-
-
+
+
+
+
+ {intl l="Overall sales"}
+ 2500.00 €
+
+
+ {intl l="Sales excluding shipping"}
+ 2000.00 €
+
+
+ {intl l="Previous year sales"}
+ 1700.00 €
+
+
+ {intl l="Waiting orders"}
+ 4
+
+
+ {intl l="In process orders"}
+ 52
+
+
+ {intl l="Canceled orders"}
+ 3
+
+
+ {intl l="Average cart"}
+ 25.00 €
+
+
+
+
@@ -215,22 +223,24 @@
{intl l="Thelia informations"}
-
+
+
-
- {intl l="Current version"}
- V2.0.0-beta
-
-
- {intl l="Latest version available"}
- V1.5.4.2
-
-
- {intl l="News"}
- {intl l="Click here"}
-
-
-
+
+ {intl l="Current version"}
+ V2.0.0-beta
+
+
+ {intl l="Latest version available"}
+ V1.5.4.2
+
+
+ {intl l="News"}
+ {intl l="Click here"}
+
+
+
+
diff --git a/templates/admin/default/includes/catalog-breadcrumb.html b/templates/admin/default/includes/catalog-breadcrumb.html
index 8bbe69088..1233d17a3 100644
--- a/templates/admin/default/includes/catalog-breadcrumb.html
+++ b/templates/admin/default/includes/catalog-breadcrumb.html
@@ -2,11 +2,11 @@
Home
- Catalog
+ Catalog
- {ifloop rel="category_path"}
+ {ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}
- {if $ID == $category_id}
+ {if $ID == $category_id && $editing_product == false}
{if $editing_category == true}
{intl l='Editing %cat' cat="{$TITLE}"}
@@ -20,7 +20,9 @@
{/loop}
{/ifloop}
- {elseloop rel="category_path"}
-
- {/elseloop}
+ {if $editing_product == true}
+ {loop name="product_path" type="product" visible="*" id=$product_id}
+ {intl l="Editing %title" title="$TITLE"}
+ {/loop}
+ {/if}
\ No newline at end of file
diff --git a/templates/admin/default/messages.html b/templates/admin/default/messages.html
index afa7764af..cf2a0d9e1 100644
--- a/templates/admin/default/messages.html
+++ b/templates/admin/default/messages.html
@@ -21,76 +21,78 @@
diff --git a/templates/admin/default/modules.html b/templates/admin/default/modules.html
index e69de29bb..8c86c349a 100644
--- a/templates/admin/default/modules.html
+++ b/templates/admin/default/modules.html
@@ -0,0 +1,276 @@
+{extends file="admin-layout.tpl"}
+
+{block name="page-title"}{intl l='Modules'}{/block}
+
+{block name="check-permissions"}admin.modules.view{/block}
+
+{block name="main-content"}
+
+
+
+
+
+
+ {module_include location='modules_top'}
+
+
+
+
+
+
+
+ {intl l='Transport modules'}
+
+
+
+ {intl l="Name"}
+ {intl l="Description"}
+ {intl l="Enable/Disable"}
+
+ {module_include location='modules_table_header'}
+
+ {intl l="Actions"}
+
+
+
+
+
+ Tinymce
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+ So colissimo
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+ Title meta
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+
+
+
+
+
+
+
+
+ {intl l='Delivery modules'}
+
+
+
+ {intl l="Name"}
+ {intl l="Description"}
+ {intl l="Enable/Disable"}
+
+ {module_include location='modules_table_header'}
+
+ {intl l="Actions"}
+
+
+
+
+
+ Tinymce
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+ So colissimo
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+ Title meta
+ Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid
+
+
+
+
+
+
+ {module_include location='modules_table_row'}
+
+
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
+
+ {/loop}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
+
+ {/loop}
+
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
+
+ {/loop}
+
+
+
+
+
+
+
+
+
+
+ {module_include location='modules_bottom'}
+
+
+
+
+{* Delete module confirmation dialog *}
+
+{capture "delete_module_dialog"}
+
+
+{/capture}
+
+{include
+ file = "includes/generic-confirm-dialog.html"
+
+ dialog_id = "delete_module_dialog"
+ dialog_title = {intl l="Delete a module"}
+ dialog_message = {intl l="Do you really want to delete this module ?"}
+
+ form_action = {url path='/admin/modules/delete'}
+ form_content = {$smarty.capture.delete_module_dialog nofilter}
+}
+
+{/block}
+
+{block name="javascript-initialization"}
+
+ {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
+
+ {/javascripts}
+{/block}
\ No newline at end of file
diff --git a/templates/admin/default/order-edit.html b/templates/admin/default/order-edit.html
index 603176fe6..793414afb 100644
--- a/templates/admin/default/order-edit.html
+++ b/templates/admin/default/order-edit.html
@@ -30,71 +30,75 @@
-
-
- {intl l='Information about order 01201303540354'}
-
-
-
- {intl l="Designation"}
- {intl l="Price"}
- {intl l="Quantity"}
- {intl l="Total"}
-
-
+
+
+
+ {intl l='Information about order 01201303540354'}
+
+
+
+ {intl l="Designation"}
+ {intl l="Price"}
+ {intl l="Quantity"}
+ {intl l="Total"}
+
+
-
-
- T-Shirt F T1
- 20.00 €
- 3
- 60.00 €
-
-
- T-Shirt F T1
- 20.00 €
- 3
- 60.00 €
-
-
- T-Shirt F T1
- 20.00 €
- 3
- 60.00 €
-
-
-
-
- Total
- 180.00 €
-
-
-
+
+
+ T-Shirt F T1
+ 20.00 €
+ 3
+ 60.00 €
+
+
+ T-Shirt F T1
+ 20.00 €
+ 3
+ 60.00 €
+
+
+ T-Shirt F T1
+ 20.00 €
+ 3
+ 60.00 €
+
+
+
+
+ Total
+ 180.00 €
+
+
+
+
-
-
- {intl l='Information about the bill'}
-
-
-
- {intl l="Bill n°"}
- {intl l="Compagny"}
- {intl l="Firstname & Lastname"}
- {intl l="Date & Hour"}
-
-
+
+
+
+ {intl l='Information about the bill'}
+
+
+
+ {intl l="Bill n°"}
+ {intl l="Compagny"}
+ {intl l="Firstname & Lastname"}
+ {intl l="Date & Hour"}
+
+
-
-
- 0001
- Thelia
- Dupont Jean
- 11/01/2013 14:11:00
-
-
-
+
+
+ 0001
+ Thelia
+ Dupont Jean
+ 11/01/2013 14:11:00
+
+
+
+
@@ -116,214 +120,219 @@
-
-
-
- {intl l='Information about the settlement'}
-
-
-
- {intl l="Type of payment"}
- Unknown
-
-
- {intl l="Transaction reference"}
- 141100
-
-
- {intl l="Total order before discount"}
- 60 €
-
-
- {intl l="Discount"}
- 10%
-
-
- {intl l="Coupon code"}
-
-
-
- {intl l="Total with discount"}
- 50 €
-
-
- {intl l="Freight"}
- 6 €
-
-
- {intl l="Total"}
- 56 €
-
-
-
-
+
+
+
+ {intl l='Information about the settlement'}
+
+
+
+ {intl l="Type of payment"}
+ Unknown
+
+
+ {intl l="Transaction reference"}
+ 141100
+
+
+ {intl l="Total order before discount"}
+ 60 €
+
+
+ {intl l="Discount"}
+ 10%
+
+
+ {intl l="Coupon code"}
+
+
+
+ {intl l="Total with discount"}
+ 50 €
+
+
+ {intl l="Freight"}
+ 6 €
+
+
+ {intl l="Total"}
+ 56 €
+
+
+
+
-
-
- {intl l='Billing address'}
-
-
-
-
-
-
- {intl l="Title"}
- Mr
-
-
- {intl l="Compagny"}
- Thelia
-
-
- {intl l="Firstname"}
- Espeche
-
-
- {intl l="Lastname"}
- Michaël
-
-
- {intl l="Street address"}
- 5, rue Rochon
-
-
- {intl l="Additional address"}
- Lorem ipsum dolor sit amet
-
-
- {intl l="Additional address"}
- Lorem ipsum dolor sit
-
-
- {intl l="Zip code"}
- 63000
-
-
- {intl l="City"}
- Clermont-Fd
-
-
- {intl l="Country"}
- France
-
-
- {intl l="Phone"}
- 01 02 03 04 05
-
-
-
+
+
+
+ {intl l='Billing address'}
+
+
+
+
+
+
+ {intl l="Title"}
+ Mr
+
+
+ {intl l="Compagny"}
+ Thelia
+
+
+ {intl l="Firstname"}
+ Espeche
+
+
+ {intl l="Lastname"}
+ Michaël
+
+
+ {intl l="Street address"}
+ 5, rue Rochon
+
+
+ {intl l="Additional address"}
+ Lorem ipsum dolor sit amet
+
+
+ {intl l="Additional address"}
+ Lorem ipsum dolor sit
+
+
+ {intl l="Zip code"}
+ 63000
+
+
+ {intl l="City"}
+ Clermont-Fd
+
+
+ {intl l="Country"}
+ France
+
+
+ {intl l="Phone"}
+ 01 02 03 04 05
+
+
+
+
-
-
- {intl l='Delivery address'}
-
-
-
-
-
-
- {intl l="Title"}
- Mr
-
-
- {intl l="Compagny"}
- Thelia
-
-
- {intl l="Firstname"}
- Espeche
-
-
- {intl l="Lastname"}
- Michaël
-
-
- {intl l="Street address"}
- 5, rue Rochon
-
-
- {intl l="Additional address"}
- Lorem ipsum dolor sit amet
-
-
- {intl l="Additional address"}
- Lorem ipsum dolor sit
-
-
- {intl l="Zip code"}
- 63000
-
-
- {intl l="City"}
- Clermont-Fd
-
-
- {intl l="Country"}
- France
-
-
- {intl l="Phone"}
- 01 02 03 04 05
-
-
-
+
+
+
+ {intl l='Delivery address'}
+
+
+
+
+
+
+ {intl l="Title"}
+ Mr
+
+
+ {intl l="Compagny"}
+ Thelia
+
+
+ {intl l="Firstname"}
+ Espeche
+
+
+ {intl l="Lastname"}
+ Michaël
+
+
+ {intl l="Street address"}
+ 5, rue Rochon
+
+
+ {intl l="Additional address"}
+ Lorem ipsum dolor sit amet
+
+
+ {intl l="Additional address"}
+ Lorem ipsum dolor sit
+
+
+ {intl l="Zip code"}
+ 63000
+
+
+ {intl l="City"}
+ Clermont-Fd
+
+
+ {intl l="Country"}
+ France
+
+
+ {intl l="Phone"}
+ 01 02 03 04 05
+
+
+
+
diff --git a/templates/admin/default/orders.html b/templates/admin/default/orders.html
index dcf9ef7e3..02bbea458 100644
--- a/templates/admin/default/orders.html
+++ b/templates/admin/default/orders.html
@@ -19,114 +19,116 @@
-
-
- {intl l='Orders'}
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
-
-
-
- {/loop}
-
-
-
- {intl l="Order n°"}
- {intl l="Date & Hour"}
- {intl l="Compagny"}
- {intl l="Name"}
- {intl l="Amount"}
- {intl l="Status"}
+
+
+
+ {intl l='Orders'}
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
+
+
+
+ {/loop}
+
+
+
+ {intl l="Order n°"}
+ {intl l="Date & Hour"}
+ {intl l="Compagny"}
+ {intl l="Name"}
+ {intl l="Amount"}
+ {intl l="Status"}
- {module_include location='orders_table_header'}
+ {module_include location='orders_table_header'}
- {intl l="Actions"}
-
-
+ {intl l="Actions"}
+
+
-
-
+
+
- 01230450123045
- 11/09/2013 10:24:31
- Thelia
- Dupont
- 251 €
- Paid
+ 01230450123045
+ 11/09/2013 10:24:31
+ Thelia
+ Dupont
+ 251 €
+ Paid
- {module_include location='orders_table_row'}
+ {module_include location='orders_table_row'}
-
-
+
+
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
-
- {/loop}
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
+
+ {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
-
- {/loop}
-
-
-
-
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
+
+ {/loop}
+
+
+
+
- 01230450123045
- 11/09/2013 10:24:31
- Thelia
- Dupont
- 251 €
- Canceled
+ 01230450123045
+ 11/09/2013 10:24:31
+ Thelia
+ Dupont
+ 251 €
+ Canceled
- {module_include location='orders_table_row'}
+ {module_include location='orders_table_row'}
-
-
+
+
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
-
- {/loop}
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
+
+ {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
-
- {/loop}
-
-
-
-
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
+
+ {/loop}
+
+
+
+
- 01230450123045
- 11/09/2013 10:24:31
- Thelia
- Dupont
- 251 €
- Current
+ 01230450123045
+ 11/09/2013 10:24:31
+ Thelia
+ Dupont
+ 251 €
+ Current
- {module_include location='orders_table_row'}
+ {module_include location='orders_table_row'}
-
-
+
+
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
-
- {/loop}
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
+
+ {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
-
- {/loop}
-
-
-
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
+
+ {/loop}
+
+
+
-
+
-
-
+
+
+
diff --git a/templates/admin/default/product-edit.html b/templates/admin/default/product-edit.html
new file mode 100644
index 000000000..d80d9ca0a
--- /dev/null
+++ b/templates/admin/default/product-edit.html
@@ -0,0 +1,599 @@
+{extends file="admin-layout.tpl"}
+
+{block name="check-permissions"}admin.catalog.view{/block}
+
+{block name="page-title"}{intl l='Edit product'}{/block}
+
+{block name="main-content"}
+
+
+
+ {include file="includes/catalog-breadcrumb.html" editing_category="false" editing_product="true"}
+
+
+ {loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}
+
+
+
+ {intl l='Edit product %title' title=$TITLE}
+
+
+
+
+ {if $HAS_PREVIOUS != 0}
+
+ {else}
+
+ {/if}
+
+
+
+ {if $HAS_NEXT != 0}
+
+ {else}
+
+ {/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/loop}
+
+
+
+
+
+{* Delete related content confirmation dialog *}
+
+{capture "delete_content_dialog"}
+
+
+
+
+
+{/capture}
+
+{include
+ file = "includes/generic-confirm-dialog.html"
+
+ dialog_id = "delete_content_dialog"
+ dialog_title = {intl l="Remove related content"}
+ dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
+
+ form_action = {url path='/admin/products/related-content/delete'}
+ form_content = {$smarty.capture.delete_content_dialog nofilter}
+}
+
+{* Delete accessory confirmation dialog *}
+
+{capture "delete_accessory_dialog"}
+
+
+
+
+
+{/capture}
+
+{include
+ file = "includes/generic-confirm-dialog.html"
+
+ dialog_id = "delete_accessory_dialog"
+ dialog_title = {intl l="Remove an accessory"}
+ dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
+
+ form_action = {url path='/admin/products/accessory/delete'}
+ form_content = {$smarty.capture.delete_accessory_dialog nofilter}
+}
+{/block}
+
+{block name="javascript-initialization"}
+
+{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
+
+{/javascripts}
+
+
+
+
+
+{/block}
\ No newline at end of file
diff --git a/templates/admin/default/profile-edit.html b/templates/admin/default/profile-edit.html
new file mode 100644
index 000000000..e882dc40d
--- /dev/null
+++ b/templates/admin/default/profile-edit.html
@@ -0,0 +1,126 @@
+{extends file="admin-layout.tpl"}
+
+{block name="page-title"}{intl l='Edit profile'}{/block}
+
+{block name="check-permissions"}admin.profile.edit{/block}
+
+{block name="main-content"}
+
+
+
+
+
+
+
+
+
+
+ {intl l="Edit profile $NAME"}
+
+
+
+
+
+
+
+
+
+
+{/block}
+
+{block name="javascript-initialization"}
+
+ {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
+
+ {/javascripts}
+ {javascripts file='assets/js/main.js'}
+
+ {/javascripts}
+
+{/block}
\ No newline at end of file
diff --git a/templates/admin/default/shipping-configuration-edit.html b/templates/admin/default/shipping-configuration-edit.html
index 39b69dcde..b17dc6de4 100644
--- a/templates/admin/default/shipping-configuration-edit.html
+++ b/templates/admin/default/shipping-configuration-edit.html
@@ -48,56 +48,58 @@
-
-
-
- {intl l="Country"}
- {intl l="Actions"}
-
-
-
-
- Wallis-et-Futuna
-
-
-
-
-
-
-
- Polynésie française
-
-
-
-
-
-
-
- USA - Alabama
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {intl l="Country"}
+ {intl l="Actions"}
+
+
+
+
+ Wallis-et-Futuna
+
+
+
+
+
+
+
+ Polynésie française
+
+
+
+
+
+
+
+ USA - Alabama
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/admin/default/shipping-configuration.html b/templates/admin/default/shipping-configuration.html
index ae9090c70..067256d5f 100644
--- a/templates/admin/default/shipping-configuration.html
+++ b/templates/admin/default/shipping-configuration.html
@@ -20,88 +20,90 @@
-
-
- {intl l='Thelia Shipping configuration'}
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
-
-
-
- {/loop}
-
-
-
- {intl l="Description"}
+
+
+
+ {intl l='Thelia Shipping configuration'}
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
+
+
+
+ {/loop}
+
+
+
+ {intl l="Description"}
- {module_include location='shipping_configuration_table_header'}
+ {module_include location='shipping_configuration_table_header'}
- {intl l="Actions"}
-
-
+ {intl l="Actions"}
+
+
-
-
- France
+
+
+ France
- {module_include location='shipping_configuration_table_row'}
+ {module_include location='shipping_configuration_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
-
- {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
- Outre-Mer DOM
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
+
+ {/loop}
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+ Outre-Mer DOM
- {module_include location='shipping_configuration_table_row'}
+ {module_include location='shipping_configuration_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
-
- {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
- Outre-Mer TOM
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
+
+ {/loop}
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+ Outre-Mer TOM
- {module_include location='shipping_configuration_table_row'}
+ {module_include location='shipping_configuration_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
-
- {/loop}
- {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
-
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
+
+ {/loop}
+ {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+
+
diff --git a/templates/admin/default/shipping-zones-edit.html b/templates/admin/default/shipping-zones-edit.html
index 70ee29a35..c330f9064 100644
--- a/templates/admin/default/shipping-zones-edit.html
+++ b/templates/admin/default/shipping-zones-edit.html
@@ -48,40 +48,42 @@
-
-
-
- {intl l="Zones"}
- {intl l="Actions"}
-
-
-
-
- France
-
-
-
-
-
-
-
- Zone 1
-
-
-
-
-
-
-
- Zone 2
-
-
-
-
-
-
-
-
+
+
+
+
+ {intl l="Zones"}
+ {intl l="Actions"}
+
+
+
+
+ France
+
+
+
+
+
+
+
+ Zone 1
+
+
+
+
+
+
+
+ Zone 2
+
+
+
+
+
+
+
+
+
diff --git a/templates/admin/default/shipping-zones.html b/templates/admin/default/shipping-zones.html
index e7c624b52..20ffef799 100644
--- a/templates/admin/default/shipping-zones.html
+++ b/templates/admin/default/shipping-zones.html
@@ -20,74 +20,76 @@
-
-
- {intl l='Thelia Shipping zones'}
-
-
-
- {intl l="Name"}
+
+
+
+ {intl l='Thelia Shipping zones'}
+
+
+
+ {intl l="Name"}
- {module_include location='shipping_zones_table_header'}
+ {module_include location='shipping_zones_table_header'}
- {intl l="Actions"}
-
-
+ {intl l="Actions"}
+
+
-
-
- So Colissimo
+
+
+ So Colissimo
- {module_include location='shipping_zones_table_row'}
+ {module_include location='shipping_zones_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
- Chronopost
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+ Chronopost
- {module_include location='shipping_zones_table_row'}
+ {module_include location='shipping_zones_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
- Kiala
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+ Kiala
- {module_include location='shipping_zones_table_row'}
+ {module_include location='shipping_zones_table_row'}
-
- {if ! $SECURED}
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
-
- {/loop}
-
- {else}
-
- {/if}
-
-
-
-
+
+ {if ! $SECURED}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
+
+ {/loop}
+
+ {else}
+
+ {/if}
+
+
+
+
+
diff --git a/templates/admin/default/templates.html b/templates/admin/default/templates.html
index 6f88bed47..f7e912e9c 100644
--- a/templates/admin/default/templates.html
+++ b/templates/admin/default/templates.html
@@ -25,86 +25,88 @@
{if ! empty($general_error) }
{$general_error}
{/if}
+
+
+
+
+ {intl l='Thelia product templates'}
-
-
- {intl l='Thelia product templates'}
+ {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
+
+
+
+ {/loop}
+
+
+
+
+ {admin_sortable_header
+ current_order=$order
+ order='id'
+ reverse_order='id_reverse'
+ path='/admin/configuration/templates'
+ label="{intl l='ID'}"
+ }
+
- {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
-
-
-
- {/loop}
-
-
-
-
- {admin_sortable_header
- current_order=$order
- order='id'
- reverse_order='id_reverse'
- path='/admin/configuration/templates'
- label="{intl l='ID'}"
- }
-
+
+ {admin_sortable_header
+ current_order=$order
+ order='alpha'
+ reverse_order='alpha_reverse'
+ path='/admin/configuration/templates'
+ label="{intl l='Title'}"
+ }
+
-
- {admin_sortable_header
- current_order=$order
- order='alpha'
- reverse_order='alpha_reverse'
- path='/admin/configuration/templates'
- label="{intl l='Title'}"
- }
-
+ {module_include location='templates_table_header'}
- {module_include location='templates_table_header'}
+ {intl l="Actions"}
+
+
- {intl l="Actions"}
-
-
+
+ {loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
+
+ {$ID}
-
- {loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
-
- {$ID}
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
+ {$NAME}
+ {/loop}
+ {elseloop rel="can_change"}
+ {$NAME}
+ {/elseloop}
+
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
- {$NAME}
- {/loop}
- {elseloop rel="can_change"}
- {$NAME}
- {/elseloop}
-
+ {module_include location='templates_table_row'}
- {module_include location='templates_table_row'}
+
+
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
+
+ {/loop}
-
-
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
-
- {/loop}
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
+
+ {/loop}
+
+
+
+ {/loop}
- {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
-
- {/loop}
-
-
-
- {/loop}
-
- {elseloop rel="list"}
-
-
-
- {intl l="No product template has been created yet. Click the + button to create one."}
-
-
-
- {/elseloop}
-
-
+ {elseloop rel="list"}
+
+
+
+ {intl l="No product template has been created yet. Click the + button to create one."}
+
+
+
+ {/elseloop}
+
+
+
diff --git a/templates/admin/default/variables.html b/templates/admin/default/variables.html
index 6100466bd..0ce47727d 100644
--- a/templates/admin/default/variables.html
+++ b/templates/admin/default/variables.html
@@ -21,6 +21,7 @@
diff --git a/templates/default/order_invoice.html b/templates/default/order_invoice.html
index 5fc55c0df..6a5b493a4 100644
--- a/templates/default/order_invoice.html
+++ b/templates/default/order_invoice.html
@@ -262,17 +262,24 @@
Choose your payment method
+
+ {if $error}
+
{$message}
+ {/if}
+
{loop type="payment" name="payments" force_return="true"}
+ {assign "paymentModuleId" $ID}
+
{loop type="image" name="paymentspicture" source="module" source_id=$ID force_return="true" width="100" height="72"}
@@ -288,7 +295,7 @@
{/form_field}
Back
- TO REMOVE
+ Next Step
{/form}
diff --git a/templates/default/order_payment.html b/templates/default/order_payment.html
new file mode 100644
index 000000000..884230258
--- /dev/null
+++ b/templates/default/order_payment.html
@@ -0,0 +1,60 @@
+{extends file="layout.tpl"}
+
+{block name="breadcrumb"}
+
+ You are here:
+
+
+{/block}
+
+{block name="main-content"}
+
+
+
+ Your Cart
+
+
+
+
+
+
You chose to pay by : Cheque
+
+
+
Thank you for the trust you place in us.
+
A summary of your order email has been sent to the following address: email@toto.com
+
Your order will be confirmed by us upon receipt of your payment.
+
+
+ Order number :
+ PRO123456788978979
+ Date :
+ 02/12/2013
+ Total :
+ $216.25
+
+
+
+
+ Go home
+
+
+
+
+{/block}
+
+{block name="javascript-initialization"}
+
+{/block}
\ No newline at end of file