Jump to content
thirty bees forum
  • 0

Sudden issue with Bestseller module


Question

Posted (edited)

The bestseller module is causing issues with the search module this morning.  I get the following error unless I disable Bestsellers:

Additional info:  I tried and rseted the module and now even the front page does not work.

Decoded exception

Call to undefined method Tools::roundPrice()

in file modules/blockbestsellers/blockbestsellers.php at line 399

Source file: modules/blockbestsellers/blockbestsellers.php

380:     */
381:    protected function resolveBestSellers()
382:    {
383:        if (Configuration::get('PS_CATALOG_MODE')) {
384:            return false;
385:        }
386:
387:        if (!($result = $this->getBestSalesLight(
388:            (int) $this->context->language->id,
389:            0,
390:            (int) Configuration::get(static::BESTSELLERS_TO_DISPLAY),
391:            Configuration::get(static::BESTSELLERS_PRICE_ABOVE)))
392:        ) {
393:            return (Configuration::get(static::BESTSELLERS_DISPLAY) ? [] : false);
394:        }
395:
396:        $currency = new Currency($this->context->currency->id);
397:        $usetax = (Product::getTaxCalculationMethod((int) $this->context->customer->id) != PS_TAX_EXC);
398:        foreach ($result as &$row) {
399:            $row['price_raw'] = Tools::roundPrice(Product::getPriceStatic((int) $row['id_product'], $usetax));
400:            $row['price'] = Tools::displayPrice($row['price_raw'], $currency);
401:        }
402:
403:        return $result;
404:    }
405:
406:    /**
407:     * Get required informations on best sales products
408:     *
409:     * @param int $idLang Language id
Edited by movieseals
Additional information

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...