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

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,582

Results 1,181 to 1,200 of 1,686
9 Mar 2024, 11:16 AM
#1181
georgecy avatar

georgecy

New Zenner

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

ZCA Bootstrap 4 Template [Support Thread]

lat9:

Please note that the change to tpl_products_all_default.php should look like this; I was missing a closing parenthesis in that commit:

echo zen_draw_form('filter', zen_href_link((defined('FILENAME_SEARCH_RESULT') ? FILENAME_SEARCH_RESULT : FILENAME_ADVANCED_SEARCH_RESULT)[B])[/B], 'get', 'class="form-inline"');

Hi I  applied the modifications and they work ok so far. There is another error to be resolved also. Log is shown below

[09-Mar-2024 11:08:31 UTC] Request URI: /index.php?main_page=index&cPath=304_156/, IP address: ---------
#1 require(/includes/modules/bootstrap/category_row.php) called at [/includes/templates/bootstrap/templates/tpl_modules_category_row.php:16]
#2 require(/includes/templates/bootstrap/templates/tpl_modules_category_row.php) called at [/includes/templates/bootstrap/templates/tpl_index_categories.php:86]
#3 require(/includes/templates/bootstrap/templates/tpl_index_categories.php) called at [/includes/modules/pages/index/main_template_vars.php:232]
#4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#5 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant TOPMOST_CATEGORY_PARENT_ID - assumed 'TOPMOST_CATEGORY_PARENT_ID' (this will throw an Error in a future version of PHP) in /includes/modules/bootstrap/category_row.php on line 50.
9 Mar 2024, 11:19 AM
#1182
georgecy avatar

georgecy

New Zenner

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

Please note that the change to tpl_products_all_default.php should look like this; I was missing a closing parenthesis in that commit:

echo zen_draw_form('filter', zen_href_link((defined('FILENAME_SEARCH_RESULT') ? FILENAME_SEARCH_RESULT : FILENAME_ADVANCED_SEARCH_RESULT)[B])[/B], 'get', 'class="form-inline"');

Hi I applied the modifications and so far the specific errors disappeared. There is one more similar error as per log below:

[09-Mar-2024 11:08:31 UTC] Request URI: /index.php?main_page=index&cPath=304_156/, IP address: 
#1 require(/includes/modules/bootstrap/category_row.php) called at [/includes/templates/bootstrap/templates/tpl_modules_category_row.php:16]
#2 require(/includes/templates/bootstrap/templates/tpl_modules_category_row.php) called at [/includes/templates/bootstrap/templates/tpl_index_categories.php:86]
#3 require(/includes/templates/bootstrap/templates/tpl_index_categories.php) called at [/includes/modules/pages/index/main_template_vars.php:232]
#4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#5 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant TOPMOST_CATEGORY_PARENT_ID - assumed 'TOPMOST_CATEGORY_PARENT_ID' (this will throw an Error in a future version of PHP) in /includes/modules/bootstrap/category_row.php on line 50.
9 Mar 2024, 1:17 PM
#1183
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: ZCA Bootstrap 4 Template [Support Thread]

Regarding right-aligning the ul as per https://www.zen-cart.com/showthread.php?223910-ZCA-Bootstrap-4-Template-Support-Thread&p=1399395#post1399395

adding class justify-content-end (really intuitive!) did not work for me...and after a soul-destroying amount of time trying to get the thing to move anywhere at all, I was starting to think it was painted on. How I hate CSS work/stabbing-in-the-dark.

Anyway this was the basket locking it to the left. Probably.

Attachment 20497

in case anyone works for the Samaritans.

9 Mar 2024, 2:10 PM
#1184
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

Georgecy:

Hi I applied the modifications and so far the specific errors disappeared. There is one more similar error as per log below:

[09-Mar-2024 11:08:31 UTC] Request URI: /index.php?main_page=index&cPath=304_156/, IP address:
#1 require(/includes/modules/bootstrap/category_row.php) called at [/includes/templates/bootstrap/templates/tpl_modules_category_row.php:16]
#2 require(/includes/templates/bootstrap/templates/tpl_modules_category_row.php) called at [/includes/templates/bootstrap/templates/tpl_index_categories.php:86]
#3 require(/includes/templates/bootstrap/templates/tpl_index_categories.php) called at [/includes/modules/pages/index/main_template_vars.php:232]
#4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#5 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant TOPMOST_CATEGORY_PARENT_ID - assumed 'TOPMOST_CATEGORY_PARENT_ID' (this will throw an Error in a future version of PHP) in /includes/modules/bootstrap/category_row.php on line 50.
That's another zc157 => zc158 change.

