Jump to content
thirty bees forum

b_otho

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by b_otho

  1. I use different themes for each shop as I also need different e-mail templates for each store. But I actually just found the solution.

    In HTMLTemplateInvoice.php I can insert extra variables in the data array at line 268 like these:

     

      $data = [
              
                'firstname_value' 			 => $customer->firstname,
                'company_value' 			 => $customer->company,
    
            ];

    and then I can call these from my invoice templates. Succes!

  2. How can I have different invoice adresses for two different stores in a multistore setup? Specifically I want the one shop to include first and last name and the second one to include a company name and no first / last name in the address section.

    It seems that the fields you setup under each country's setting changes for both stores, so that's not an option.

  3. Ok, so my server just went completely out of order. I had the guys at Cloudways look at it, and apperently it's because of this sql query:

     54 | ufpcfxkrgh | localhost | ufpcfxkrgh | Query   |   15 | Sending data | SELECT c.`id_guest`, c.`ip_address`, c.`date_add`, c.`http_referer`, "-" AS `page`
    FROM `tb_connections` c
    INNER JOIN `tb_guest` g ON c.`id_guest` = g.`id_guest`
    WHERE (g.`id_customer` IS NULL OR g.`id_customer` = 0  AND c.id_shop IN (1, 2) ) AND (TIME_TO_SEC(TIMEDIFF('2020-04-27 09:12:00', c.`date_add`)) < 1800) AND (c.`ip_address` NOT IN (1043105662))
    ORDER BY c.`date_add` DESC |         0 |             0 |

    I figure it might have something to do with me trying to add the following not too long ago:

    http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/#.XqaNMGgzaUk

    I couldn't make it work however, so I deleted the override. Could this be it? And could there still be something in the database that is causing the query? 

    Any help would be greatly appreciated! Thanks!

  4. Hello,

    I'm getting a 500 error when trying to create/edit products. It seems different tabs are having trouble loading. An error message could be like the following:

    Tab : Prices (500 error)
    A server error occurred while loading the tabs: some tabs could not be loaded.
    Please try again by refreshing the page.
    If you are still encountering this problem, please check your server logs or contact your hosting provider for assistance.

    How many and which tabs are loaded vary, but it always gives a 500 error. It works again if I enable debug mode, however. I also just created a staging version of my site via Cloudways, and this version works! I cannot see any difference in configuration between the two.

    I'm not sure if it's related, but I also got an 500 error on the frontend, which gave me this result when decrypted:

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

                $_resource_part_2_length = strlen($_resource_part_2);
    59:        }
    60:        $_dir = $_compile_dir;
    61:        if ($smarty->use_sub_dirs && isset($_compile_id)) {
    62:            $_dir .= $_compile_id . $_dir_sep;
    63:        }
    64:        if (isset($_compile_id)) {
    65:            $_compile_id_part = $_compile_dir . $_compile_id . $_dir_sep;
    66:            $_compile_id_part_length = strlen($_compile_id_part);
    67:        }
    68:        $_count = 0;
    69:        try {
    70:            $_compileDirs = new RecursiveDirectoryIterator($_dir);
    71:            // NOTE: UnexpectedValueException thrown for PHP >= 5.3
    72:        }
    73:        catch (Exception $e) {
    74:            return 0;
    75:        }
    76:        $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
    77:        foreach ($_compile as $_file) {
    78:             if (substr(basename($_file->getPathname()), 0, 1) == '.') {
    79:                continue;
    80:            }
    81:            $_filepath = (string) $_file;
    82:            if ($_file->isDir()) {
    83:                if (!$_compile->isDot()) {
    84:                    // delete folder if empty
    85:                    @rmdir($_file->getPathname());
    86:                }
    87:            } else {

    I'm hoping this might make sense to someone, cause it makes no sense to me, and it's very frustrating not being able to edit or create products.

  5. @datakick said in Updating to 1.06 - Error with "Address::isDeleted":

    @b_otho said in Updating to 1.06 - Error with "Address::isDeleted":

    Dyou mean Advanced Parameters > Configuration Information? I cannot see that anything should be wrong.

    If there are no changed files listed than it should definitely work -- the only other explanation is that the php APC cache wasn't flushed, so it's still uses the original php file.

    I just tried clearing APC cache through the module. Didn't help.

  6. When I enable debug mode and go to the manufacturer site it displays this:

    [ThirtyBeesDatabaseException]

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND productshop.active = 1) AND ( AND productshop.visibility IN ("both", "' at line 6

    SELECT COUNT(DISTINCT ps.id_product) FROM tb_product_supplier ps INNER JOIN tb_product p ON ps.id_product = p.id_product INNER JOIN tbproductshop productshop ON (productshop.idproduct = p.idproduct AND productshop.idshop = 1) WHERE (ps.id_supplier = 35) AND (ps.id_product_attribute = 0) AND ( AND productshop.active = 1) AND ( AND productshop.visibility IN ("both", "catalog")) AND (p.id_product IN (SELECT cp.id_product FROM tb_category_product cp LEFT JOIN tb_category_group cg ON (cp.id_category = cg.id_category) INNER JOIN tb_category ca ON cp.id_category = ca.id_category AND ca.active = 1 WHERE (cg.id_group = 1) )) LIMIT 1

    at line 808 in file classes/db/Db.php 803. if ($webserviceCall && $errno) { 804. $dbg = debugbacktrace(); 805. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 806. } elseif (PSDEBUGSQL_ && $errno && !defined('TBINSTALLATIONIN_PROGRESS')) { 807. if ($sql) { 808. throw new PrestaShopDatabaseException($this->getMsgError().'

    '.$sql.'
    '); 809. } 810. 811. throw new PrestaShopDatabaseException($this->getMsgError()); 812. } 813. } DbCore->displayError - [line 460 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 709 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 739 - classes/db/Db.php] - [2 Arguments] DbCore->getValue - [line 373 - classes/Supplier.php] - [1 Arguments] SupplierCore::getProducts - [line 490 - classes/controller/FrontController.php] - [7 Arguments] FrontControllerCore->getRelPrevNext - [line 379 - classes/controller/FrontController.php] - [2 Arguments] FrontControllerCore->getSeoFields - [line 277 - classes/controller/FrontController.php] FrontControllerCore->initContent - [line 113 - controllers/front/SupplierController.php] SupplierControllerCore->initContent - [line 366 - classes/controller/Controller.php] ControllerCore->run - [line 743 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 33 - index.php]

  7. Hello,

    I'm trying to configure my manufacturer pages. However, all pages display " Showing 1 - 0 of 1 item" and the pager does not seem to work. The page only displays one product even though there is multiple products connected to the manufacturer.

    If I change the pagination under Preferences > products I can get it to display all products, but it still says "Showing 1- 0" etc and the pager does not work.

    See screenshot below.

    0_1535451334989_Skærmbillede 2018-08-28 12.07.28.png

  8. Solved! @SLiCK_303 you're right, though it needs to be done through an override of PaymentModule.php.

    Delete/uncomment the following, and you are able to control if a mail is sent or not through the status:

    if (Validate::isEmail($this->context->customer->email)) { Mail::Send( (int) $order->idlang, 'orderconf', Mail::l('Order confirmation', (int) $order->idlang), $data, $this->context->customer->email, $this->context->customer->firstname.' '.$this->context->customer->lastname, null, null, $fileAttachment, null, _PSMAILDIR, false, (int) $order->id_shop ); }

×
×
  • Create New...