Zen Cart Logo
Forums / Addon Templates / ZCA Bootstrap 4 Template [Support Thread]

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,495

Results 481 to 500 of 1,686
14 Jul 2021, 5:05 PM
#481
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

ZCA Bootstrap 4 Template [Support Thread]

swguy:

I'd like to force the listing pages to use larger product images/fewer columns - I know that Product Listing > Columns per Row is recommended to be 0; is there another option?
With that setting at 0, edit your template's override of /includes/modules/bootstrap/product_listing.php, finding the following section

        // set css classes for "row" wrapper, to allow for fluid grouping of cells based on viewport
        // these defaults are based on Bootstrap4, but can be customized to suit your own framework
        if ($product_listing_layout_style === 'fluid') {
            $grid_cards_classes = 'row-cols-1 row-cols-md-2 row-cols-lg-2 row-cols-xl-3';
            // this array is intentionally in reverse order, with largest index first
            $grid_classes_matrix = [
                '10' => 'row-cols-1 row-cols-md-2 row-cols-lg-4 row-cols-xl-5',
                '9' => 'row-cols-1 row-cols-md-3 row-cols-lg-4 row-cols-xl-5',      //-lat9: Added for 3/9/0 configuration
                '8' => 'row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4',
                '6' => 'row-cols-1 row-cols-md-2 row-cols-lg-2 row-cols-xl-3',
            ];
            // determine classes to use based on number of grid-columns used by "center" column
            if (isset($center_column_width)) {
                foreach ($grid_classes_matrix as $width => $classes) {
                    if ($center_column_width >= $width) {
                        $grid_cards_classes = $classes;
                        break;
                    }
                }
            }
            $list_box_contents[$rows]['params'] = 'class="row ' . $grid_cards_classes . ' text-center"';
        }

... and edit that grid_classes_matrix for your customizations.

14 Jul 2021, 5:29 PM
#482
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Beautiful! Thank you.

15 Jul 2021, 3:37 PM
#483
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

First of all, thank you lat9 for this incredible work, such a useful and well done template!

I am scratching my head about the specials, all products, etc. pages.

Let's take the specials page for example. Both header_php.php and header_php_special_zca_bootstrap.php are loaded.

The first one (actually it's the main_template_vars.php in this case, but it's not that important) runs the query, calls splitPageResults (the "original" one), etc. and saves the results into $list_box_contents.

Then header_php_special_zca_bootstrap.php does some similar stuff, but with some adjustments for the bootstrap template, and saves to $listing_sql and $column_list variable.

If I'm not mistaken (please correct me if I'm wrong) the data extracted from header_php.php is not used at all, as tpl_modules_product_listing.php is called in the template, which only considers the data from header_php_special_zca_bootstrap.php ($listing_sql and $column_list variable) and produces its "own" $list_box_contents, which is the only one that will be used in the final page.

I guess header_php.php has been left as it is - despite the overhead - so as not to override too many core files, right? And because right now there's no way to tell ZC "for this page just load this header file and not that", without making some changes to the header files themselves (or to some other core files).
Or is it because the data extracted in header_php.php for these pages is/may be used somewhere else too?

15 Jul 2021, 5:14 PM
#484
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Curious if anyone has adopted Instant Search for this template:
https://www.zen-cart.com/downloads.php?do=file&id=1336

15 Jul 2021, 5:16 PM
#485
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

marcopm:

First of all, thank you lat9 for this incredible work, such a useful and well done template!

I am scratching my head about the specials, all products, etc. pages.

Let's take the specials page for example. Both header_php.php and header_php_special_zca_bootstrap.php are loaded.

The first one (actually it's the main_template_vars.php in this case, but it's not that important) runs the query, calls splitPageResults (the "original" one), etc. and saves the results into $list_box_contents.

Then header_php_special_zca_bootstrap.php does some similar stuff, but with some adjustments for the bootstrap template, and saves to $listing_sql and $column_list variable.

If I'm not mistaken (please correct me if I'm wrong) the data extracted from header_php.php is not used at all, as tpl_modules_product_listing.php is called in the template, which only considers the data from header_php_special_zca_bootstrap.php ($listing_sql and $column_list variable) and produces its "own" $list_box_contents, which is the only one that will be used in the final page.

I guess header_php.php has been left as it is - despite the overhead - so as not to override too many core files, right? And because right now there's no way to tell ZC "for this page just load this header file and not that", without making some changes to the header files themselves (or to some other core files).
Or is it because the data extracted in header_php.php for these pages is/may be used somewhere else too?
No correction necessary. You've captured what's going on. While the queries are redundant, there's no way to tell the 'core' header_php.php to not generate that query and I'm not a big fan of core-file overwrites, so there's a bit of overhead in the generation of those product listings.

15 Jul 2021, 5:16 PM
#486
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

swguy:

Curious if anyone has adopted Instant Search for this template:
https://www.zen-cart.com/downloads.php?do=file&id=1336
I'm working on one ...

15 Jul 2021, 5:50 PM
#487
marcopm avatar

marcopm

New Zenner

Join Date:
Jun 2021
Posts:
42
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

swguy:

Curious if anyone has adopted Instant Search for this template:
https://www.zen-cart.com/downloads.php?do=file&id=1336

