From d8238b007ebc845ac4b26bdb867c56ff53a75789 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 4 Jan 2012 13:41:03 +0000 Subject: [PATCH] [*] Classes : fix bug #PSFV-162 - Remove unused variables --- controllers/front/ManufacturerController.php | 2 -- controllers/front/OrderOpcController.php | 6 ------ controllers/front/PdfInvoiceController.php | 5 ----- controllers/front/ProductController.php | 7 ++++--- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/controllers/front/ManufacturerController.php b/controllers/front/ManufacturerController.php index 226e37e5a..829d02e0f 100644 --- a/controllers/front/ManufacturerController.php +++ b/controllers/front/ManufacturerController.php @@ -110,8 +110,6 @@ class ManufacturerControllerCore extends FrontController $nbProducts = count($data); $this->pagination($nbProducts); - $manufacturers = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false, $id_current_group_shop); - $imgDir = _PS_MANU_IMG_DIR_; foreach ($data as &$item) $item['image'] = (!file_exists(_PS_MANU_IMG_DIR_.'/'.$item['id_manufacturer'].'-medium.jpg')) ? $this->context->language->iso_code.'-default' : $item['id_manufacturer']; diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index 850d847d5..f6bad4398 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -164,8 +164,6 @@ class OrderOpcControllerCore extends ParentOrderController case 'updateAddressesSelected': if ($this->context->customer->isLogged(true)) { - $id_address_delivery = (int)(Tools::getValue('id_address_delivery')); - $id_address_invoice = (int)(Tools::getValue('id_address_invoice')); $address_delivery = new Address((int)(Tools::getValue('id_address_delivery'))); $address_invoice = ((int)(Tools::getValue('id_address_delivery')) == (int)(Tools::getValue('id_address_invoice')) ? $address_delivery : new Address((int)(Tools::getValue('id_address_invoice')))); if ($address_delivery->id_customer != $this->context->customer->id || $address_invoice->id_customer != $this->context->customer->id) @@ -183,10 +181,6 @@ class OrderOpcControllerCore extends ParentOrderController if (!sizeof($this->errors)) { - if ($this->context->customer->id) - $groups = $this->context->customer->getGroups(); - else - $groups = array(1); $result = $this->_getCarrierList(); // Wrapping fees $wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')); diff --git a/controllers/front/PdfInvoiceController.php b/controllers/front/PdfInvoiceController.php index ecf09836a..7121a71ce 100644 --- a/controllers/front/PdfInvoiceController.php +++ b/controllers/front/PdfInvoiceController.php @@ -25,8 +25,6 @@ * International Registered Trademark & Property of PrestaShop SA */ - - class PdfInvoiceControllerCore extends FrontController { protected $display_header = false; @@ -59,9 +57,6 @@ class PdfInvoiceControllerCore extends FrontController if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number) die(Tools::displayError('No invoice available')); - // assignments - $country = new Country((int)$order->id_address_invoice); - $this->order = $order; } diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 33f567e17..e286204ea 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -546,9 +546,10 @@ class ProductControllerCore extends FrontController { if ($row['reduction_type'] == 'amount') { - $reduction_amount = $row['reduction']; - if (!$row['id_currency']) - $reduction_amount = Tools::convertPrice($reduction_amount, $this->context->currency->id); + // Commenting unused code, delete if useless +// $reduction_amount = $row['reduction']; +// if (!$row['id_currency']) +// $reduction_amount = Tools::convertPrice($reduction_amount, $this->context->currency->id); $row['real_value'] = Product::$_taxCalculationMethod == PS_TAX_INC ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100); } else