Merge branch 'cart'
Conflicts: composer.lock core/lib/Thelia/Model/Base/Attribute.php core/lib/Thelia/Model/Base/AttributeAv.php core/lib/Thelia/Model/Base/AttributeCombination.php core/lib/Thelia/Model/Base/AttributeCombinationQuery.php core/lib/Thelia/Model/Base/Cart.php core/lib/Thelia/Model/Base/CartItem.php core/lib/Thelia/Model/Base/CartItemQuery.php core/lib/Thelia/Model/Base/Currency.php core/lib/Thelia/Model/Base/CurrencyQuery.php core/lib/Thelia/Model/Base/Product.php core/lib/Thelia/Model/Base/ProductPrice.php core/lib/Thelia/Model/Base/ProductPriceQuery.php core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php core/lib/Thelia/Model/Map/CartItemTableMap.php core/lib/Thelia/Model/Map/CurrencyTableMap.php core/lib/Thelia/Model/Map/ProductPriceTableMap.php core/lib/Thelia/Model/Map/ProductTableMap.php install/thelia.sql local/config/schema.xml
This commit is contained in:
58
core/lib/Thelia/Core/Event/CartEvent.php
Normal file
58
core/lib/Thelia/Core/Event/CartEvent.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
|
||||
use Thelia\Model\Cart;
|
||||
|
||||
class CartEvent extends InternalEvent {
|
||||
|
||||
protected $cart;
|
||||
protected $modified;
|
||||
|
||||
public function __construct(Cart $cart)
|
||||
{
|
||||
$this->cart = $cart;
|
||||
$this->modified = false;
|
||||
}
|
||||
|
||||
public function setCart(Cart $cart)
|
||||
{
|
||||
$this->cart = $cart;
|
||||
$this->modified = true;
|
||||
}
|
||||
|
||||
public function getCart()
|
||||
{
|
||||
return $this->cart;
|
||||
}
|
||||
|
||||
public function isModified()
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,11 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* User: manu
|
||||
* Date: 21/05/13
|
||||
* Time: 12:35
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
|
||||
37
core/lib/Thelia/Core/Event/InternalEvent.php
Normal file
37
core/lib/Thelia/Core/Event/InternalEvent.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Base class used for internal event like creating new Customer, adding item to cart, etc
|
||||
*
|
||||
* Class InternalEvent
|
||||
* @package Thelia\Core\Event
|
||||
*/
|
||||
abstract class InternalEvent extends Event {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user