[*] Classes : fix bug #PSFV-162 - Remove unused variables
This commit is contained in:
@@ -110,8 +110,6 @@ class ManufacturerControllerCore extends FrontController
|
|||||||
$nbProducts = count($data);
|
$nbProducts = count($data);
|
||||||
$this->pagination($nbProducts);
|
$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)
|
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'];
|
$item['image'] = (!file_exists(_PS_MANU_IMG_DIR_.'/'.$item['id_manufacturer'].'-medium.jpg')) ? $this->context->language->iso_code.'-default' : $item['id_manufacturer'];
|
||||||
|
|
||||||
|
|||||||
@@ -164,8 +164,6 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
case 'updateAddressesSelected':
|
case 'updateAddressesSelected':
|
||||||
if ($this->context->customer->isLogged(true))
|
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_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'))));
|
$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)
|
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 (!sizeof($this->errors))
|
||||||
{
|
{
|
||||||
if ($this->context->customer->id)
|
|
||||||
$groups = $this->context->customer->getGroups();
|
|
||||||
else
|
|
||||||
$groups = array(1);
|
|
||||||
$result = $this->_getCarrierList();
|
$result = $this->_getCarrierList();
|
||||||
// Wrapping fees
|
// Wrapping fees
|
||||||
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PdfInvoiceControllerCore extends FrontController
|
class PdfInvoiceControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
protected $display_header = false;
|
protected $display_header = false;
|
||||||
@@ -59,9 +57,6 @@ class PdfInvoiceControllerCore extends FrontController
|
|||||||
if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number)
|
if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number)
|
||||||
die(Tools::displayError('No invoice available'));
|
die(Tools::displayError('No invoice available'));
|
||||||
|
|
||||||
// assignments
|
|
||||||
$country = new Country((int)$order->id_address_invoice);
|
|
||||||
|
|
||||||
$this->order = $order;
|
$this->order = $order;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -546,9 +546,10 @@ class ProductControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
if ($row['reduction_type'] == 'amount')
|
if ($row['reduction_type'] == 'amount')
|
||||||
{
|
{
|
||||||
$reduction_amount = $row['reduction'];
|
// Commenting unused code, delete if useless
|
||||||
if (!$row['id_currency'])
|
// $reduction_amount = $row['reduction'];
|
||||||
$reduction_amount = Tools::convertPrice($reduction_amount, $this->context->currency->id);
|
// 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);
|
$row['real_value'] = Product::$_taxCalculationMethod == PS_TAX_INC ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user