You can work-around the issue (while you plan your base Zen Cart upgrade) by creating a file (its name doesn't matter, as long as it's a .php file) in the /includes/extra_datafiles sub-directory, containing:

// -----
// Initialize the constant, set by Zen Cart 1.5.8, to identify the top-most category id.  This module can
// be safely removed once the site is upgraded to zc158 or later.
//
define('TOPMOST_CATEGORY_PARENT_ID', '0');
9 Mar 2024, 2:14 PM
#1185
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

torvista:

Regarding right-aligning the ul as per https://www.zen-cart.com/showthread.php?223910-ZCA-Bootstrap-4-Template-Support-Thread&p=1399395#post1399395

adding class justify-content-end (really intuitive!) did not work for me...and after a soul-destroying amount of time trying to get the thing to move anywhere at all, I was starting to think it was painted on. How I hate CSS work/stabbing-in-the-dark.

Anyway this was the basket locking it to the left. Probably.

Attachment 20497

in case anyone works for the Samaritans.
That 'justify-content-end' is right out of the Bootstrap documentation (https://www.w3schools.com/bootstrap4/bootstrap_navs.asp). Is it the 'ul' containing a product's attributes in the cart's product table that you're attempting to align right?

9 Mar 2024, 4:50 PM
#1186
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: ZCA Bootstrap 4 Template [Support Thread]

I dip my toes into this when I get the time, every month or so, and so make no progress/am still a lost novice/forget this is a framework and try and piecemeal modify.
I was trying to get the main login etc links to the right.

9 Mar 2024, 5:32 PM
#1187
swguy avatar

swguy

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

That 'justify-content-end' is right out of the Bootstrap documentation ...

And be sure you're looking at the right documentation! I was reading the Bootstrap 3 docs at first. D-ohhh!!!

9 Mar 2024, 6:51 PM
#1188
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: ZCA Bootstrap 4 Template [Support Thread]

Well, to go back to basics, I'm trying the GitHub ZC, dropping the GitHub Bootstrap into it, and trying the docs here
https://www.w3schools.com/bootstrap4/bootstrap_navbar.asp
to get <ul class="navbar-nav mr-auto">
Attachment 20498

to the right, by mirroring the the classes mentioned in those docs. And failing to move it at all.

And I've not even started drinking yet.

9 Mar 2024, 8:13 PM
#1189
swguy avatar

swguy

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

And I've not even started drinking yet.

Well obviously there's your problem. :)

11 Mar 2024, 3:48 PM
#1190
zamzom avatar

zamzom

New Zenner

Join Date:
Jun 2009
Location:
Europe
Posts:
60
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

[ZC v1.5.8][Bootstrap v3.5.0][SBA v4.0]

Does attribute image swap function properly for Bootstrap template?
I have no problem for other built in templates, for example Responsive Classic or Classic Contemporary Green, but image swap does not function for Bootstrap-4.

11 Mar 2024, 4:00 PM
#1191
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
943
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

Currently running 1.5.8a ZenCart/3.6.3 Bootstrap Template on PHP 8.

Previously I had the AJAX search of the header working but as of today, likely the update as it worked prior, has stopped working.

I inspected the error console and found this error when I checked it:

Uncaught TypeError: jQuery(...).modal is not a function
    at HTMLAnchorElement.<anonymous> (ajax_search.min.js:6:123)
    at HTMLAnchorElement.dispatch (jscript_a_jquery.js:25:1102)
    at q.handle (jscript_a_jquery.js:24:29909)
(anonymous) @ ajax_search.min.js:6
dispatch @ jscript_a_jquery.js:25
q.handle @ jscript_a_jquery.js:24

Unfortunately I'm not well versed with JQuery to even begin how this should be fixed. I only know that the code points to the following:

    jQuery("#search-icon, #mobile-search").on("click", function(e) {
        jQuery("#search-wrapper").modal()
    }),

Would appreciate any help.

11 Mar 2024, 4:06 PM
#1192
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

I'm not sure where the file /jscript/jscript_a_query.js comes from, but it appears that it's 'conflicting' with the Bootstrap template's ajax_search.min.js file's operation.

11 Mar 2024, 4:09 PM
#1193
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
943
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

I'm not sure where the file /jscript/jscript_a_query.js comes from, but it appears that it's 'conflicting' with the Bootstrap template's ajax_search.min.js file's operation.

That did it. Now to see where that file came from.

EDIT: Found it. The Consent banner plugin. Removing that file doesn't seem to affect either, so I'll go ahead and trash that one.

11 Mar 2024, 5:21 PM
#1194
zamzom avatar

zamzom

New Zenner

Join Date:
Jun 2009
Location:
Europe
Posts:
60
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Just a small note;
in includes\templates\bootstrap\templates\tpl_product_info_display.php between line 209 and 216 div causes html error, because there is already the same div in tpl_modules_attributes.php

<!--<div id="productAttributes"> REMOVE-->

<?php
/**
 * display the product attributes
 */
  require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<!--</div> REMOVE-->

Anybody has an idea about the misfunction of the image swap?

11 Mar 2024, 6:15 PM
#1195
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
943
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

zamzom:

Just a small note;
in includes\templates\bootstrap\templates\tpl_product_info_display.php between line 209 and 216 div causes html error, because there is already the same div in tpl_modules_attributes.php

<!--<div id="productAttributes"> REMOVE--> <?php /** * display the product attributes */ require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?> <!--</div> REMOVE-->
> 
> Anybody has an idea about the misfunction of the image swap?

Rather than do that, why not remove the defining <div> (line 18) and </div> (line 161)* inside of tpl_modules_attributes.php?
11 Mar 2024, 6:16 PM
#1196
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

I'm not sure where your tpl_modules_attributes.php came from, but the as-shipped version for Bootstrap 3.5.0 does not contain that div.

You'll need to check on the attributes-image-swap support-thread for why it doesn't work.

11 Mar 2024, 9:26 PM
#1197
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
943
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

Again using 3.6.3 ZCA and ZenCart 1.5.8s on PHP 8.2.

I am getting the following display of the product price when displaying a product with attributes assigned.

Should I manually remove one of these price blocks or is there a way to toggle which one is displayed? (For note, this is the default product type with attributes.)

11 Mar 2024, 9:47 PM
#1198
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

You'll need to either edit your tpl_product_info_display.php to comment-out either the upper or lower price display or provide styling (in the /css/site_specific_styles.php) to do a display: none; on one of them.

15 Mar 2024, 11:49 AM
#1199
georgecy avatar

georgecy

New Zenner

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

  1. Did you try changing the columns-per-row to 0 (fluid)? If that doesn't do what you want, v3.6.3 adds a 'soft' configuration setting:
// -----
// Starting with v3.6.3, a categories' fluid layout can be identified.  If predefined (like
// in an /extra_datafiles .php module), that override is used.
//
if ($category_row_layout_style === 'fluid') {
    $grid_cards_classes = 'row-cols-1 row-cols-md-2 row-cols-lg-2 row-cols-xl-3';
    if (!isset($grid_category_classes_matrix)) {
        // this array is intentionally in reverse order, with largest index first
        $grid_category_classes_matrix = [
            '12' => 'row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-6',
            '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',
            '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',
        ];
    }
> 
> 2) There's a 'soft' setting (see dist.site-specific-bootstrap-settings.php) that totally disabled the back-to-top button.  If you still want it to show, but not overlay "important" buttons, here's what I added to my /css/site_specific_styles.php so it overlays the footer:
> ```
#back-to-top {
    bottom: 2.5vh;
}

Hi Cindy,
On 1.5.7d with 3.6.3 the the columns-per-row to 0 (fluid) is not working as per attached image. Is this something that changed in the latest version or is something I am doing wrong?
Attachment 20517

15 Mar 2024, 12:36 PM
#1200
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,
In 1.5.7d and 3.6.3 the Listing Columns Per Row and the Listing Layout Style in product listing, do not have any effect when changed. I this a change in the version 3.6.3 or I should reinstall the template? see attached photos
Attachment 20518Attachment 20519Attachment 20520