[*] Classes : fix bug #PSFV-162 - Remove unused variables

This commit is contained in:
tDidierjean
2012-01-04 13:41:03 +00:00
parent 4c4f6da82a
commit 2f83e37cff
4 changed files with 4 additions and 16 deletions
@@ -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'];
-6
View File
@@ -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'));
@@ -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;
}
+4 -3
View File
@@ -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