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

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,582

Results 1,161 to 1,180 of 1,686
16 Feb 2024, 8:12 PM
#1161
lat9 avatar

lat9

Administrator

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

ZCA Bootstrap 4 Template [Support Thread]

mcqueeneycoins:

Got it, sorry if I confused anyone. Not sure if it is related or not, but it doesn't look like the State/Province drop down menus auto-update when a new country is selected in the estimator. Is it supposed to?
There are apparently multiple issues when the Shipping Estimator is displayed as a "Button" on the shopping-cart page; for the time being, changing Configuration :: Shipping/Packaging :: Shipping Estimator Display Settings for Shopping Cart to '2' (Display as Listing on Shopping Cart Page) will work-around the issue.

17 Feb 2024, 5:27 AM
#1162
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

@lat9, possibly another bug found on the checkout_success page? "My Orders" button showing in the log off card box, the "My Account" box has a customer service text/button, and Customer Service box duplicates My Account content. See red below:

<!--bof log off card-->
    <div id="logOff-card" class="card">
        <div id="logOff-card-body" class="card-body"> 
<?php
  if (isset($_SESSION['customer_guest_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_GUEST;
  } elseif (isset($_SESSION['customer_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
  }
?>

    <div id="logOff-btn-toolbar" class="btn-toolbar justify-content-between mt-3" role="toolbar">
        <?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'), BUTTON_MY_ORDERS_TEXT, 'button_my_orders', 'id="linkMyAccount"'); ?>
        <?php echo zca_button_link(zen_href_link(FILENAME_LOGOFF, '', 'SSL'), BUTTON_LOG_OFF_ALT, 'button_logoff', 'id="linkLogoff"'); ?>
    </div>

        </div>
    </div>
<!--eof log off card-->

<!--bof my account card--> 
    <div id="myAccount-card" class="card">
        <div id="myAccount-card-body" class="card-body">
<?php echo TEXT_CONTACT_STORE_OWNER;?>

    <div id="cust-btn-toolbar" class="btn-toolbar justify-content-center mt-3" role="toolbar">
        <?php echo zca_button_link(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'), BUTTON_CONTACT_US_TEXT, 'button_contact_us'); ?>
    </div>

        </div>
    </div>
<!--eof my account card-->

</div>
<!--eof card deck-->

<!--bof customer service card--> 
    <div id="customerService-card" class="card mb-3">
        <div id="customerService-card-body" class="card-body p-3">
            <?php echo TEXT_CONTACT_STORE_OWNER;?>
        </div>
    </div>
<!--eof customer service card-->

Should the My Account card box be calling for the TEXT_SEE_ORDERS language?

17 Feb 2024, 2:44 PM
#1163
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

mcqueeneycoins:

@lat9, possibly another bug found on the checkout_success page? "My Orders" button showing in the log off card box, the "My Account" box has a customer service text/button, and Customer Service box duplicates My Account content. See red below:

<!--bof log off card-->
<div id="logOff-card" class="card">
    <div id="logOff-card-body" class="card-body"> 
<?php if (isset($_SESSION['customer_guest_id'])) { echo TEXT_CHECKOUT_LOGOFF_GUEST; } elseif (isset($_SESSION['customer_id'])) { echo TEXT_CHECKOUT_LOGOFF_CUSTOMER; } ?>
<div id="logOff-btn-toolbar" class="btn-toolbar justify-content-between mt-3" role="toolbar">
    <?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'), BUTTON_MY_ORDERS_TEXT, 'button_my_orders', 'id="linkMyAccount"'); ?>
    <?php echo zca_button_link(zen_href_link(FILENAME_LOGOFF, '', 'SSL'), BUTTON_LOG_OFF_ALT, 'button_logoff', 'id="linkLogoff"'); ?>
</div>

    </div>
</div>
<!--eof log off card--> <!--bof my account card-->
<div id="myAccount-card" class="card">
    <div id="myAccount-card-body" class="card-body">

<?php echo TEXT_CONTACT_STORE_OWNER;?>

<div id="cust-btn-toolbar" class="btn-toolbar justify-content-center mt-3" role="toolbar">
    <?php echo zca_button_link(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'), BUTTON_CONTACT_US_TEXT, 'button_contact_us'); ?>
</div>

    </div>
</div>
<!--eof my account card--> </div> <!--eof card deck--> <!--bof customer service card-->
<div id="customerService-card" class="card mb-3">
    <div id="customerService-card-body" class="card-body p-3">
        <?php echo TEXT_CONTACT_STORE_OWNER;?>
    </div>
</div>
<!--eof customer service card-->
> 
> Should the My Account card box be calling for the TEXT_SEE_ORDERS language?
Yep, I saw that when I updated my site to use the template (the duplication).  I'll be removing the following section from /bootstrap/templates/tpl_checkout_success_default.php for the next release:
<!--bof customer service card-->
<div id="customerService-card" class="card mb-3">
    <div id="customerService-card-body" class="card-body p-3">
        <?php echo TEXT_CONTACT_STORE_OWNER;?>
    </div>
</div>
<!--eof customer service card-->
19 Feb 2024, 4:44 AM
#1164
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

@lat9, sorry to be a pain, but have a new issue I could use some help with--I'm assuming it's something I did, but maybe you can identify the root cause. On shopping cart page, I combined the update button and delete buttons to be within the same div/column. Pretty much a straight cut and paste of the code which I initiated because the update icon was disappearing completely on smaller screens with the original bootstrap code (I think). However, the issue is the "update" icon actually deletes the item. More specifically, if there is one item in the cart, it deletes that item. If there are multiple items in the cart, it deletes all but the first item and changes the quantity for the wrong item (e.g. change quantity on item #3 to 5, code deletes item #2 and #3 and changes quantity of item #1 to 5).

           <tr>
                <td class="qtyCell text-center pb-1">
<?php
        if ($product['flagShowFixedQuantity']) {
            echo $product['showFixedQuantityAmount'] . ' ' . $product['flagStockCheck'] . ' ' . $product['showMinUnits'];
        } else {
            echo $product['quantityField'] . ' ' . $product['flagStockCheck'] . ' ' . $product['showMinUnits'];
        }
?>
                    <div class="d-sm-none mt-2">
				<?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?>
<?php
        if ($product['buttonDelete']) {
?>
                    <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>" class="btn btn-sm" aria-label="<?php echo ICON_TRASH_ALT; ?>" title="<?php echo ICON_TRASH_ALT; ?>"><i aria-hidden="true" class="fas fa-sm fa-trash-alt"></i></a>
<?php
        }
        if ($product['checkBoxDelete'] ) {
            $checkbox_field = zen_draw_checkbox_field('cart_delete[]', $product['id'], false, 'id="del-r-' . $product['id'] . '"');
            $checkbox_field = str_replace('custom-control-input', 'form-check-input', $checkbox_field);
?>
                    <div class="form-check mt-1">
                        <?php echo $checkbox_field; ?>
                        <label class="form-check-label sr-only" for="del-r-<?php echo $product['id']; ?>"><?php echo ARIA_DELETE_ITEM_FROM_CART; ?></label>
                    </div>
<?php
        }
?>
                    </div>
                </td>
                <td class="qtyUpdateCell text-center align-middle d-none d-sm-table-cell"><?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?>
				
				<?php
        if ($product['buttonDelete']) {
?>
                    <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>" class="btn btn-sm" aria-label="<?php echo ICON_TRASH_ALT; ?>" title="<?php echo ICON_TRASH_ALT; ?>"><i aria-hidden="true" class="fas fa-sm fa-trash-alt"></i></a>
<?php
        }
        if ($product['checkBoxDelete'] ) {
            $checkbox_field = zen_draw_checkbox_field('cart_delete[]', $product['id'], false, 'id="del-' . $product['id'] . '"');
            $checkbox_field = str_replace('custom-control-input', 'form-check-input', $checkbox_field);
?>
                    <div class="form-check mt-1">
                        <?php echo $checkbox_field; ?>
                        <label class="form-check-label sr-only" for="del-<?php echo $product['id']; ?>"><?php echo ARIA_DELETE_ITEM_FROM_CART; ?></label>
                    </div>
<?php
        }
?>
				
				</td>
                <td class="productsCell">
                    <a href="<?php echo $product['linkProductsName']; ?>">
                        <span class="d-none d-sm-block float-left mr-3"><?php echo $product['productsImage']; ?></span>
                        <?php echo $product['productsName'] . ' ' . $product['flagStockCheck']; ?>
                    </a>
					
					

<?php
        echo $product['attributeHiddenField'];
        if (isset($product['attributes']) && is_array($product['attributes'])) {
?>
                    <div class="productsCell-attributes">
                        <ul>
<?php
            foreach ($product['attributes'] as $option => $value) {
?>
                            <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
<?php
            }
?>
                        </ul>
                    </div>
<?php
        }
?>
                </td>
                <td class="priceCell text-right"><?php echo $product['productsPriceEach']; ?></td>
                <td class="totalsCell text-right"><?php echo $product['productsPrice']; ?></td>
 <!--changed price text to right align, hiding column, combined with update               <td class="removeCell text-center d-none d-sm-table-cell">

                </td> -->
            </tr>
19 Feb 2024, 5:20 PM
#1165
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Disregard my last post--I managed to fix it. Just reinstalled the original code and redid my modifications. Must have been missing a closing tag or something somewhere.

25 Feb 2024, 5:40 PM
#1166
jpda avatar

jpda

Zen Follower

Join Date:
Jun 2014
Posts:
157
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Working on local XAMPP.
zencart-1.5.8a on PHP v8.1
Bootstrap 3.6.3
OPC 2.4.6 (2023-08-19)

These warnings received editing / creating customer account:

Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.

Customer creating account:
--> PHP Warning: Undefined variable $fax in ...\zc158a_2\includes\modules\pages\create_account\header_php_create_account_register.php on line 474.

Any suggestions?

TIA,

jpda

25 Feb 2024, 8:14 PM
#1167
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

jpda:

Working on local XAMPP.
zencart-1.5.8a on PHP v8.1
Bootstrap 3.6.3
OPC 2.4.6 (2023-08-19)

These warnings received editing / creating customer account:

Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.

Customer creating account:
--> PHP Warning: Undefined variable $fax in ...\zc158a_2\includes\modules\pages\create_account\header_php_create_account_register.php on line 474.

Any suggestions?

TIA,

jpda
Neither are associated with the template. I'd need to check on the admin issue (most likely base Zen Cart). For the customer creating account, that's a known OPC issue, staged for correct in the next release (v2.5.0): https://github.com/lat9/one_page_checkout/issues/386

25 Feb 2024, 9:49 PM
#1168
jpda avatar

jpda

Zen Follower

Join Date:
Jun 2014
Posts:
157
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

@lat9

Thanks for replying so fast!:smile:
Where should I have posted the first issue?

Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.

jpda

26 Feb 2024, 8:39 AM
#1169
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

jpda:

@lat9

Thanks for replying so fast!:smile:
Where should I have posted the first issue?

jpda
Not sure, but lines 772 through 780 of customers.php have changed since zc158a:

                            echo zen_draw_input_field(
                                'entry_suburb',
                                htmlspecialchars($cInfo->suburb, ENT_COMPAT, CHARSET, true),
                                zen_set_field_length(
                                    TABLE_ADDRESS_BOOK,
                                    'entry_suburb',
                                    50
                                ) . ' class="form-control" id="entry_suburb"'
                            ); ?>

to lines 782 through 790 in zc200-beta1:

                    echo zen_draw_input_field(
                        'entry_suburb',
                        htmlspecialchars([B](string)[/B]$cInfo->suburb, ENT_COMPAT, CHARSET, true),
                        zen_set_field_length(
                            TABLE_ADDRESS_BOOK,
                            'entry_suburb',
                            50
                        ) . ' class="form-control" id="entry_suburb"'
                    ); ?>
26 Feb 2024, 10:55 AM
#1170
jpda avatar

jpda

Zen Follower

Join Date:
Jun 2014
Posts:
157
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

@lat9

Thanks again! Added the COLOR="#FF0000"[/COLOR] and that solved the problem! :thumbsup:

jpda

28 Feb 2024, 12:18 PM
#1171
donw avatar

donw

New Zenner

Join Date:
May 2018
Location:
Melbourne, Australia
Posts:
29
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Fresh install of ZC 1.5.7d, php 7.4.33, MySQL 10.6.16, Linux hosted, ZCA Bootstrap 3.6.3.

I have been trying to set up the bootstrap footer using EZ Pages with Chapters and TOC as described in earlier posts in this forum, bu have been unable to achieve the outcome I'm after, which is similar to the attached screen capture. As a test I created 3 EZ Pages - Links as the top level of Chapter 1, then Home (with an internal url), then Featured. I expected to see Links as the column heading, with the other 2 entries below it, but this is not what happens. What I get is one entry (Links) in the footer. When I click on this I'm taken to a new page (https://mysite/index.php?main_page=page&id=2&chapter=1) which shows the other 2 entries only if they have no internal url associated with them.

What am I missing ? Any help greatly appreciated.

Attachment 20488

28 Feb 2024, 3:00 PM
#1172
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

donw:

Fresh install of ZC 1.5.7d, php 7.4.33, MySQL 10.6.16, Linux hosted, ZCA Bootstrap 3.6.3.

I have been trying to set up the bootstrap footer using EZ Pages with Chapters and TOC as described in earlier posts in this forum, bu have been unable to achieve the outcome I'm after, which is similar to the attached screen capture. As a test I created 3 EZ Pages - Links as the top level of Chapter 1, then Home (with an internal url), then Featured. I expected to see Links as the column heading, with the other 2 entries below it, but this is not what happens. What I get is one entry (Links) in the footer. When I click on this I'm taken to a new page (https://mysite/index.php?main_page=page&id=2&chapter=1) which shows the other 2 entries only if they have no internal url associated with them.

What am I missing ? Any help greatly appreciated.

Attachment 20488
What you're seeing in that footer-screenshot is, most likely, a site that has integrated the Flexible Footer Menu add-on into their template.

28 Feb 2024, 11:18 PM
#1173
jimmyv avatar

jimmyv

Zen Follower

Join Date:
Feb 2008
Location:
Philadelphia
Posts:
292
Plugin Contributions:
2

Re: ZCA Bootstrap 4 Template [Support Thread]

On mobile screen size in header you have on left the menu expand button the other 80% is blank. On the desktop or large tablet you have a shortcut to cart.

Was thinking of having a cart shortcut and a search shortcut v having the added click to drop the menu (which BTW I set to always expanded to reduce clicks) is there a reason not to do something like that?

29 Feb 2024, 2:02 PM
#1174
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

JimmyV:

On mobile screen size in header you have on left the menu expand button the other 80% is blank. On the desktop or large tablet you have a shortcut to cart.

Was thinking of having a cart shortcut and a search shortcut v having the added click to drop the menu (which BTW I set to always expanded to reduce clicks) is there a reason not to do something like that?
Can't think of a reason not to; that's why I did on my website!

29 Feb 2024, 4:21 PM
#1175
jimmyv avatar

jimmyv

Zen Follower

Join Date:
Feb 2008
Location:
Philadelphia
Posts:
292
Plugin Contributions:
2

Re: ZCA Bootstrap 4 Template [Support Thread]

Cool will dig into that thought there might be some logics there making them problematic v bootstrap

6 Mar 2024, 4:55 PM
#1176
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]

Possibly interesting to some: I had a client who insisted that the nav bar should be right aligned, not left aligned (so the links are at the right hand side of the nav bar). Here's how you do it:

Modify includes/templates/bootstrap/common/tpl_header.php and change

            <div class="collapse navbar-collapse" id="navbarSupportedContent">

to

            <div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">

(You could of course also do this in your stylesheet or site specific styles file.)

8 Mar 2024, 4:39 PM
#1177
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 upgraded the bootstrap template from 3.6.2 to 3.6.3,(php 7.4.33, Mysql 5.7.31 ZC 1.5.7d) and I get a lot of errors in the logs such the ones shown below. I would assume that something went wrong in the installation. Any advice is welcome.

[08-Mar-2024 15:41:51 UTC] Request URI: /index.php?main_page=products_all&disp_order=1&page=13, IP address:
#1 require(/includes/templates/bootstrap/templates/tpl_products_all_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant FILENAME_SEARCH_RESULT - assumed 'FILENAME_SEARCH_RESULT' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/templates/tpl_products_all_default.php on line 22.

[08-Mar-2024 15:41:51 UTC] Request URI: /index.php?main_page=products_all&disp_order=1&page=13, IP address:
#1 require(/includes/templates/bootstrap/templates/tpl_products_all_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant TEXT_SHOW - assumed 'TEXT_SHOW' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/templates/tpl_products_all_default.php on line 23.

8 Mar 2024, 4:49 PM
#1178
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 Guys, I upgraded the bootstrap template from 3.6.2 to 3.6.3,(php 7.4.33, Mysql 5.7.31 ZC 1.5.7d) and I get a lot of errors in the logs such the ones shown below. I would assume that something went wrong in the installation. Any advice is welcome.

[08-Mar-2024 15:41:51 UTC] Request URI: /index.php?main_page=products_all&disp_order=1&page=13, IP address:
#1 require(/includes/templates/bootstrap/templates/tpl_products_all_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant FILENAME_SEARCH_RESULT - assumed 'FILENAME_SEARCH_RESULT' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/templates/tpl_products_all_default.php on line 22.

[08-Mar-2024 15:41:51 UTC] Request URI: /index.php?main_page=products_all&disp_order=1&page=13, IP address:
#1 require(/includes/templates/bootstrap/templates/tpl_products_all_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:216]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant TEXT_SHOW - assumed 'TEXT_SHOW' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/templates/tpl_products_all_default.php on line 23.
Crud, that's why I've been dropping support for Zen Cart versions prior to 1.5.8. As a work-around, you can change Configuration :: Product Listing :: Include Product Listing Alpha Sorter Dropdown to false until such time as I get that section updated for zc157 compatibility.

See this GitHub issue for tracking: https://github.com/lat9/ZCA-Bootstrap-Template/issues/333

8 Mar 2024, 6:17 PM
#1180
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

See this GitHub commit for the required changes: https://github.com/lat9/ZCA-Bootstrap-Template/commit/d95728df789a028f4b0b9bbd7d307b66fb960872

That'll be included in v3.6.4 of the template.
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"');