Categories ordrering in the catalog

This commit is contained in:
franck
2013-08-09 10:18:08 +02:00
parent 376471db04
commit c46a708346
23 changed files with 7875 additions and 94 deletions

View File

@@ -53,18 +53,6 @@ use Thelia\Model\Customer;
class Cart extends BaseAction implements EventSubscriberInterface
{
use \Thelia\Cart\CartTrait;
/**
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $dispatcher;
/**
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
*/
public function __construct(EventDispatcherInterface $dispatcher)
{
$this->dispatcher = $dispatcher;
}
/**
*
@@ -122,7 +110,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
protected function updateQuantity(CartItem $cartItem, $quantity)
{
$cartItem->setDisptacher($this->dispatcher);
$cartItem->setDisptacher($this->getDispatcher());
$cartItem->addQuantity($quantity)
->save();
}
@@ -130,7 +118,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
protected function addItem(\Thelia\Model\Cart $cart, $productId, $productSaleElementsId, $quantity, ProductPrice $productPrice)
{
$cartItem = new CartItem();
$cartItem->setDisptacher($this->dispatcher);
$cartItem->setDisptacher($this->getDispatcher());
$cartItem
->setCart($cart)
->setProductId($productId)