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

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,574

Results 1,041 to 1,060 of 1,686
19 Jun 2023, 2:09 AM
#1041
dbltoe avatar

dbltoe

Totally Zenned

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

ZCA Bootstrap 4 Template [Support Thread]

:rotflmao:

If it cost a dollar to go around the world, I couldn't get out of site!

I know it's not the mainstream view but...

Clean code, descriptions that describe your product to a blind man, and accessibility beat the SEO "masters" in my opinion. Google kayak parts. Scroll down to the first non-sponsored result. No SEO, no paid clicks, no "friendly" URLs. Just content correctness. Looking forward to moving them to 158a and Bootstrap in November after things settle down.

BTW, It's interesting to note that the first of three parts in their course is Content Creation.:yes:

28 Jun 2023, 4:27 PM
#1042
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

Hello,

Is there a way to make the brand box scrolling like originally? I have too long of a list to leave it as "buttons".

28 Jun 2023, 4:57 PM
#1043
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

ideasgirl:

Hello,

Is there a way to make the brand box scrolling like originally? I have too long of a list to leave it as "buttons".
The "Manufacturers Info" drop-down listing sidebox is still available ... I believe that that's the "original" one you refer to. You can always disable the "Brands" sidebox if its display doesn't work for your site.

28 Jun 2023, 5:23 PM
#1044
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

OH, it is! (manufacturers) Thank you and apologies.

28 Jun 2023, 7:34 PM
#1045
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

ideasgirl:

OH, it is! (manufacturers) Thank you and apologies.
No need to apologize; that sidebox was added in support of Zen Cart 1.5.8.

30 Jun 2023, 10:52 PM
#1046
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

Jeff_Mash:

This would be more of a feature request, but is there an easy way to have the "Newsletter Subscribe" checkbox also featured on the checkout page?

It would be the same exact code as seen on the Account Creation page, I'd imagine.

Here's why. Since we have guest checkout, we want the opportunity to capture as many newsletter subscribers as possible. These are people who may not create an account, or perhaps may have forgotten that we offer a newsletter after they created their account.

By also displaying the "Subscribe to our Newsletter" box on the checkbox page, it gives us one more opportunity to increase our mailing list since there's more daily orders vs daily account creations.

Could you tell me what code to copy into which file in order to make that one of the boxes? It could look just like it does on the account creation page: https://i.postimg.cc/FHZHXvGH/Electricc-Touch-Dimensions.png
Turns out that the requested feature is already present in OPC/Bootstrap; I think it's been there forever. Requires that Configuration :: Customer Details :: Show Newsletter Checkbox be set to something other than 0.

6 Jul 2023, 8:53 PM
#1047
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

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

Re: ZCA Bootstrap 4 Template [Support Thread]

Looking for advice on how to combine the shipping modules display on the Checkout Shipping page into one "card". Using bootstrap template, 1.5.8, USPS shipping plugin. Basically, I have flat-rate shipping enabled but all of these orders are shipped via USPS anyways (first class package). I have USPS enabled to give customers option to upgrade to Priority at the calculated rate. I would like the "flat rate" option to appear as a radio option under the USPS card header rather than have a flat rate box and a USPS box. Suggestions? TIA!

6 Jul 2023, 10:20 PM
#1048
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:

Looking for advice on how to combine the shipping modules display on the Checkout Shipping page into one "card". Using bootstrap template, 1.5.8, USPS shipping plugin. Basically, I have flat-rate shipping enabled but all of these orders are shipped via USPS anyways (first class package). I have USPS enabled to give customers option to upgrade to Priority at the calculated rate. I would like the "flat rate" option to appear as a radio option under the USPS card header rather than have a flat rate box and a USPS box. Suggestions? TIA!
That formatting is provided by includes/templates/bootstrap/templates/tpl_checkout_shipping_default.php (or your template clone's version).

6 Jul 2023, 11:18 PM
#1049
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

That formatting is provided by includes/templates/bootstrap/templates/tpl_checkout_shipping_default.php (or your template clone's version).

Thanks--I understand that and found the code creating the cards; however, I'm failing to see how I can make the shipping options combine into one. It looks like it is calling each shipping module (Flat Rate and USPS in my example) separately. I'm not savvy enough to figure out how to break it up. In the responsive classic template I would just modify the code within the <fieldset> tags, but this is entirely different. I'm still learning bootstrap so hoping you can point me in the right direction? What part of this should I be changing to combine both modules into one display card?

<!--bof shipping method option card-->
                <div class="card mb-3">
                    <div class="card-header">
                        <?php echo $quotes[$i]['module']; ?> 
<?php
                if (!empty($quotes[$i]['icon'])) {
                    echo $quotes[$i]['icon'];
                }
?>
                    </div>
                    <div class="card-body p-3">
<?php
                if (isset($quotes[$i]['error'])) {
?>
                        <div><?php echo $quotes[$i]['error']; ?></div>
<?php
                } else {
                    for ($j = 0, $n2 = count($quotes[$i]['methods']); $j < $n2; $j++) {
// set the radio button to be checked if it is the method chosen
                        $checked = false;
                        if (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) {
                            $checked = ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']);
                        }

                        if ($n > 1 || $n2 > 1) {
?>
                        <div class="float-right"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></div>
<?php
                        } else {
?>
                        <div class="float-right"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . zen_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></div>
<?php
                        }
?>
                        <div class="custom-control custom-radio custom-control-inline">
                            <?php echo zen_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="ship-'.$quotes[$i]['id'] . '-' . str_replace(' ', '-', $quotes[$i]['methods'][$j]['id']) .'"'); ?>

                            <label for="ship-<?php echo $quotes[$i]['id'] . '-' . str_replace(' ', '-', $quotes[$i]['methods'][$j]['id']); ?>" class="custom-control-label checkboxLabel"><?php echo $quotes[$i]['methods'][$j]['title']; ?></label>
                        </div>
                        <div class="p-1"></div>
<?php
                        $radio_buttons++;
                    }
                }
?>
                    </div>
                </div>
<?php
            }
        }
    }
?>
            </div>
        </div>

Screenshot of what I'm talking about attached. THanks!Attachment #20330

7 Jul 2023, 2:21 AM
#1050
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 'bump up' an if-clause to re-parse the quotes, capturing the "Flat" value for later use when inserting that quote into the USPS card. The $i loop-level is on a per-shipping-module basis and the $j loop gathers the method(s) provided by the current shipping module.

<?php
    } else {
        $radio_buttons = 0;
        for ($i = 0, $n = count($quotes); $i < $n; $i++) {
      // bof: field set
// allows FedEx to work comment comment out Standard and Uncomment FedEx
//      if (!empty($quotes[$i]['id']) || !empty($quotes[$i]['module'])) { // FedEx
            if (!empty($quotes[$i]['module'])) { // Standard
?>
<!--bof shipping method option card-->
                <div class="card mb-3">
                    <div class="card-header">
                        <?php echo $quotes[$i]['module']; ?> 
<?php
                if (!empty($quotes[$i]['icon'])) {
                    echo $quotes[$i]['icon'];
                }
?>
                    </div>
                    <div class="card-body p-3">
<?php
                if (isset($quotes[$i]['error'])) {
?>
                        <div><?php echo $quotes[$i]['error']; ?></div>
<?php
                } else {
                    for ($j = 0, $n2 = count($quotes[$i]['methods']); $j < $n2; $j++) {
// set the radio button to be checked if it is the method chosen
                        $checked = false;
                        if (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) {
                            $checked = ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']);
                        }

                        if ($n > 1 || $n2 > 1) {
?>
7 Jul 2023, 4:24 AM
#1051
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

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

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

You'll need to 'bump up' an if-clause to re-parse the quotes, capturing the "Flat" value for later use when inserting that quote into the USPS card. The $i loop-level is on a per-shipping-module basis and the $j loop gathers the method(s) provided by the current shipping module.

Forgive me, but I'm completely out of my element on this one. I can work with basic html and css, and am slowly getting the hang of bootstrap, but adding if/then statements to php files starts getting over my head. I completely understand what you're saying needs to be done, I'm just lost as to how to execute. I've looked at the modules and classes files trying to get a better understanding of the $xxxx commands, but still confused as to specifically take the flat shipping modules quote value, "store it" and then output it. Even if you could give me a sample of what it might look like so I can use trial and error that would help.

If it really is too complicated I will just have to learn to live with it, but since I only ship USPS would prefer for all shipping options to display in one card so as to not confuse the customer.

7 Jul 2023, 5:05 AM
#1052
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

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

Re: ZCA Bootstrap 4 Template [Support Thread]

mcqueeneycoins:

Forgive me, but I'm completely out of my element on this one. I can work with basic html and css, and am slowly getting the hang of bootstrap, but adding if/then statements to php files starts getting over my head. I completely understand what you're saying needs to be done, I'm just lost as to how to execute. I've looked at the modules and classes files trying to get a better understanding of the $xxxx commands, but still confused as to specifically take the flat shipping modules quote value, "store it" and then output it. Even if you could give me a sample of what it might look like so I can use trial and error that would help.

If it really is too complicated I will just have to learn to live with it, but since I only ship USPS would prefer for all shipping options to display in one card so as to not confuse the customer.

I think I found a useable workaround--I moved the <div class="card-header"> and it displays all shipping options together with a less than perfect heading. This should work I would think, but any tips on how to make the heading and card body a little cleaner? It looks like it's inheriting the border-radius from the card class--the rounded-bottom, etc. doesn't seem to change anything. I tried messing with the mb, p, etc. as well but not having much luck.

<div class="card card-header mb-0 rounded-top">USPS</div>
<div class="card p-3 border-top-0 rounded-bottom">
				
<?php
    if ($free_shipping === true) {
?>
                <div id="shippingMethod-content-two" class="content"><?php echo FREE_SHIPPING_TITLE . (isset($quotes[$i]['icon']) ? ' ' . $quotes[$i]['icon'] : ''); ?></div>

                <div id="shippingMethod-selected" class="selected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>
<?php
    } else {
        $radio_buttons = 0;
        for ($i = 0, $n = count($quotes); $i < $n; $i++) {
      // bof: field set
// allows FedEx to work comment comment out Standard and Uncomment FedEx
//      if (!empty($quotes[$i]['id']) || !empty($quotes[$i]['module'])) { // FedEx
            if (!empty($quotes[$i]['module'])) { // Standard
?>
<!--bof shipping method option card-->
                <div class="card mb-3">
                   
                    <div class="card-body p-3">
<?php
                if (isset($quotes[$i]['error'])) {
?>
                        <div><?php echo $quotes[$i]['error']; ?></div>
<?php
                } else {
                    for ($j = 0, $n2 = count($quotes[$i]['methods']); $j < $n2; $j++) {
// set the radio button to be checked if it is the method chosen
20 Jul 2023, 4:12 PM
#1053
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've just released v3.6.0 of the ZCA Bootstrap Template to the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2191

This release contains changes associated with the following GitHub issues:

#236: Restructuring and notifications added for AJAX search.
#237: Add missing language constant for AJAX search.
#238: Add a 'soft' configuration setting to disable the 'back-to-top' icon.
#240: Simplify and reduce processing for SNAF pages.
#241: Price-related observer updated to honor a previous observer's changes.
#244: Add a 'soft' configuration setting to control whether zca_js_zone_list returns zone_id or zone_name values.
#245: Correct name of "Add Address" button on the address_book page, was displaying as "Back".
#246: Add role="button" to AJAX search header link to improve SEO rating.
#247: New colors defined for upper NavBar buttons (other than the AJAX header search icon).
#252: "Images" column for table-based product listings updates for screen-readers.
#253: Colors added for "Advanced Accessibility Standards". See this (https://github.com/lat9/ZCA-Bootstrap-Template/wiki/ZCA-Bootstrap-Stylesheets-and-Colors#v360-updates) link for details.
#254: Correct styling for "Buy Now" buttons, 'more info ...' link and min/max/unit display on table-based listings.
#258: ask_a_question and account_history_info page/template updates based on recent zc158 base changes.
#259: Correct HTML validation issues on additional-images' modal display.
#261: "Sold Out" button, add coloring and remove hover-pointer since the button's not clickable.
#266: "Float" the 'Add Selected to Cart' button on product listing pages, to keep the button visible in the customer's viewport.

7 Aug 2023, 7:19 AM
#1054
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
365
Plugin Contributions:
6

Re: ZCA Bootstrap 4 Template [Support Thread]

I think I found a bug. When using shipping estimator with Bootstrap v3.6.0 and with option 'Configuration->Customer Details->State field - Display as pulldown when possible?' set to true, there are two field for state: One with pulldown menu and one standard input box. With above option set to false no problem.
The standard input field should be hidden (by some Javascript). I can't find if problem is due to Javascript or css.
If you could point me to where to look at I might be able to fix it.

7 Aug 2023, 12:36 PM
#1055
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

pilou2:

I think I found a bug. When using shipping estimator with Bootstrap v3.6.0 and with option 'Configuration->Customer Details->State field - Display as pulldown when possible?' set to true, there are two field for state: One with pulldown menu and one standard input box. With above option set to false no problem.
The standard input field should be hidden (by some Javascript). I can't find if problem is due to Javascript or css.
If you could point me to where to look at I might be able to fix it.
Are you using the shipping-estimator on the shopping-cart page or as a modal pop-up? The 'standard' behavior of the template (like the rest of the Zen Cart templates) is to include some javascript/jQuery element to hide the "State" field when a pulldown is in use.

For Bootstrap, that's in the bootstrap templates jscript/jscript_addr_pulldowns_zca_bootstrap.php file.

Are there any console errors (see via the browser's F12/Inspect tab)? If so, those might identify the source of the issue. If the HTML isn't valid, the jQuery addition sometimes will not happen properly.

7 Aug 2023, 2:59 PM
#1056
dbltoe avatar

dbltoe

Totally Zenned

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

Re: ZCA Bootstrap 4 Template [Support Thread]

We're getting the same with the estimator button on the cart page.

Another glitch that showed up on a site using Discount Coupons with a "once-per-user" setting. Using that once during guest checkout keeps any later guest from using the coupon. Is the simple thing just to advise customers that they must log in to use the coupon? The disallowed pages are set to default.

8 Aug 2023, 10:21 AM
#1057
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
365
Plugin Contributions:
6

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

Are you using the shipping-estimator on the shopping-cart page or as a modal pop-up? The 'standard' behavior of the template (like the rest of the Zen Cart templates) is to include some javascript/jQuery element to hide the "State" field when a pulldown is in use.

For Bootstrap, that's in the bootstrap templates jscript/jscript_addr_pulldowns_zca_bootstrap.php file.

Are there any console errors (see via the browser's F12/Inspect tab)? If so, those might identify the source of the issue. If the HTML isn't valid, the jQuery addition sometimes will not happen properly.

I use the estimator as a popup. I looked at browser debug and source page and could not find any trace of jscript_addr_pulldowns_zca_bootstrap.php file or its code. I don't think it is loaded at all. I tried to change state after setting it a first time but although page reload fields are not updated. The Javascript function that do the update is in the same file...
It is all I found for now.

8 Aug 2023, 12:11 PM
#1058
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

@pilou2, what version of Zen Cart is in use when the pop-up shipping estimator doesn't load the jQuery to do those dropdowns?

8 Aug 2023, 12:21 PM
#1059
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

dbltoe:

We're getting the same with the estimator button on the cart page.

Another glitch that showed up on a site using Discount Coupons with a "once-per-user" setting. Using that once during guest checkout keeps any later guest from using the coupon. Is the simple thing just to advise customers that they must log in to use the coupon? The disallowed pages are set to default.
Saying that the disallowed pages are set to default doesn't help (I'd need to look at the code). Is ot_coupon in that list? If not, sounds like it should be.

8 Aug 2023, 4:40 PM
#1060
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
365
Plugin Contributions:
6

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

@pilou2, what version of Zen Cart is in use when the pop-up shipping estimator doesn't load the jQuery to do those dropdowns?

It is Version 1.5.8a with some Github updates up to few weeks ago and Japanese pack is installed and Postcode_auto too... Yes I know it could interfere especially last one but as #dbltoe said > We're getting the same with the estimator button on the cart page. I don't think it is the case. I plan to make a fresh install of Zencart and Bootstrap as soon as I have more time.