Jump to content
thirty bees forum

movieseals

Gold member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by movieseals

  1. Hello again!

     

    For the past three weeks, customers are unable to add anything to the cart.  I tried disabling all overrrides and non-TB modules to see where the issue lies but the best I get in Debugmode is this:

    Impossible to add the product to the cart.<br/>textStatus: 'parsererror'<br/>errorThrown: 'SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data'<br/>responseText:<br/>

  2. Paypal or Stripe payment no longer close the orders.  Customers either get a 404 or Cart cannot be loaded or an order has already been placed using this cart.

    I checked the database using:

    SELECT id_cart FROM tb_cart ORDER by id_cart DESC LIMIT 1;
    SELECT id_cart FROM tb_orders ORDER by id_cart DESC LIMIT 1;
    
    Both the cart and the orders match.  Very odd.  I have to manually close ALL the orders that are made on the website.
    
  3. Hi!

    I am running TB 1.3 as I have a module that needs upgrades but is not ready yet (RockPOS).

    I started noticing issues with payments.

    Customers sometimes have to try several times for the Stripe payments to go through and in many cases, I get tons of canceled (Correction: not cancelled, incomplete) payments that never went through in the Stripe Dashboard, so it looks it got so hard to pay, customers just gave up.

    Sometimes it works.  Sometimes I get a Stripe notification but the order does not close and I have to do it manually.

    Same with Paypal.  Sometimes it just works.  Sometimes, the same as Stripe: I get an email but the order does not close.

    I suspect it is some form of caching issue but I am not sure.  Anybody else encountered such problems?

  4. Hi!

     

    I am testing TB 1.4 using PHP 7.4.

    One of the modules which works fine under PHP 7.3 now gives me this error in 7.4:

    Any idea how to resolve this?

    ThirtyBeesDatabaseException

    Unknown column 'pps.id_shop' in 'field list'

    in file /home/librairiezbookstore.com/public_html/modules/ets_abandonedcart/controllers/admin/AdminEtsACDashboardController.php at line 256

    SQL

                SELECT SUM((tmp.price + tmp.attribute_price)* pcp.quantity)
                FROM `tb_cart` c
                LEFT JOIN `tb_cart_product` pcp ON pcp.id_cart = c.id_cart
                LEFT JOIN (
                    SELECT p.id_product
                        , pps.id_shop
                        , pps.`price`
                        , pps.`ecotax`
                        , 0 as id_product_attribute, 0 as attribute_price
                    FROM `tb_product` p
                     
                ) as tmp ON (pcp.id_product = tmp.id_product AND pcp.id_product_attribute = tmp.id_product_attribute AND tmp.id_shop = c.id_shop)
                LEFT JOIN `tb_ets_abancart_tracking` eat ON (eat.id_cart = c.id_cart)
                WHERE c.id_shop = 1 AND (eat.id_cart is NOT NULL OR eat.id_cart > 0) LIMIT 1

    Source file: /home/librairiezbookstore.com/public_html/modules/ets_abandonedcart/controllers/admin/AdminEtsACDashboardController.php

    237:        $qr = '
    238:            SELECT SUM((tmp.price + tmp.attribute_price)* pcp.quantity)
    239:            FROM `' . _DB_PREFIX_ . 'cart` c
    240:            LEFT JOIN `' . _DB_PREFIX_ . 'cart_product` pcp ON pcp.id_cart = c.id_cart
    241:            LEFT JOIN (
    242:                SELECT p.id_product
    243:                    , pps.id_shop
    244:                    , pps.`price`
    245:                    , pps.`ecotax`
    246:                    , ' . ($is_feature_active ? 'IFNULL(ppas.id_product_attribute, 0) id_product_attribute, ppas.`price` as attribute_price' : '0 as id_product_attribute, 0 as attribute_price') . '
    247:                FROM `' . _DB_PREFIX_ . 'product` p
    248:                 ' . ($is_feature_active ? '
    249:                    LEFT JOIN `' . _DB_PREFIX_ . 'product_shop` pps on (p.id_product = pps.id_product)
    250:                    LEFT JOIN `' . _DB_PREFIX_ . 'product_attribute_shop` ppas on (p.id_product = ppas.id_product)
    251:                ' : '') . '
    252:            ) as tmp ON (pcp.id_product = tmp.id_product AND pcp.id_product_attribute = tmp.id_product_attribute AND tmp.id_shop = c.id_shop)
    253:            LEFT JOIN `' . _DB_PREFIX_ . 'ets_abancart_tracking` eat ON (eat.id_cart = c.id_cart)
    254:            WHERE c.id_shop = ' . (int)$this->context->shop->id . ' AND (eat.id_cart is NOT NULL OR eat.id_cart > 0);
    255:        ';
    256:        $totalAbandonedCart = Tools::displayPrice((float)Db::getInstance()->getValue($qr), $currency);
    257:        /*---End Abandoned Carts---*/
    258:
    259:        /*---Generated voucher code---*/
    260:        $toSQL = '
    261:			SELECT COUNT(t.id_cart_rule) FROM (SELECT id_cart_rule FROM `' . _DB_PREFIX_ . 'ets_abancart_tracking` t WHERE t.id_shop=' . (int)$this->context->shop->id . ') as t
    262:			INNER JOIN `' . _DB_PREFIX_ . 'cart_rule` cr ON (cr.id_cart_rule = t.id_cart_rule)
    263:		';
    264:        $totalGeneratedCode = (int)Db::getInstance()->getValue($toSQL);
    265:        $totalUseGeneratedCode = (int)Db::getInstance()->getValue($toSQL . '
    266:			LEFT JOIN `' . _DB_PREFIX_ . 'cart_cart_rule` ccr ON (ccr.id_cart_rule = cr.id_cart_rule)
    

    Stack trace

    1. classes/db/Db.php:867 source ()
    848:     * @throws PrestaShopException
    849:     * @deprecated 1.1.1
    850:     */
    851:    protected function q($sql, $useCache = true)
    852:    {
    853:        Tools::displayAsDeprecated();
    854:        return $this->query($sql);
    855:    }
    856:
    857:    /**
    858:     * Displays last SQL error
    859:     *
    860:     * @param string|bool $sql
    861:     * @throws PrestaShopDatabaseException
    862:     */
    863:    public function displayError($sql = false)
    864:    {
    865:        $errno = $this->getNumberError();
    866:        if ($errno) {
    867:            throw new PrestaShopDatabaseException($this->getMsgError(), $sql);
    868:        }
    869:    }
    870:
    871:    /**
    872:     * Sanitize data which will be injected into SQL query
    873:     *
    874:     * @param string $string SQL data which will be injected into SQL query
    875:     * @param bool   $htmlOk Does data contain HTML code ? (optional)
    876:     * @param bool   $bqSql  Escape backquotes
    877:     *
    
    2. classes/db/Db.php:502 source DbCore->displayError()
    483:     * @return bool|PDOStatement
    484:     * @throws PrestaShopDatabaseException
    485:     * @throws PrestaShopException
    486:     */
    487:    public function query($sql)
    488:    {
    489:        if ($sql instanceof DbQuery) {
    490:            $sql = $sql->build();
    491:        }
    492:
    493:        $this->result = $this->_query($sql);
    494:
    495:        if ($this->result === false && $this->getNumberError() == 2006) {
    496:            if ($this->connect()) {
    497:                $this->result = $this->_query($sql);
    498:            }
    499:        }
    500:
    501:        if ($this->result === false && $this->throwOnError) {
    502:            $this->displayError($sql);
    503:        }
    504:
    505:        return $this->result;
    506:    }
    507:
    508:    /**
    509:     * Executes an INSERT query
    510:     *
    511:     * @param string $table      Table name without prefix
    512:     * @param array  $data       Data to insert as associative array. If $data is a list of arrays, multiple insert will be done
    
    3. classes/db/Db.php:789 source DbCore->query()
    770:     * This function automatically adds "LIMIT 1" to the query
    771:     *
    772:     * @param string|DbQuery $sql      the select query (without "LIMIT 1")
    773:     * @param bool           $useCache Deprecated, the internal query cache is no longer used
    774:     *
    775:     * @return array|false
    776:     * @throws PrestaShopDatabaseException
    777:     * @throws PrestaShopException
    778:     */
    779:    public function getRow($sql, $useCache = true)
    780:    {
    781:        if ($sql instanceof DbQuery) {
    782:            $sql = $sql->build();
    783:        }
    784:
    785:        $sql = rtrim($sql, " \t\n\r\0\x0B;").' LIMIT 1';
    786:        $this->result = false;
    787:        $this->last_query = $sql;
    788:
    789:        $this->result = $this->query($sql);
    790:        if (!$this->result) {
    791:            $result = false;
    792:        } else {
    793:            $result = $this->nextRow($this->result);
    794:        }
    795:
    796:        $this->last_cached = false;
    797:
    798:        if (! is_array($result)) {
    799:            $result = false;
    
    4. classes/db/Db.php:816 source DbCore->getRow()
    797:
    798:        if (! is_array($result)) {
    799:            $result = false;
    800:        }
    801:
    802:        return $result;
    803:    }
    804:
    805:    /**
    806:     * Returns a value from the first row, first column of a SELECT query
    807:     *
    808:     * @param string|DbQuery $sql
    809:     * @param bool           $useCache Deprecated, the internal query cache is no longer used
    810:     *
    811:     * @return mixed
    812:     * @throws PrestaShopException
    813:     */
    814:    public function getValue($sql, $useCache = true)
    815:    {
    816:        if (!$result = $this->getRow($sql, $useCache)) {
    817:            return false;
    818:        }
    819:
    820:        return array_shift($result);
    821:    }
    822:
    823:    /**
    824:     * Get number of rows for last result
    825:     *
    826:     * @return int
    
    5. modules/ets_abandonedcart/controllers/admin/AdminEtsACDashboardController.php:256 source DbCore->getValue()
    237:        $qr = '
    238:            SELECT SUM((tmp.price + tmp.attribute_price)* pcp.quantity)
    239:            FROM `' . _DB_PREFIX_ . 'cart` c
    240:            LEFT JOIN `' . _DB_PREFIX_ . 'cart_product` pcp ON pcp.id_cart = c.id_cart
    241:            LEFT JOIN (
    242:                SELECT p.id_product
    243:                    , pps.id_shop
    244:                    , pps.`price`
    245:                    , pps.`ecotax`
    246:                    , ' . ($is_feature_active ? 'IFNULL(ppas.id_product_attribute, 0) id_product_attribute, ppas.`price` as attribute_price' : '0 as id_product_attribute, 0 as attribute_price') . '
    247:                FROM `' . _DB_PREFIX_ . 'product` p
    248:                 ' . ($is_feature_active ? '
    249:                    LEFT JOIN `' . _DB_PREFIX_ . 'product_shop` pps on (p.id_product = pps.id_product)
    250:                    LEFT JOIN `' . _DB_PREFIX_ . 'product_attribute_shop` ppas on (p.id_product = ppas.id_product)
    251:                ' : '') . '
    252:            ) as tmp ON (pcp.id_product = tmp.id_product AND pcp.id_product_attribute = tmp.id_product_attribute AND tmp.id_shop = c.id_shop)
    253:            LEFT JOIN `' . _DB_PREFIX_ . 'ets_abancart_tracking` eat ON (eat.id_cart = c.id_cart)
    254:            WHERE c.id_shop = ' . (int)$this->context->shop->id . ' AND (eat.id_cart is NOT NULL OR eat.id_cart > 0);
    255:        ';
    256:        $totalAbandonedCart = Tools::displayPrice((float)Db::getInstance()->getValue($qr), $currency);
    257:        /*---End Abandoned Carts---*/
    258:
    259:        /*---Generated voucher code---*/
    260:        $toSQL = '
    261:			SELECT COUNT(t.id_cart_rule) FROM (SELECT id_cart_rule FROM `' . _DB_PREFIX_ . 'ets_abancart_tracking` t WHERE t.id_shop=' . (int)$this->context->shop->id . ') as t
    262:			INNER JOIN `' . _DB_PREFIX_ . 'cart_rule` cr ON (cr.id_cart_rule = t.id_cart_rule)
    263:		';
    264:        $totalGeneratedCode = (int)Db::getInstance()->getValue($toSQL);
    265:        $totalUseGeneratedCode = (int)Db::getInstance()->getValue($toSQL . '
    266:			LEFT JOIN `' . _DB_PREFIX_ . 'cart_cart_rule` ccr ON (ccr.id_cart_rule = cr.id_cart_rule)
    
    6. modules/ets_abandonedcart/controllers/admin/AdminEtsACDashboardController.php:203 source AdminEtsACDashboardController->initBlock()
    184:
    185:    public function initToolbar()
    186:    {
    187:    }
    188:
    189:    public function initProcess()
    190:    {
    191:        parent::initProcess();
    192:
    193:        if (null == $this->display) {
    194:            $this->display = 'list';
    195:        }
    196:    }
    197:
    198:    public function initContent()
    199:    {
    200:        parent::initContent();
    201:
    202:        if ($this->display == 'list')
    203:            $this->initBlock();
    204:    }
    205:
    206:    public function setMedia($isNewTheme = false)
    207:    {
    208:        parent::setMedia($isNewTheme);
    209:
    210:        $this->addJS(array(
    211:            $this->mPath . 'views/js/chart.admin.js',
    212:        ));
    213:    }
    
    7. classes/controller/Controller.php:215 source AdminEtsACDashboardController->initContent()
    196:    public function run()
    197:    {
    198:        $this->init();
    199:        if ($this->checkAccess()) {
    200:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    201:                $this->setMedia();
    202:            }
    203:
    204:            $this->postProcess();
    205:
    206:            if (!empty($this->redirect_after)) {
    207:                $this->redirect();
    208:            }
    209:
    210:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    211:                $this->initHeader();
    212:            }
    213:
    214:            if ($this->viewAccess()) {
    215:                $this->initContent();
    216:            } else {
    217:                $this->errors[] = Tools::displayError('Access denied.');
    218:            }
    219:
    220:            if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
    221:                $this->initFooter();
    222:            }
    223:
    224:            if ($this->ajax) {
    225:                $action = Tools::toCamelCase(Tools::getValue('action'), true);
    
    8. classes/Dispatcher.php:861 source ControllerCore->run()
    842:                    include_once($retrocompatibilityAdminTab);
    843:                    include_once(_PS_ADMIN_DIR_.'/functions.php');
    844:                    runAdminTab($this->controller, !empty($_REQUEST['ajaxMode']));
    845:
    846:                    return;
    847:                }
    848:                break;
    849:
    850:            default:
    851:                throw new PrestaShopException('Bad front controller chosen');
    852:        }
    853:
    854:        // Instantiate controller
    855:        $controller = ServiceLocator::getInstance()->getController($controllerClass);
    856:
    857:        // Execute hook dispatcher
    858:        Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    859:
    860:        // Running controller
    861:        $controller->run();
    862:    }
    863:
    864:    /**
    865:     * Retrieve the controller from url or request uri if routes are activated
    866:     *
    867:     * @param int|null $idShop
    868:     *
    869:     * @return string
    870:     *
    871:     * @throws PrestaShopException
    
    9. override/classes/Dispatcher.php:39 source DispatcherCore->dispatch()
    20: *  International Registered Trademark & Property of ETS-Soft
    21: */
    22:class Dispatcher extends DispatcherCore
    23:{
    24:    /*
    25:    * module: ets_superspeed
    26:    * date: 2021-02-28 16:53:39
    27:    * version: 1.2.4
    28:    */
    29:    public function dispatch() {
    30:        if(@file_exists(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php'))
    31:        {
    32:            require_once(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php');
    33:            if($cache = Ets_superspeed::displayContentCache(true))
    34:            {
    35:                echo $cache;
    36:                exit;
    37:            }
    38:        }
    39:        parent::dispatch();
    40:    }
    41:}
    10. smtgitb9e0nbr7r0/index.php:58 source Dispatcher->dispatch()
    39:if (!defined('PS_ADMIN_DIR')) {
    40:    define('PS_ADMIN_DIR', _PS_ADMIN_DIR_);
    41:}
    42:
    43:// For retrocompatibility with "tab" parameter
    44:if (!isset($_GET['controller']) && isset($_GET['tab']) && is_string($_GET['tab'])) {
    45:    $_GET['controller'] = strtolower($_GET['tab']);
    46:}
    47:if (!isset($_POST['controller']) && isset($_POST['tab']) && is_string($_POST['tab'])) {
    48:    $_POST['controller'] = strtolower($_POST['tab']);
    49:}
    50:if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']) && is_string($_REQUEST['tab'])) {
    51:    $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    52:}
    53:
    54:require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
    55:require(_PS_ADMIN_DIR_.'/functions.php');
    56:
    57:// Prepare and trigger admin dispatcher
    58:Dispatcher::getInstance()->dispatch();
    
  5. Fair question.  Too many much needed third party modules go the way of the dodo if I upgrade. Ran some tests but we have issues with several modules.  I am putting together a fund to get all those modules fixed and be able to move further down BUT of course, now PHP 8 is now a thing, so yet a new delay and a massive overhaul in sight...

    Still need to be able to work while I put together the plan to reconstruct nearly everything... 😞

  6. Hi!

    I am using the most up to date version of TB 1.3 under the latest version of PHP 7.4.

    When I try to use the file manager from TB, it seems like all the permissions are forbidden: I cannot delete or upload any images and the same for my employees.  See screenshot.

    I need to manually go to the folder and manually upload everything to be able to select them by the file Manager later.

    I fixed permissions on all levels of the website and even ran a special script to fix any and all permissions on the website, to no avail.

    Is there something else I am not thinking of?

    Thank you in advance.

    Screen Shot 2023-01-16 at 1.48.51 PM.png

  7. 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
    
  8. 2 hours ago, datakick said:

    Did you, by any chance, update to bleeding edge and then back to stable?

    I bet you have an extra column named 'active' in table 'tb_category_shop'. You can check using core updater

    Hi!  Yes, I did.  For some reason, even after installing CoreUpdater 1.4.5, it wsa like there was nothing. I could not upgrade to 1.3.  The only way was to upgrade to bleeding edge, which I did.  Then everything actually updated.  But I realized that some plugins where no longer working, so I downgraded to stable.

    Coreupdater told me there was problems with the database and fixed them but did not tell me about the Category issue or fix it.

    Remove the column, this way in the database, fixed the issue indeed:

    ALTER TABLE `tb_category_shop`
    DROP COLUMN `active`;

    Thank you.

    Was there changes to ThemeConfigurator also (see my other post)?  Because I am having issues with that one too and I did not use to have those.

    Thank you very much!

  9. I also have an issue with Themeconfigurator 3.0.10.  I get the following error after a 500 http error on the site:

     

    Decoded exception

    Syntax error in template "file:/home/mysite/public_html/themes/theme1219/modules/themeconfigurator/views/templates/hook/hook.tpl" on line 12 "if}" - Unexpected "<", expected one of: "{" , DOLLARID , "id, name" , "$"

    in file vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php at line 12

    Source file: vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php

    1:<?php
    2:/**
    3: * Smarty Internal Plugin Smarty Template Compiler Base
    4: * This file contains the basic classes and methods for compiling Smarty templates with lexer/parser
    5: *
    6: * @package    Smarty
    7: * @subpackage Compiler
    8: * @author     Uwe Tews
    9: */
    10:
    11:/**
    12: * Main abstract compiler class
    13: *
    14: * @package    Smarty
    15: * @subpackage Compiler
    16: *
    17: * @property Smarty_Internal_SmartyTemplateCompiler $prefixCompiledCode  = ''
    18: * @property Smarty_Internal_SmartyTemplateCompiler $postfixCompiledCode = ''
    19: * @method   registerPostCompileCallback($callback, $parameter = array(), $key = null, $replace = false)
    20: * @method   unregisterPostCompileCallback($key)
    21: */
    22:abstract class Smarty_Internal_TemplateCompilerBase
    23:{
    24:    /**
    25:     * compile tag objects cache
    26:     *
    27:     * @var array
    28:     */
    29:    public static $_tag_objects = array();
    30:
    
     

     

  10. Hi everyone.  My site started giving me 500 error when I click on some, not all categories.  Basically Best Sellers, price-drop and new products do work properly.  But all the ones i created give me a 500 error.  Any help or hint is appreciated.

    Here is the actual error:

     

    Decoded exception

    Column 'active' in where clause is ambiguous

    in file classes/Category.php at line 1727

    SQL

    		SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description
    		FROM `tb_category` c
    		 INNER JOIN tb_category_shop category_shop
    		ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1)
    		LEFT JOIN `tb_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 1  AND cl.id_shop = 1 )
    		LEFT JOIN `tb_category_group` cg ON (cg.`id_category` = c.`id_category`)
    		WHERE `id_parent` = 3
    		AND `active` = 1
    		AND cg.`id_group` =1
    		GROUP BY c.`id_category`
    		ORDER BY `level_depth` ASC, category_shop.`position` ASC

    Source file: classes/Category.php

    1708:    public function getSubCategories($idLang, $active = true)
    1709:    {
    1710:        $sqlGroupsWhere = '';
    1711:        $sqlGroupsJoin = '';
    1712:        if (Group::isFeatureActive()) {
    1713:            $sqlGroupsJoin = 'LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)';
    1714:            $groups = FrontController::getCurrentCustomerGroups();
    1715:            $sqlGroupsWhere = 'AND cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '='.(int) Group::getCurrent()->id);
    1716:        }
    1717:
    1718:        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
    1719:            '
    1720:		SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description
    1721:		FROM `'._DB_PREFIX_.'category` c
    1722:		'.Shop::addSqlAssociation('category', 'c').'
    1723:		LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.(int) $idLang.' '.Shop::addSqlRestrictionOnLang('cl').')
    1724:		'.$sqlGroupsJoin.'
    1725:		WHERE `id_parent` = '.(int) $this->id.'
    1726:		'.($active ? 'AND `active` = 1' : '').'
    1727:		'.$sqlGroupsWhere.'
    1728:		GROUP BY c.`id_category`
    1729:		ORDER BY `level_depth` ASC, category_shop.`position` ASC'
    1730:        );
    1731:
    1732:        foreach ($result as &$row) {
    1733:            $row['id_image'] = (file_exists(_PS_CAT_IMG_DIR_.(int) $row['id_category'].'.jpg') || file_exists(_PS_CAT_IMG_DIR_.(int) $row['id_category'].'_thumb.jpg')) ? (int) $row['id_category'] : Language::getIsoById($idLang).'-default';
    1734:            $row['legend'] = 'no picture';
    1735:        }
    1736:
    1737:        return $result;
  11. We need to customize our shop for different functionalities specific to our industry.

    I also need to implement some functionalities to make our daily lives easier when we add products to the site, as there are several things that need to be done in two languages, but a lot of them could be done only once.  I already run scripts directly in the database to fix some of those issues but it might be easier and less taxing if they were done at the moment of input.

    We also want to revamp our theme to make it more modern and to cut down on the clutter and improve loading speed.

    And some modules need to be fixed or upgraded for PHP 8.

    This is a paid offer.  Please PM us for more details and to send quotes.

    Thank you.

     

  12. 4 minutes ago, musicmaster said:

    I don't see what Thirty Bees could have done to help you in this case.

    I still got an error with the modules removed and disabled. TB would still not save and only said: An error occurred while updating an object. product ()

    The debug mode knew what the error was, but it was buried deep because it is mostly a dev tool - had I gotten that error right off the bat, I would have not wasted so much time trying to find what was causing the issue.  So, my point is, if debug mode knows the error, why is that not fed to us instead of these generic, useless error messages?

    That's all - it is a suggestion that would help a lot of people like me.

  13.  

    2 minutes ago, musicmaster said:

    Short analysis:

     - It looks like it comes from the module ets_superspeed. Try removing it from below the /modules directory and then clear the cache.

     - A call to a function mysql_error() looks really weird. The standard has become mysqli_error() years ago.

     

    musicmaster:

    I definitely cleared the cache after disabling all the modules listed in the string.  I also disabled all overrides.  Eventually went as far as only using the TB modules.  As for the function mysql_error(), I could not tell you.  I am using the latest versions of all the modules, and they all seem to have been updated in the last year or so.

    UPDATE:

    OK.  After several hours, we finally figured it out.  I believe that error messages should be a little more explicit than this: An error occurred while updating an object. product ()

    I mean, yes, there is a problem with saving the object, and yes, from the exception log, we can tell it is database related...  But the database is vast.  The problem could be anywhere.  And in my experience, not necessarily directly related!

    Except, in this case, it was.  Somehow, after turning debug mode on, I finally got a useful answer while trying to save a product tag.  It told me that a function did not exist in the database.  With that, I was finally able to get a mysql error code while attempting the same save in phpmyadmin.  Investigating, we found that there was an extra space in a TRIM function in one of the triggers in the DB, which caused the error.  Fixing it solved all the issues.

    However, I do not understand why the error being sent to us is so generic in the first place.  Why do we not get the much clearer and on point errors from debug mode, since it can obviously pinpoint it much better?  I could have fixed my issue in an hour instead of agonizing over it for nearly 2 days...

    Merchants are not devs - we do need to develop some dev skills, wether we like it or not, but less generic error messages would help us tremendously, since we are working mostly from experience and cobbled together knowledge from the internet!!!

    It reminded me of a problem I had with carriers at some point a year or two ago, where the error message made no sense at all, and it forced me to look at things that were unrelated for days on end until a dev explained that it was an error message chosen at random from a list of error messages and that it had no relevance at all to the issue I was experiencing!!!  At this point, why bother with an error message at all???

    All this to say that error reporting should be improved, as often the error messages have no bearing on what is really happening - not talking about the exception log here, but the Core error messages.  If a more correct answer is able to be generated in debug mode, why can't we extract it from there directly?  It would save so much time!  And help those uncomfortable with debug mode or unfamilliar with it.  I mean, sometimes, the screen fills with errors and it can be scary for the uninitiated.  But if we could get a clearer, more specific error message, it would help everyone, from the DIY merchant to the devs themselves!

    Just a thought.

    • Like 1
  14. I cannot reach my developper but this odd problem started out of the blue yesterday, with no specific actions on our part.  We are now unable to save any products.  The logs seems to show a string of modules involved but disabling them still gives us an error when saving and the data does not make it to the database at all.  If someone can help us figure out what the issue is, we are really stalled right now.

    I have tried disabling all overrides, that still generates a 500 error.

    If I disable the third party modules and only use TB modules, I am still unable to save, albeit without a 500 error.  I get this instead: An error occurred while updating an object. product ()

    Thank you.

    Here is what the exception reads at (with all the modules on):

    Call to undefined function mysql_error()

    in file modules/psseobooster/psseobooster.php at line 2522

    Source file: modules/psseobooster/psseobooster.php

    2503:			if (version_compare(constant('_PS_VERSION_'),'1.6','>'))
    2504:				$this->context->controller->addJS($this->_path.'/js/psseobooster.js');
    2505:			else
    2506:				$this->context->controller->addJS($this->_path.'/js/psseobooster15.js');
    2507:		} else if ($this->context->controller->controller_name == 'AdminModules' && Tools::getValue('configure') == 'psseobooster'){
    2508:			$this->context->controller->addCSS($this->_path.'/css/psseobooster.css');
    2509:		}
    2510:
    2511:	}
    2512:
    2513:	public function hookActionProductUpdate($params)
    2514:	{
    2515:		// get all languages
    2516:		// for each of them, store the target keyword!
    2517:
    2518:		$id_product = (int)Tools::getValue('id_product');
    2519:		$languages = Language::getLanguages(true);
    2520:		foreach ($languages as $lang) {
    2521:			if(!Db::getInstance()->update('product_lang', array('target_keyword'=> pSQL(Tools::getValue('target_keyword_'.$lang['id_lang']))) ,'id_lang = ' . $lang['id_lang'] .' AND id_product = ' .$id_product ))
    2522:				$this->context->controller->_errors[] = Tools::displayError('Error: ').mysql_error();
    2523:		}
    2524:
    2525:		// then store indexation options
    2526:		$noindex = Tools::getValue('noindex') ? 'noindex' : '';
    2527:		$nofollow = Tools::getValue('nofollow') ? 'nofollow' : '';
    2528:		$seoindex = $noindex . ',' . $nofollow;
    2529:		$force410 = Tools::getValue('force410');
    2530:		if(!Db::getInstance()->update('product_shop', array('seoindex' => pSQL($seoindex), 'seo410' => (int)$force410), 'id_product = '. $id_product .' AND id_shop = ' . $this->context->shop->id))
    2531:			$this->context->controller->_errors[] = Tools::displayError('Error: ').mysql_error();
    2532:
    

    Stack trace

    1. classes/Hook.php:769  source psSeoBooster->hookActionProductUpdate(arguments) 
    750:     *
    751:     * @throws PrestaShopDatabaseException
    752:     * @throws PrestaShopException
    753:     * @since   1.0.0
    754:     * @version 1.0.0 Initial version
    755:     */
    756:    public static function coreCallHook($module, $method, $params)
    757:    {
    758:        // Define if we will log modules performances for this session
    759:        if (Module::$_log_modules_perfs === null) {
    760:            $modulo = _PS_DEBUG_PROFILING_ ? 1 : Configuration::get('PS_log_modules_perfs_MODULO');
    761:            Module::$_log_modules_perfs = ($modulo && mt_rand(0, $modulo - 1) == 0);
    762:            if (Module::$_log_modules_perfs) {
    763:                Module::$_log_modules_perfs_session = mt_rand();
    764:            }
    765:        }
    766:
    767:        // Immediately return the result if we do not log performances
    768:        if (!Module::$_log_modules_perfs) {
    769:            return $module->{$method}($params);
    770:        }
    771:
    772:        // Store time and memory before and after hook call and save the result in the database
    773:        $timeStart = microtime(true);
    774:        $memoryStart = memory_get_usage(true);
    775:
    776:        // Call hook
    777:        $r = $module->{$method}($params);
    778:
    779:        $timeEnd = microtime(true);
    
    2. override/classes/Hook.php:23  source HookCore::coreCallHook(arguments) 
    4:      /*
    5:    * module: Litespeed 
    6:    * date: 2021-02-18 11:36:58
    7:    * version: v1.2.7
    8:    */  
    9:   public static function coreCallHook($module, $method, $params)
    10:    {
    11:        if (defined('_LITESPEED_DEBUG_')
    12:            && _LITESPEED_DEBUG_ >= LiteSpeedCacheLog::LEVEL_HOOK_DETAIL) {
    13:            $mesg = '  in hook coreCallHook ' . get_class($module) . ' - ' . $method;
    14:            if ($method == 'hooklitespeedEsiBegin') {
    15:                $mesg .= ' params m=' . $params['m'] . ' field=' . $params['field'];
    16:                if (isset($params['hook']))
    17:                    $mesg .= ' hook=' . $params['hook'];
    18:                if (isset($params['tpl']))
    19:                    $mesg .= ' tpl=' . $params['tpl'];
    20:            }
    21:            LiteSpeedCacheLog::log($mesg, LiteSpeedCacheLog::LEVEL_HOOK_DETAIL);
    22:        }
    23:        $html = parent::coreCallHook($module, $method, $params);
    24:        if (defined('_LITESPEED_CACHE_')
    25:                && ($marker = LiteSpeedCache::injectCallHook($module, $method)) !== false) {
    26:            $html = $marker . $html . LiteSpeedCache::ESI_MARKER_END;
    27:        }
    28:        return $html;
    29:    }
    30:    public static function coreRenderWidget($module, $hook_name, $params)
    31:    {
    32:        if (defined('_LITESPEED_DEBUG_')
    33:                && _LITESPEED_DEBUG_ >= LiteSpeedCacheLog::LEVEL_HOOK_DETAIL) {
    
    3. classes/Hook.php:471  source Hook::coreCallHook(arguments) 
    452:
    453:            if ($usePush && !$moduleInstance->allow_push) {
    454:                continue;
    455:            }
    456:            // Check which / if method is callable
    457:            $hookCallable = is_callable([$moduleInstance, 'hook'.$hookName]);
    458:            $hookRetroCallable = is_callable([$moduleInstance, 'hook'.$retroHookName]);
    459:
    460:            if ($hookCallable || $hookRetroCallable) {
    461:
    462:                if (Module::preCall($moduleInstance->name)) {
    463:                    $hookArgs['altern'] = ++$altern;
    464:
    465:                    if ($usePush && isset($moduleInstance->push_filename) && file_exists($moduleInstance->push_filename)) {
    466:                        Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
    467:                    }
    468:
    469:                    // Call hook method
    470:                    if ($hookCallable) {
    471:                        $display = Hook::coreCallHook($moduleInstance, 'hook' . $hookName, $hookArgs);
    472:                    } elseif ($hookRetroCallable) {
    473:                        $display = Hook::coreCallHook($moduleInstance, 'hook' . $retroHookName, $hookArgs);
    474:                    }
    475:
    476:                    // Live edit
    477:                    if (!$arrayReturn && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
    478:                        && Tools::getValue('liveToken') == Tools::getAdminToken(
    479:                            'AdminModulesPositions'
    480:                            . (int)Tab::getIdFromClassName('AdminModulesPositions') . (int)Tools::getValue('id_employee')
    481:                        )
    
    4. classes/Hook.php:288  source HookCore::execWithoutCache(arguments) 
    269:     * @param int    $idShop          If specified, hook will be execute the shop with this ID
    270:     *
    271:     * @throws PrestaShopException
    272:     *
    273:     * @return string|array modules output
    274:     *
    275:     * @since   1.0.0
    276:     * @version 1.0.0 Initial version
    277:     */
    278:    public static function exec(
    279:        $hookName,
    280:        $hookArgs = [],
    281:        $idModule = null,
    282:        $arrayReturn = false,
    283:        $checkExceptions = true,
    284:        $usePush = false,
    285:        $idShop = null
    286:    ) {
    287:        if ($arrayReturn || !PageCache::isEnabled() || PageCacheKey::get() === false) {
    288:            return static::execWithoutCache($hookName, $hookArgs, $idModule, $arrayReturn, $checkExceptions, $usePush, $idShop);
    289:        }
    290:
    291:        if (!$moduleList = static::getHookModuleExecList($hookName)) {
    292:            return '';
    293:        }
    294:
    295:        $return = '';
    296:
    297:        if (!$idModule) {
    298:            $cacheEntry = PageCache::get();
    
    5. modules/ets_superspeed/classes/ext/ets_hook:59  source HookCore::exec(arguments) 
    40:        'displayProductTabContent' => array('from' => '1.7.0.0'),
    41:        'displayProductTab' => array('from' => '1.7.0.0'),
    42:    );
    43:    public static function exec16($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,
    44:                                $use_push = false, $id_shop = null)
    45:    {
    46:        if (defined('PS_INSTALLATION_IN_PROGRESS')) {
    47:            return;
    48:        }
    49:        if(Tools::getValue('ajax')) {
    50:            $ajax=true;
    51:        }
    52:        else
    53:            $ajax=false;
    54:        if(self::_checkPageCache()&& !$ajax)
    55:            return HookCore::exec($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop);
    56:        $page_cache = Configuration::get('ETS_SPEED_ENABLE_PAGE_CACHE') && Configuration::get('ETS_SPEED_PAGES_TO_CACHE') && Tools::getValue('controller') &&  in_array(Tools::getValue('controller'),explode(',',Configuration::get('ETS_SPEED_PAGES_TO_CACHE'))); 
    57:        $controller = Context::getContext()->controller;
    58:        if(!isset($controller->controller_type) || ($controller->controller_type!='modulefront' && $controller->controller_type!='front'))
    59:            return HookCore::exec($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop);
    60:        static $disable_non_native_modules = null;
    61:        if ($disable_non_native_modules === null) {
    62:            $disable_non_native_modules = (bool)Configuration::get('PS_DISABLE_NON_NATIVE_MODULE');
    63:        }
    64:        if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name)) {
    65:            throw new PrestaShopException('Invalid id_module or hook_name');
    66:        }
    67:        if (!$module_list = Hook::getHookModuleExecList($hook_name)) {
    68:            return '';
    69:        }
    
    6. override/classes/Hook.php:61  source Ets_Hook::exec16(arguments) 
    42:        return $html;
    43:    }
    44:    /*
    45:    * module: ets_superspeed
    46:    * date: 2021-02-28 16:53:39
    47:    * version: 1.2.4
    48:    */
    49:    public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,$use_push = false, $id_shop = null,$chain=false)
    50:    {
    51:        require_once(dirname(__FILE__).'/../../modules/ets_superspeed/classes/ext/ets_hook');
    52:        $class='Ets_Hook';
    53:        $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
    54:        if (Tools::version_compare(_PS_VERSION_,'1.7','>=')) {
    55:            $method='exec17';
    56:            return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop,$chain,$backtrace));
    57:        }
    58:        else
    59:        {
    60:            $method='exec16';
    61:            return call_user_func_array(array($class, $method),array($hook_name,$hook_args,$id_module,$array_return,$check_exceptions,$use_push,$id_shop));
    62:        }
    63:    }
    64:}
    
    7. classes/Product.php:5178  source Hook::exec(arguments) 
    5159:
    5160:        $return = parent::update($nullValues);
    5161:
    5162:        $this->setGroupReduction();
    5163:
    5164:        // Sync stock Reference, EAN13 and UPC
    5165:        if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && StockAvailable::dependsOnStock($this->id, Context::getContext()->shop->id)) {
    5166:            Db::getInstance()->update(
    5167:                'stock',
    5168:                [
    5169:                    'reference' => pSQL($this->reference),
    5170:                    'ean13'     => pSQL($this->ean13),
    5171:                    'upc'       => pSQL($this->upc),
    5172:                ],
    5173:                'id_product = '.(int) $this->id.' AND id_product_attribute = 0'
    5174:            );
    5175:        }
    5176:
    5177:        Hook::exec('actionProductSave', ['id_product' => (int) $this->id, 'product' => $this]);
    5178:        Hook::exec('actionProductUpdate', ['id_product' => (int) $this->id, 'product' => $this]);
    5179:        if ($this->getType() == static::PTYPE_VIRTUAL && $this->active && !Configuration::get('PS_VIRTUAL_PROD_FEATURE_ACTIVE')) {
    5180:            Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1');
    5181:        }
    5182:
    5183:        return $return;
    5184:    }
    5185:
    5186:    /**
    5187:     * Set Group reduction if needed
    5188:     *
    
    8. controllers/admin/AdminProductsController.php:2492  source ProductCore->update() 
    2473:                    $isAssociatedToShop = false;
    2474:                    $combinations = Product::getProductAttributesIds($object->id);
    2475:                    if ($combinations) {
    2476:                        foreach ($combinations as $idCombination) {
    2477:                            $combination = new Combination((int) $idCombination['id_product_attribute']);
    2478:                            $defaultCombination = new Combination((int) $idCombination['id_product_attribute'], null, (int) $this->object->id_shop_default);
    2479:
    2480:                            $def = ObjectModel::getDefinition($defaultCombination);
    2481:                            foreach ($def['fields'] as $fieldName => $row) {
    2482:                                $combination->$fieldName = ObjectModel::formatValue($defaultCombination->$fieldName, $def['fields'][$fieldName]['type']);
    2483:                            }
    2484:
    2485:                            $combination->save();
    2486:                        }
    2487:                    }
    2488:                } else {
    2489:                    $isAssociatedToShop = true;
    2490:                }
    2491:
    2492:                if ($object->update()) {
    2493:                    // If the product doesn't exist in the current shop but exists in another shop
    2494:                    if (Shop::getContext() == Shop::CONTEXT_SHOP && !$existingProduct->isAssociatedToShop($this->context->shop->id)) {
    2495:                        $outOfStock = StockAvailable::outOfStock($existingProduct->id, $existingProduct->id_shop_default);
    2496:                        $dependsOnStock = StockAvailable::dependsOnStock($existingProduct->id, $existingProduct->id_shop_default);
    2497:                        StockAvailable::setProductOutOfStock((int) $this->object->id, $outOfStock, $this->context->shop->id);
    2498:                        StockAvailable::setProductDependsOnStock((int) $this->object->id, $dependsOnStock, $this->context->shop->id);
    2499:                    }
    2500:
    2501:                    Logger::addLog(sprintf($this->l('%s modification', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int) $this->object->id, true, (int) $this->context->employee->id);
    2502:                    if (in_array($this->context->shop->getContext(), [Shop::CONTEXT_SHOP, Shop::CONTEXT_ALL])) {
    
    9. override/controllers/admin/AdminProductsController.php:46  source AdminProductsControllerCore->processUpdate() 
    27:{
    28:    /*
    29:    * module: amazzingfilter
    30:    * date: 2020-05-22 11:20:24
    31:    * version: 3.0.3
    32:    */
    33:    public function processAdd()
    34:    {
    35:        $ret = parent::processAdd();
    36:        Hook::exec('actionIndexProduct', array('product' => $this->object->id));
    37:        return $ret;
    38:    }
    39:    /*
    40:    * module: amazzingfilter
    41:    * date: 2020-05-22 11:20:24
    42:    * version: 3.0.3
    43:    */
    44:    public function processUpdate()
    45:    {
    46:        $ret = parent::processUpdate();
    47:        Hook::exec('actionIndexProduct', array('product' => $this->object->id));
    48:        return $ret;
    49:    }
    50:}
    
    10. classes/controller/AdminController.php:1275  source AdminProductsController->processUpdate() 
    1256:
    1257:        return $object;
    1258:    }
    1259:
    1260:    /**
    1261:     * Call the right method for creating or updating object
    1262:     *
    1263:     * @return bool
    1264:     *
    1265:     * @since   1.0.0
    1266:     * @version 1.0.0 Initial version
    1267:     * @throws PrestaShopException
    1268:     * @throws PrestaShopException
    1269:     */
    1270:    public function processSave()
    1271:    {
    1272:        if ($this->id_object) {
    1273:            $this->object = $this->loadObject();
    1274:
    1275:            return $this->processUpdate();
    1276:        } else {
    1277:            return $this->processAdd();
    1278:        }
    1279:    }
    1280:
    1281:    /**
    1282:     * Object update
    1283:     *
    1284:     * @return ObjectModel|false
    1285:     * @throws PrestaShopException
    
    11. classes/controller/AdminController.php:606  source AdminControllerCore->processSave() 
    587:                // Process list filtering
    588:                if ($this->filter && $this->action != 'reset_filters') {
    589:                    $this->processFilter();
    590:                }
    591:
    592:                if (isset($_POST) && count($_POST) && (int) Tools::getValue('submitFilter'.$this->list_id) || Tools::isSubmit('submitReset'.$this->list_id)) {
    593:                    $this->setRedirectAfter(static::$currentIndex.'&token='.$this->token.(Tools::isSubmit('submitFilter'.$this->list_id) ? '&submitFilter'.$this->list_id.'='.(int) Tools::getValue('submitFilter'.$this->list_id) : '').(isset($_GET['id_'.$this->list_id]) ? '&id_'.$this->list_id.'='.(int) $_GET['id_'.$this->list_id] : ''));
    594:
    595:                    if (!empty(Tools::getValue('id_'.$this->list_id.'_category'))) {
    596:                        $this->setRedirectAfter($this->redirect_after.'&id_'.$this->list_id.'_category='.Tools::getValue('id_'.$this->list_id.'_category'));
    597:                    }
    598:                }
    599:
    600:                // If the method named after the action exists, call "before" hooks, then call action method, then call "after" hooks
    601:                if (!empty($this->action) && method_exists($this, 'process'.ucfirst(Tools::toCamelCase($this->action)))) {
    602:                    // Hook before action
    603:                    Hook::exec('actionAdmin'.ucfirst($this->action).'Before', ['controller' => $this]);
    604:                    Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', ['controller' => $this]);
    605:                    // Call process
    606:                    $return = $this->{'process'.Tools::toCamelCase($this->action)}();
    607:                    // Hook After Action
    608:                    Hook::exec('actionAdmin'.ucfirst($this->action).'After', ['controller' => $this, 'return' => $return]);
    609:                    Hook::exec('action'.get_class($this).ucfirst($this->action).'After', ['controller' => $this, 'return' => $return]);
    610:
    611:                    return $return;
    612:                }
    613:            }
    614:        } catch (PrestaShopException $e) {
    615:            $this->errors[] = $e->getMessage();
    616:        };
    
    12. controllers/admin/AdminProductsController.php:1302  source AdminControllerCore->postProcess() 
    1283:        }
    1284:
    1285:        if (is_array($this->submitted_tabs) && in_array($tabName, $this->submitted_tabs)) {
    1286:            return true;
    1287:        }
    1288:
    1289:        return false;
    1290:    }
    1291:
    1292:    /**
    1293:     * postProcess handle every checks before saving products information
    1294:     *
    1295:     * @return void
    1296:     *
    1297:     * @since 1.0.0
    1298:     */
    1299:    public function postProcess()
    1300:    {
    1301:        if (!$this->redirect_after) {
    1302:            parent::postProcess();
    1303:        }
    1304:
    1305:        if ($this->display == 'edit' || $this->display == 'add') {
    1306:            $this->addJqueryUI(
    1307:                [
    1308:                    'ui.core',
    1309:                    'ui.widget',
    1310:                ]
    1311:            );
    1312:
    
    13. classes/controller/Controller.php:197  source AdminProductsControllerCore->postProcess() 
    178:        } else {
    179:            $this->$property = $value;
    180:        }
    181:    }
    182:
    183:    /**
    184:     * Starts the controller process
    185:     *
    186:     * @since   1.0.0
    187:     * @version 1.0.0 Initial version
    188:     */
    189:    public function run()
    190:    {
    191:        $this->init();
    192:        if ($this->checkAccess()) {
    193:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    194:                $this->setMedia();
    195:            }
    196:
    197:            $this->postProcess();
    198:
    199:            if (!empty($this->redirect_after)) {
    200:                $this->redirect();
    201:            }
    202:
    203:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    204:                $this->initHeader();
    205:            }
    206:
    207:            if ($this->viewAccess()) {
    
    14. classes/Dispatcher.php:852  source ControllerCore->run() 
    833:                    return;
    834:                }
    835:                break;
    836:
    837:            default:
    838:                throw new PrestaShopException('Bad front controller chosen');
    839:        }
    840:
    841:        // Instantiate controller
    842:        try {
    843:            // Loading controller
    844:            $controller = Controller::getController($controllerClass);
    845:
    846:            // Execute hook dispatcher
    847:            if (isset($paramsHookActionDispatcher)) {
    848:                Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    849:            }
    850:
    851:            // Running controller
    852:            $controller->run();
    853:        } catch (PrestaShopException $e) {
    854:            $e->displayMessage();
    855:        }
    856:    }
    857:
    858:    /**
    859:     * Retrieve the controller from url or request uri if routes are activated
    860:     *
    861:     * @param int|null $idShop
    862:     *
    
    15. override/classes/Dispatcher.php:39  source DispatcherCore->dispatch() 
    20: *  International Registered Trademark & Property of ETS-Soft
    21: */
    22:class Dispatcher extends DispatcherCore
    23:{
    24:    /*
    25:    * module: ets_superspeed
    26:    * date: 2021-02-28 16:53:39
    27:    * version: 1.2.4
    28:    */
    29:    public function dispatch() {
    30:        if(@file_exists(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php'))
    31:        {
    32:            require_once(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php');
    33:            if($cache = Ets_superspeed::displayContentCache(true))
    34:            {
    35:                echo $cache;
    36:                exit;
    37:            }
    38:        }
    39:        parent::dispatch();
    40:    }
    41:}
    16. smtgitb9e0nbr7r0/index.php:69  source Dispatcher->dispatch() 
    50:
    51:// For retrocompatibility with "tab" parameter
    52:if ( ! (isset($_GET['controller']) && $_GET['controller'])
    53:    && (isset($_GET['tab']) && $_GET['tab'])
    54:) {
    55:    $_GET['controller'] = strtolower($_GET['tab']);
    56:}
    57:if ( ! (isset($_POST['controller']) && $_POST['controller'])
    58:    && (isset($_POST['tab']) && $_POST['tab'])
    59:) {
    60:    $_POST['controller'] = strtolower($_POST['tab']);
    61:}
    62:if ( ! (isset($_REQUEST['controller']) && $_REQUEST['controller'])
    63:    && (isset($_REQUEST['tab']) && $_REQUEST['tab'])
    64:) {
    65:    $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    66:}
    67:
    68:// Prepare and trigger admin dispatcher
    69:Dispatcher::getInstance()->dispatch();
  15. 12 minutes ago, Traumflug said:

    Apparently somebody was too lazy to implement automatic labels. Or considered it a good idea to put products on sale without changing the price.

    I have to admit that this one has been bugging me for a bit.  I now run an event directly in mysql to flush these or add them according to specific price - but it should be automated, makes no sense whatsoever in its current incarnation.

×
×
  • Create New...