Yes I'm using it, with various changes/customizations (ajax call, better db search and results sorting for my needs, etc) since the plugin is a bit basic/clunky/outdated in some parts - but still an excellent starting point!
No need to use the provided css file, styling the results container and the single results is quite easy with bootstrap classes (I'm using the media object for the single results because I'm showing the product image as well)

Tbh this (instant search) is one of those many things that ZC should absolutely provide out of the box nowadays. I don't know if it's already in the works for v 1.5.8.

16 Jul 2021, 6:14 PM
#488
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I just added this template to a site using 1.5.7b and selected the template in Tools > Template selection. However, after changing the template to bootstrap, I'm seeing the stylesheets and layout for my old template. Is there another step I missed in activating the template?

16 Jul 2021, 6:18 PM
#489
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

earmsby:

I just added this template to a site using 1.5.7b and selected the template in Tools > Template selection. However, after changing the template to bootstrap, I'm seeing the stylesheets and layout for my old template. Is there another step I missed in activating the template?

Hmm... never mind. I can't get my old template to change to any other template either, so it's obviously not an issue with this template specifically.

17 Jul 2021, 6:27 PM
#490
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

I think it would be fun to add the Font Awesome icon to the button.
In zen_image_button, you could modify the notifier to pass the image and alt text, then update the alt text appropriately.

// Add icons from Font Awesome
switch ($image) {
case BUTTON_IMAGE_ASK_A_QUESTION:
   $alt = '<span class="fas fa-envelope"></span> ' . $alt;
   break;

... etc.
}

Attachment 19674

19 Jul 2021, 1:01 PM
#491
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

earmsby:

Hmm... never mind. I can't get my old template to change to any other template either, so it's obviously not an issue with this template specifically.

Check these files (compare against a fresh download):
includes/init_includes/init_templates.php
includes/init_includes/overrides/init_templates.php (compare against copy in parent folder if it exists).

23 Jul 2021, 5:04 PM
#492
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

What are people doing about social icons with this template? I wound up putting them in includes/templates/bootstrap/common/tpl_header.php right after tpl_offcanvas_menu.php.

26 Jul 2021, 12:45 PM
#493
georgecy avatar

georgecy

New Zenner

Join Date:
Jan 2015
Location:
Cyprus
Posts:
83
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Hi Guys,
I am using this template for some time now. I would like to know what plug ins are compatible with this template and ZC 1.5.7. (including paid ones). Now I am trying them one by one and most of them do not work as they are made for older versions of the ZC. It would be nice to have a list of recommended plug ins that would help the quick setup of a new installation or upgrade.

30 Jul 2021, 7:56 PM
#494
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Attributes on Product Listing https://www.zen-cart.com/downloads.php?do=file&id=1637
would be a nice inclusion for this template.

5 Aug 2021, 7:08 PM
#495
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Any thoughts about using the trash can icon on the shopping cart page on mobile? It's there on desktop (obviously) and on tablet, but not on the phone. Could we put it in below the quantity? Some customers won't realize that the only way to remove an item from the cart on mobile would be to set the quantity to zero.

6 Aug 2021, 11:18 AM
#496
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

swguy:

Any thoughts about using the trash can icon on the shopping cart page on mobile? It's there on desktop (obviously) and on tablet, but not on the phone. Could we put it in below the quantity? Some customers won't realize that the only way to remove an item from the cart on mobile would be to set the quantity to zero.
How about some wording on the page that indicates that products can be removed by setting the quantity to 0? Otherwise, that page's rendering is going to get over-complicated.

6 Aug 2021, 11:45 AM
#497
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

That was pretty much my fallback plan. OK sounds fair. 1.5.7 users could even just put this in the new define_shopping_cart.php page.

6 Aug 2021, 11:54 AM
#498
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Suggestion on help files for this template: it might make sense to add some developer notes on modifying the template, because when you do something like (say) add a checkbox, you have to take special steps in Bootstrap, otherwise it won't show up.

Checkbox not showing on bootstrap template?
a) put it in a special div

<div class="custom-control custom-checkbox"> b) input first, then label. echo zen_draw_checkbox_field($bucketfee_id,'',false, 'id="'.$bucketfee_id .'" class="custom-control-input"'); echo '<label class="custom-control-label" for="' . $bucketfee_id . '">' . BUCKETFEE_QUESTION . '</label>'; c) On label, use class="custom-control-label"

Radio buttons? Similar fix:
a) one div per radio button

<div class="custom-control custom-radio" b) input first then label as above c) On label, use class="custom-control-label"
8 Aug 2021, 10:45 PM
#499
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

ZC 1.5.7c Bootstrap latest v

I just realized that the links EZ Pages created for the footer, that also have a corresponding sidebar or header link, are not working?

The link, when clicked in the footer, sends to the homepage, while the other links in sidebar and header work correctly.

GOTO www.needtoorder.com to see what I mean. Any thoughts?

9 Aug 2021, 11:44 AM
#500
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ZCA Bootstrap 4 Template [Support Thread]

Carbonless:

ZC 1.5.7c Bootstrap latest v

I just realized that the links EZ Pages created for the footer, that also have a corresponding sidebar or header link, are not working?

The link, when clicked in the footer, sends to the homepage, while the other links in sidebar and header work correctly.

GOTO www.needtoorder.com to see what I mean. Any thoughts?
I'm thinking that the social-icon addition you've got in the footer (which is injecting yet-another -- and unwanted -- <head></head><body>) might be part of the issue.