Results 1 to 10 of 1685

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    France
    Posts
    600
    Plugin Contributions
    8

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Quote Originally Posted by lat9 View Post
    Using the native Bootstrap 5 for the carousel seems the right path to me. Please note that the template's load of the latest jQuery should be kept, since many other plugins make use of that interface.
    Yes, I've noticed this and retained it in the preload.
    Managing Director of https://jsweb.uk

    Zen Cart developer since 2009

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

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Quote Originally Posted by strelitzia View Post
    Yes, I've noticed this and retained it in the preload.
    Great. Note, too, that I've created a v500 branch on the repo: https://github.com/lat9/ZCA-Bootstra...late/tree/v500

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

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    v3.7.3 of the ZCA Bootstrap template is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2191

    This release contains changes associated with these GitHub issues:

    #316: Don't display back-to-top on small/medium devices.
    #386: Use the $template class to locate site_specific_styles.php.
    #411: Add the zc210 notifier to the account_history_info page's template.
    #417: Submitted keywords to AJAX search must be a 'string'.
    #419: Display shipping module's error messages in the shipping-estimator.
    #421: "Align" with zc210's implementation for the order_status page's template.
    #422: Split CSS/JS loading into separate modules; was in common/html_header.php.
    #426: ezpages :: page_is_ssl removed in zc210; default always to 'SSL'.
    #428: Recognize zc210's mobile-menu settings for EZ-Pages.
    #429: Add support for zc210's "Featured Categories" feature.
    #432: Correct layout inconsistency between "Notification" and "Manufacturers Info" centerboxes.
    #434: Correct background-color bleed-through on various card classes.
    #435: Centerbox Background Color applied to containing cards, not the wrapper.

  4. #4
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    I had the following problems with the bestsellers displayed in the sideboxes:
    - In Configuration -> Maximum Values -> Best Sellers for Box I had to put in 11 to display 10 bestseller.
    - The number 1 bestseller was never displayed. It started with the second best selling item.

    I fixed it by modifying includes/templates/bootstrap/sideboxes/tpl_best_sellers.php.
    Line 19
    Code:
    for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {
    should be
    Code:
    for ($i = 0, $j = count($bestsellers_list); $i<$j; $i++) {
    Line 22
    Code:
    $i . '. ' .
    should be
    Code:
    $i+1 . '. ' .
    Somebody check please.

  5. #5
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    I forgot to add:
    Zen Cart version 1.5.8a
    Bootstrap 3.7.0

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

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Quote Originally Posted by todoonada View Post
    I had the following problems with the bestsellers displayed in the sideboxes:
    - In Configuration -> Maximum Values -> Best Sellers for Box I had to put in 11 to display 10 bestseller.
    - The number 1 bestseller was never displayed. It started with the second best selling item.

    ...
    i can confirm the first item, but not the 2nd item; ie if you needed to have 1 more then the max to display that number.

    BUT, the #1 best seller was displayed in my setup.

    my fix:


    Code:
    //from
    for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {
    // to
    for ($i = 1, $j = count($bestsellers_list); $i<=$j; $i++) {
    in my setup, your line 22 fix, is not correct.

    my $bestsellers_list is an array. and the first array element is 1. if your first array element is 0 (which is possible if you have an override of the bestseller module; and i will note that your version of bootstrap does not); then i can see how your code would be correct.

    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.

  7. #7
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    I do not have an override of the bestseller module.
    This code is the original code. I just added the first line (echo $bestsellers_list[0]['name'];) to access the first element in the array, which is position 0.

    Code:
    echo $bestsellers_list[0]['name'];
    if ($is_carousel === false) {
    
    
        $content = '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="list-group-flush sideBoxContent">' . "\n";
    
    
        for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {
            $content .=
                '<a class="list-group-item list-group-item-action" href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' .
                    $i . '. ' .
                    zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) .
                '</a>';
        }
    
    
        $content .= "</div>\n";
        return;
    }
    Result looks like this. The item above the "Bestseller" headline is the best selling item at array position 0.

    Click image for larger version. 

Name:	Screenshot from 2024-09-14 08-59-03.png 
Views:	145 
Size:	33.7 KB 
ID:	20753

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

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    actually you are correct.

    i am running a module that is overriding the bestseller list; and is using an older version of the module.

    the change did happen in v158a, and specifically this commit:

    https://github.com/zencart/zencart/c...980bee4b28f972

    the old code was like this:

    PHP Code:
      $rows 0;
      while (!
    $best_sellers->EOF) {
        
    $rows++;
        
    $bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id'];
    ... 
    the index value being the var $rows, and here, it starts at 1.

    the new code is like this:

    PHP Code:
        $bestsellers_list = [];
        foreach (
    $best_sellers as $bestseller) {
            
    $best_products_id $bestseller['products_id'];
            
    $bestsellers_list[] = [
                
    'id' => $best_products_id,
                
    'name'  => $bestseller['products_name'],
    ... 
    with no explicit setting of the index, it will definitely start at 0.

    good catch.

    as to what is the most eloquent way to address this error, i can not say.

    but the commit i referenced above is definitely where this bug got introduced.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 

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