Results 1 to 10 of 1685

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: ZCA Bootstrap Template

    I believe the duplication may be a bug. Harmless though.

    It's always best to try to style the provided classes if possible (in your own self-added stylesheet), rather than adding more classes to the template.

    That said, if you wanted to add your own style, carlwhat was nearly correct when proposing adding a 3rd parameter: it should have been the 4th parameter instead, and be only the name of the class you wanted to add.
    eg:
    Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT, '', 'myNewClass');
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,915
    Plugin Contributions
    13

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by DrByte View Post
    I believe the duplication may be a bug. Harmless though.

    It's always best to try to style the provided classes if possible (in your own self-added stylesheet), rather than adding more classes to the template.

    That said, if you wanted to add your own style, carlwhat was nearly correct when proposing adding a 3rd parameter: it should have been the 4th parameter instead, and be only the name of the class you wanted to add.
    eg:
    Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT, '', 'myNewClass');
    holy shismoly! how did i miss that!

    apologies.

    drByte is correct. adding it to the 4th parameter does indeed add another class.

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #3
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: ZCA Bootstrap Template

    Thanks, learned something.

  4. #4
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: ZCA Bootstrap Template

    I ran into a problem with the current v2.0.0c plugin installed on 1.5.7. When logged in to the shop side and in my account. If you have orders and click on "show all orders it causes an error
    PHP Code:
    [25-Nov-2020 14:50:44 UTCRequest URI: /upgrade/index.php?main_page=account_historyIP address152.44.114.186
    #1  trigger_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:170]
    #2  queryFactory->show_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:142]
    #3  queryFactory->set_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:269]
    #4  queryFactory->Execute() called at [/home//public_html/upgrade/includes/classes/zca/zca_split_page_results.php:86]
    #5  zca_splitPageResults->__construct() called at [/home//public_html/upgrade/includes/modules/pages/account_history/header_php_account_history_zca_bootstrap.php:6]
    #6  require(/home//public_html/upgrade/includes/modules/pages/account_history/header_php_account_history_zca_bootstrap.php) called at [/home//public_html/upgrade/index.php:35]
    --> PHP Fatal error1064:You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 :: select count(*) as total  FROM   znc_orders oznc_orders_total otznc_orders_status s                         WHERE      o.customers_id 15                         AND        o.orders_id ot.orders_id                         AND        ot.class = 'ot_total'                         AND    s.orders_status_id =                            (SELECT orders_status_id FROM znc_orders_status_history osh                             WHERE osh.orders_id o.orders_id AND osh.customer_notified >= ==> (as called by) /home//public_html/upgrade/includes/classes/zca/zca_split_page_results.php on line 86 <== in /home//public_html/upgrade/includes/classes/db/mysql/query_factory.php on line 170. 
    The error is the result of the embedded select statement and the missing closing ). I verified that this exists on other sites at the same level.

    The way I got around it was by modifying ZCA_split_page_results to test if the query contained "(select".
    PHP Code:
        //bof test for (select and add closing paren if needed 
        
    if (strpos($query_lower"(select"$pos_from)){
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from)) . ") ";
        } else {
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from));
        }
        
    //eof test select 
    Hope this helps if others run into it. BTW just adding the closing paren breaks the product listing page which is why I needed the if/else.

  5. #5
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by badarac View Post
    I ran into a problem with the current v2.0.0c plugin installed on 1.5.7. When logged in to the shop side and in my account. If you have orders and click on "show all orders it causes an error
    PHP Code:
    [25-Nov-2020 14:50:44 UTCRequest URI: /upgrade/index.php?main_page=account_historyIP address152.44.114.186
    #1  trigger_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:170]
    #2  queryFactory->show_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:142]
    #3  queryFactory->set_error() called at [/home//public_html/upgrade/includes/classes/db/mysql/query_factory.php:269]
    #4  queryFactory->Execute() called at [/home//public_html/upgrade/includes/classes/zca/zca_split_page_results.php:86]
    #5  zca_splitPageResults->__construct() called at [/home//public_html/upgrade/includes/modules/pages/account_history/header_php_account_history_zca_bootstrap.php:6]
    #6  require(/home//public_html/upgrade/includes/modules/pages/account_history/header_php_account_history_zca_bootstrap.php) called at [/home//public_html/upgrade/index.php:35]
    --> PHP Fatal error1064:You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 :: select count(*) as total  FROM   znc_orders oznc_orders_total otznc_orders_status s                         WHERE      o.customers_id 15                         AND        o.orders_id ot.orders_id                         AND        ot.class = 'ot_total'                         AND    s.orders_status_id =                            (SELECT orders_status_id FROM znc_orders_status_history osh                             WHERE osh.orders_id o.orders_id AND osh.customer_notified >= ==> (as called by) /home//public_html/upgrade/includes/classes/zca/zca_split_page_results.php on line 86 <== in /home//public_html/upgrade/includes/classes/db/mysql/query_factory.php on line 170. 
    The error is the result of the embedded select statement and the missing closing ). I verified that this exists on other sites at the same level.

    The way I got around it was by modifying ZCA_split_page_results to test if the query contained "(select".
    PHP Code:
        //bof test for (select and add closing paren if needed 
        
    if (strpos($query_lower"(select"$pos_from)){
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from)) . ") ";
        } else {
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from));
        }
        
    //eof test select 
    Hope this helps if others run into it. BTW just adding the closing paren breaks the product listing page which is why I needed the if/else.
    A quick modification to this. I discovered that if you had an order history with multiple orders it would break. My updated fix is
    PHP Code:
        if (strpos($query_lower"(select"$pos_from)){
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from)) . " LIMIT 1) ";
        } else {
            
    $count_query "select count(" $count_string ") as total " substr($this->countQuery$pos_from, ($pos_to $pos_from));
        } 

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: ZCA Bootstrap Template

    There are oodles and boodles of changes coming up for the Bootstrap-4 template in support of zc157. You can check out the current beta (fairly close to release) here: https://github.com/lat9/ZCA-Bootstrap-Template

  7. #7
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by lat9 View Post
    There are oodles and boodles of changes coming up for the Bootstrap-4 template in support of zc157. You can check out the current beta (fairly close to release) here: https://github.com/lat9/ZCA-Bootstrap-Template
    Thanks, I'll check it out. I did have a look at the file I updated and it is unchanged in the section that caused the error. I'm going to do a test install with demo data and see if it has the error with all the other changes. Stand by ;-)

 

 

Similar Threads

  1. v155 Clone a Template [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 107
    Last Post: 11 Nov 2024, 08:28 PM
  2. v150 aBagon Template Support Thread
    By VJef in forum Addon Templates
    Replies: 54
    Last Post: 5 Sep 2020, 08:44 PM
  3. v155 ZCA Bootstrap Template 1.0 (BETA)
    By rbarbour in forum Addon Templates
    Replies: 74
    Last Post: 25 Apr 2018, 07:05 PM
  4. TB Sempre Template Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 48
    Last Post: 19 Mar 2015, 06:33 PM
  5. Wallet Template - Support Thread
    By zami in forum Addon Templates
    Replies: 45
    Last Post: 25 Mar 2010, 10:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg