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

ZCA Bootstrap 4 Template [Support Thread]

Views: 545,491

Results 1,521 to 1,540 of 1,686
8 Feb 2025, 12:03 AM
#1521
retched avatar

retched

Totally Zenned

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

ZCA Bootstrap 4 Template [Support Thread]

PHP 8.3 / ZCA 3.7.5 / ZC 2.1.0

This is kind of a weird question, but is there a way to replicate the smooth transition that that "Back to Top" button does on some pages? For example, I have a (somewhat) long terms and conditions complete with a Table of Contents. I wanted to know is there a way to replicate the smooth scrolling back to top for like chapters?

I managed to replicate this with the following:

html {
  scroll-behavior: smooth;
}

But combining that with the "Back to Top" that pops up creates a weird stutter before it jumps back to top.

11 Feb 2025, 7:42 PM
#1522
retched avatar

retched

Totally Zenned

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

Re: ZCA Bootstrap 4 Template [Support Thread]

PHP 8.3.4, ZC 2.1.0, ZCABootstrap 3.7.6

I don't know what is wrong but for some reason I cannot show the shipping estimator on the shipping cart as either a button or listing.

I keep getting the following error code:

[11-Feb-2025 14:12:01 America/New_York] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type array on array in E:\xampp\htdocs\justuptown\includes\modules\shipping_estimator.php:152
Stack trace:
#0 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\templates\tpl_shopping_cart_default.php(229): require()
#1 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\common\tpl_main_page.php(233): require('E:\\xampp\\htdocs...')
#2 E:\xampp\htdocs\justuptown\index.php(94): require('E:\\xampp\\htdocs...')
#3 {main}
  thrown in E:\xampp\htdocs\justuptown\includes\modules\shipping_estimator.php on line 152

The only thing I get a reference to is:

'currency_value' => isset($currency, $currencies->currencies[$currency]['value']) ? $currencies->currencies[$currency]['value'] : 1,

I can say removing the $currencies->currencies[$currency]['value'] bit of the code or just setting 'currency_value' to 1, causes the module to work and the shipping estimator form to display.

Odd enough I can run this on a barebones ZenCart and encounter no errors.

11 Feb 2025, 8:35 PM
#1523
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

retched:

PHP 8.3.4, ZC 2.1.0, ZCABootstrap 3.7.6

I don't know what is wrong but for some reason I cannot show the shipping estimator on the shipping cart as either a button or listing.

I keep getting the following error code:

[11-Feb-2025 14:12:01 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type array on array in E:\xampp\htdocs\justuptown\includes\modules\shipping_estimator.php:152
Stack trace:
#0 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\templates\tpl_shopping_cart_default.php(229): require()
#1 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\common\tpl_main_page.php(233): require('E:\xampp\htdocs...')
#2 E:\xampp\htdocs\justuptown\index.php(94): require('E:\xampp\htdocs...')
#3 {main}
thrown in E:\xampp\htdocs\justuptown\includes\modules\shipping_estimator.php on line 152

> 
> The only thing I get a reference to is:
> ```
'currency_value' => isset($currency, $currencies->currencies[$currency]['value']) ? $currencies->currencies[$currency]['value'] : 1,

I can say removing the $currencies->currencies[$currency]['value'] bit of the code or just setting 'currency_value' to 1, causes the module to work and the shipping estimator form to display.

Odd enough I can run this on a barebones ZenCart and encounter no errors.
What currencies are enabled for the site?

11 Feb 2025, 8:45 PM
#1524
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

What's additionally weird is that the $currency variable isn't set (in either stock Zen Cart or stock Bootstrap) except for on the order_status page.

11 Feb 2025, 11:04 PM
#1525
retched avatar

retched

Totally Zenned

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

What currencies are enabled for the site?

US Dollar, Australian Dollar, British Pounds, Bitcoin

lat9:

What's additionally weird is that the $currency variable isn't set (in either stock Zen Cart or stock Bootstrap) except for on the order_status page.

The funny thing is I debug printed both variables and they ARE set.

Here's what $currency is set to:

Debug [0/0]:Array
    (
        [id] => AUD
        [text] => $
        [title] => Australian Dollar
    )

$currencies->currencies:

        Debug [0/0]:Array
(
    [USD] => Array
        (
            [title] => US Dollar
            [symbol_left] => $
            [symbol_right] => 
            [decimal_point] => .
            [thousands_point] => ,
            [decimal_places] => 2
            [value] => 1.000000
        )

    [EUR] => Array
        (
            [title] => Euro
            [symbol_left] => €
            [symbol_right] => 
            [decimal_point] => .
            [thousands_point] => ,
            [decimal_places] => 2
            [value] => 0.773000
        )

    [GBP] => Array
        (
            [title] => GB Pound
            [symbol_left] => £
            [symbol_right] => 
            [decimal_point] => .
            [thousands_point] => ,
            [decimal_places] => 2
            [value] => 0.672600
        )

    [CAD] => Array
        (
            [title] => Canadian Dollar
            [symbol_left] => $
            [symbol_right] => 
            [decimal_point] => .
            [thousands_point] => ,
            [decimal_places] => 2
            [value] => 1.104200
        )

    [AUD] => Array
        (
            [title] => Australian Dollar
            [symbol_left] => $
            [symbol_right] => 
            [decimal_point] => .
            [thousands_point] => ,
            [decimal_places] => 2
            [value] => 1.178900
        )

)
12 Feb 2025, 12:22 PM
#1526
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

In what non-standard Zen Cart file is $currency set to that array? That's what the shipping_estimator is complaining about.

13 Feb 2025, 5:23 AM
#1527
retched avatar

retched

Totally Zenned

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

In what non-standard Zen Cart file is $currency set to that array? That's what the shipping_estimator is complaining about.

Aha! That did it. "Currencies/Languages in Header" causes a conflict as its foreach loop also uses $currency. I changed it to $currency_item and all worked out. (I changed it from a for loop to foreach instead... and picked a bad temp name it seems.)

13 Feb 2025, 12:42 PM
#1528
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

retched:

Aha! That did it. "Currencies/Languages in Header" causes a conflict as its foreach loop also uses $currency. I changed it to $currency_item and all worked out. (I changed it from a for loop to foreach instead... and picked a bad temp name it seems.)
Thanks for the follow-up identifying the source of the issue!

13 Feb 2025, 5:50 PM
#1529
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I'm trying to add a help button inside the OPC shipping card with the bootstrap template for one particular shipping method. The button I want to use is the blue square with the question mark inside it. I've got the button displayed but noting happens when I click it. The code is modeled after similar code for the button on the admin side and for the help link in the shopping cart page. What have I missed?

Code fragments follow:
From includes/templates/bootstrap/templates/tpl_modules_checkout_one_shipping.php starting at line 16

?>
        <fieldset>
          <legend><?php echo $quotes[$i]['module']; ?> <?php echo (!empty($quotes[$i]['icon'])) ? $quotes[$i]['icon'] : '';
                // bof edit to add help modal icon for international shipping
                if ($shipping_module_id === 'flatquote') {
                    echo '<div class="pull-right noprint"><a class="btn btn-sm btn-default btn-help" data-toggle="modal" href="#flatquoteHelpModal" title="Help" role="button" rel="noopener"><i class="fa fa-question fa-lg aria-hidden="true"></i></a></div>';
                }
                // eof edit to add help modal icon for international shipping
?>
          </legend>

New file: includes/templates/bootstrap/modalboxes/tpl_flatquote_help.php

<?php
/**
 * Modal for international shipping flatquote help
 *
 * BOOTSTRAP v3.4.0
 *
 * @package templateSystem
 * @copyright Copyright 2003-2016 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */
zca_load_language_for_modal('flatquote_help');
?>
<!-- Modal -->
<div class="modal fade" id="flatquoteHelpModal" tabindex="-1" role="dialog" aria-labelledby="flatquoteHelpModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="flatquoteHelpModalLabel"><?php echo HEADING_TITLE_FLATQUOTE_MODAL; ?></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo TEXT_MODAL_CLOSE; ?>"><span aria-hidden="true">×</span></button>
            </div>
            <div class="modal-body">
                <h2><?php echo SUB_HEADING_TITLE_1; ?></h2>
                <p><?php echo SUB_HEADING_TEXT_1; ?></p>
                <h2><?php echo SUB_HEADING_TITLE_2; ?></h2>
                <p><?php echo SUB_HEADING_TEXT_2; ?></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo TEXT_MODAL_CLOSE; ?></button>
            </div>
        </div>
    </div>
</div>

There's also a new file in includes/languages/english/lang.flatquote_help.php containing defines for the above file.

For unknown reason(s) the new file for the modal is never called based on trigger_error statements placed inside the file for debugging. So I suspect a problem with the new code I placed in tpl_modules_checkout_one_shipping.php but I'm stumped.

An image of the shipping card follows as it stands now. Further changes to the card are anticipated as I am trying to refactor the very old "Shipping by Quote" plugin.

Attachment 20906

Thank you for any help!

Dave
zc1.5.8a, ZCA-Bootstrap-Template-3.7.5, one_page_checkout-2.5.4

13 Feb 2025, 7:43 PM
#1530
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

Why not just include that button and the associated modal popup as part of the shipping module's quote method?

13 Feb 2025, 9:26 PM
#1531
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Thanks lat9. I was planning to use $quotes['html_input'] for the actual Request Quote button (but haven't started work on it yet), and initially considered $quotes['icon'] for the help button, but opted not to. But I'll try it.

By the way, I found an error in the <i>...</i> expression and fixed it, but the modal still doesn't come up.

Dave

14 Feb 2025, 3:02 AM
#1532
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Cindy, I discovered I forgot to include the require statement for the modal template file, causing no response when clicking the help button. I have moved the help button html to the shipping module $this->quote[‘icon’] variable and it works as before, but I can’t figure out how to get the php require statement included in the shipping module. Right now it’s in the OPC shipping template file. And the modal is now coming up when the help button is clicked.
Dave

6 Mar 2025, 9:38 PM
#1533
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Question: is there already built-in settings to have the Add to Cart Box float at the top of the page of the mobile menu (in vertical/portrait orientation)?

If the phone is sideways (landscape mode), it's perfect because the Add to Cart Box floats on the right side of the screen.

But if the phone is in vertical/portrait mode, the Add to Cart Box is at the very bottom of the product page. I am getting a lot of customers who think the product is available and asking questions, because they aren't scrolling to the very bottom and seeing that it's out of stock or discontinued.

Just wondering if that functionality already exists (to both display the Add to Cart box near the top of the product description when in vertical screen orientation), or if it's something I can add through CSS (making a block of code hidden or visible depending on the size of the display, etc).

Attachment 20921

  • Jeff
7 Mar 2025, 12:16 PM
#1534
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

Jeff_Mash:

Question: is there already built-in settings to have the Add to Cart Box float at the top of the page of the mobile menu (in vertical/portrait orientation)?

If the phone is sideways (landscape mode), it's perfect because the Add to Cart Box floats on the right side of the screen.

But if the phone is in vertical/portrait mode, the Add to Cart Box is at the very bottom of the product page. I am getting a lot of customers who think the product is available and asking questions, because they aren't scrolling to the very bottom and seeing that it's out of stock or discontinued.

Just wondering if that functionality already exists (to both display the Add to Cart box near the top of the product description when in vertical screen orientation), or if it's something I can add through CSS (making a block of code hidden or visible depending on the size of the display, etc).

Attachment 20921

That would require moving the various block-elements of the tpl_product_info_display.php template around in your site's "clone".

8 Mar 2025, 2:08 PM
#1535
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

v3.7.6 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 for the following GitHub issues:

#471: Correct XSS vulnerabilty in Bootstrap carousels.
#472: Correct duplicate ID featuredCenterbox-card-header in featured-categories centerbox.
#468: Retire use of E_USER_ERROR; deprecated for PHP 8.4.
#473: Add icons to upper nav-bar links.
#470: Correct font-awesome class used for front-page slider.
#474: Correct action used for product notifications on the checkout_success page.
#476: Add about_us page-link to site_map page listing.
#477: Use consistent heading numbers for checkout_shipping_address page.

3 Apr 2025, 6:00 PM
#1536
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Can someone tell me how (if possible) to display a Shopping Cart icon in the top menu header for MOBILE devices?

In regular desktop mode, if someone adds an item to their shopping cart, the Shopping Cart link will display. But in mobile devices, if someone adds an item, there is no icon for them to see and click.

Instead, they have to click the menu (three horizontal lines) and then go to the Shopping Cart. It would be easier if the template would reduce this to one click instead of two.

We have had some customers complain that they couldn't find how to checkout, and we figured out it's because they continue browsing for more items, and then forget how to get back to the Shopping Cart. Having a little icon at the top of the mobile menu would eliminate this issue.

I didn't see if there was any configuration item in the Admin Menu to allow that to display or not.

  • Jeff
9 Apr 2025, 11:57 PM
#1537
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Using this template with ZC 2.1.0. Looks great !

I am trying to display EZ Pages and possibly banners in the header instead of side boxes by way of layout boxes controller. I have no problem w/ search in the header, but that is the only box I am able to move to it. I have 3-6-3 set-up on template settings for columns and have reset the boxes, but still the only box that will go to header boxes is the search box. And for clarification, when I try and drag the box over I get a small icon to display not allowed icon. What am I missing? Anyone? Thanks !

10 Apr 2025, 1:36 AM
#1538
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: ZCA Bootstrap 4 Template [Support Thread]

Not really a bootstrap item as both are controllerd by your Configuration menu.

Under Configuration >> EZ-Pages Settings, you can turn the Header Bar on or off.

https://docs.zen-cart.com/user/admin/banner_ads/#positioning-banner-groups gives a good explanation of how to position banners and a visualization of where the three header/footer options can be placed.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Apr 2025, 1:43 AM
#1539
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Thanks for your response. I just realized it will go within the navmain bar. I was hoping to place w/ a float right within the logoWrapper. I was thinking I may need to adjust the tpl_header.php file to move that string to a new location. Does that sound right? Thanks again.

10 Apr 2025, 1:51 AM
#1540
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: ZCA Bootstrap 4 Template [Support Thread]

Open a thread outside bootstrap for discussion.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com