unnecessary code removed
This commit is contained in:
@@ -231,7 +231,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
*
|
||||
* @return CartItem
|
||||
*/
|
||||
protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, $productPrices)
|
||||
protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, ProductPriceTools $productPrices)
|
||||
{
|
||||
$cartItem = new CartItem();
|
||||
$cartItem->setDisptacher($dispatcher);
|
||||
|
||||
@@ -17,18 +17,4 @@ use Thelia\Model\Base\ProductPriceQuery as BaseProductPriceQuery;
|
||||
class ProductPriceQuery extends BaseProductPriceQuery
|
||||
{
|
||||
|
||||
public function findByCurrencyAndProductSaleElements($currencyId, $productSaleElementsId)
|
||||
{
|
||||
ArticleQuery::create()->select(array('Id', 'Name'))->find();
|
||||
|
||||
$currencyId = $this->getCurrency();
|
||||
if (null !== $currencyId) {
|
||||
$currency = CurrencyQuery::create()->findOneById($currencyId);
|
||||
if (null === $currency) {
|
||||
throw new \InvalidArgumentException('Cannot found currency id: `' . $currency . '` in product_sale_elements loop');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // ProductPriceQuery
|
||||
|
||||
@@ -41,14 +41,6 @@ class ProductPriceTools
|
||||
$this->promoPrice = $promoPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $price
|
||||
*/
|
||||
public function setPrice($price)
|
||||
{
|
||||
$this->price = $price;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
@@ -57,14 +49,6 @@ class ProductPriceTools
|
||||
return $this->price;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $promoPrice
|
||||
*/
|
||||
public function setPromoPrice($promoPrice)
|
||||
{
|
||||
$this->promoPrice = $promoPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user