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

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,393

Results 221 to 240 of 1,686
24 Jan 2020, 12:13 PM
#221
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

ZCA Bootstrap 4 Template [Support Thread]

Nick1973:

Interesting:

On line 20 of includes/classes/site_map.php we have this:

class zen_SiteMapTree { var $root_category_id = 0, $max_level = 0, $data = array(), $root_start_string = '', $root_end_string = '', $parent_start_string = '', $parent_end_string = '', $parent_group_start_string = "\n<ul>", $parent_group_end_string = "</ul>\n", $child_start_string = '<li>', $child_end_string = "</li>\n", $spacer_string = '', $spacer_multiplier = 1;

> 
> If I change ```php
var $root_category_id = 0,
``` to ```php
var $root_category_id = -0,
``` the sitemap displays correctly

Strange, that solutions works here:

<https://ventureengravings.uk/index.php?main_page=site_map>

but not here:

<https://venturegraphicdesign.uk/index.php?main_page=site_map>

HELP!!!!
1 Feb 2020, 1:45 AM
#222
dennisns7d avatar

dennisns7d

New Zenner

Join Date:
Jan 2010
Posts:
55
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I recently ran into a roadblock installing an Order Total module (Shipping Insurance - ot_insurance - 3.3.0 from Numinix - 2.3.2 from the addons is similar) on ZC 1.5.6c PHP 7.1.29 on XAMPP. The checkbox for the customer to select/deselect insurance is NOT visible. It is present in the HTML:

<!--bof discount coupon card-->
<div id="discountCoupon-card" class="card mb-3">
<h4 id="discountCoupon-card-header" class="card-header">
Shipping Insurance</h4> 

<div id="discountCoupon-card-body" class="card-body p-3">

<p>Click here to add optional insurance to your order:</p>
<div id="discountCoupon-gvBal"></div>

<label class="inputLabel" for="opt_insurance">$7.10</label>
<input class="custom-control-input" type="checkbox" name="opt_insurance" value="1" id="opt_insurance" /><input type="hidden" name="insurance" value="1" /></div>  
</div>
<!--eof discount coupon card-->

I've chased this enough to be quite sure that it has to do with the template and its interactions with Order Total modules (probably also payment and shipping). Shipping is just an example module. I'm not sure how many others, if any, have checkboxes for customer selection.

I'm not sure what to do to get the checkbox to appear. Suggestions?

5 Feb 2020, 6:26 PM
#223
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: ZCA Bootstrap 4 Template [Support Thread]

Maybe try this:

<div class="custom-control custom-checkbox">
<input class="custom-control-input" type="checkbox" name="formfieldnamehere" value="1" id="nameTheInputIdHere">
<label class="custom-control-label" for="nameTheInputIdHere" title="help msg here">Text In Browser Here</label>      
</div>
5 Feb 2020, 11:21 PM
#224
dennisns7d avatar

dennisns7d

New Zenner

Join Date:
Jan 2010
Posts:
55
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

DrByte:

Maybe try this:

<div class="custom-control custom-checkbox"> <input class="custom-control-input" type="checkbox" name="formfieldnamehere" value="1" id="nameTheInputIdHere"> <label class="custom-control-label" for="nameTheInputIdHere" title="help msg here">Text In Browser Here</label> </div> ```

Thanks. I added code to includes/templates/CUSTOM/templates/tpl_checkout_payment_default.php to do this for checkboxes.

From:```

<!--bof discount coupon card--> <div id="discountCoupon-card" class="card mb-3"> <h4 id="discountCoupon-card-header" class="card-header"> <?php echo $selection[$i]['module']; ?></h4> <div id="discountCoupon-card-body" class="card-body p-3"> <?php echo $selection[$i]['redeem_instructions']; ?> <div id="discountCoupon-gvBal"><?php echo (isset($selection[$i]['checkbox'])) ? $selection[$i]['checkbox'] : ''; ?></div>

<label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>

<?php echo $selection[$i]['fields'][$j]['field']; ?> </div> </div> <!--eof discount coupon card--> ```

To:```

<!--bof discount coupon card--> <div id="discountCoupon-card" class="card mb-3"> <h4 id="discountCoupon-card-header" class="card-header"><?php echo $selection[$i]['module']; ?></h4> <div id="discountCoupon-card-body" class="card-body p-3"> <?php echo $selection[$i]['redeem_instructions']; if (strpos($selection[$i]['fields'][$j]['field'], 'type="checkbox"') === false) { // filter out checkboxes if (isset($selection[$i]['checkbox'])) { ?> <div id="discountCoupon-gvBal"><?php echo $selection[$i]['checkbox']; ?></div> <?php } ?> <label class="inputLabel"<?php echo isset($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label> <?php echo $selection[$i]['fields'][$j]['field']; } else { // process checkboxes ?> <div class="custom-control custom-checkbox"> <?php echo $selection[$i]['fields'][$j]['field']; ?> <label class="custom-control-label"<?php echo isset($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label> </div> <?php } ?> </div> </div> <!--eof discount coupon card--> ```

It made more sense to me to do this rather than modifying the Order Total add-on since it's specific to the current template.

10 Feb 2020, 11:40 PM
#225
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

n8pbm:

I have the same issue. I am using Paypal Pro to process the credit cards. Once you get to step 3 you cannot continue to the next step. The page does not respond and you cannot check out. replacing tpl_ajax_checkout_confirmation_default.php with the responsive one does seem to fix the issue.

Did this issue get fixed without having to replace tpl_ajax_checkout_confirmation_default.php with the responsive one?

27 Feb 2020, 9:58 AM
#226
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

additional_images.php is missing:

$GLOBALS
``` on line 16

Bootstrap version of additional_images.php

```php
$zco_notifier->notify('NOTIFY_MODULES_ADDITIONAL_PRODUCT_IMAGES_START');

Default Zen Cart 1.5.6c version of additional_images.php

$GLOBALS['zco_notifier']->notify('NOTIFY_MODULES_ADDITIONAL_PRODUCT_IMAGES_START')

Is there a reason for this? Or is it just an error in the code?

27 Feb 2020, 9:45 PM
#227
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Love this template!

Is there a way to make products display as rows instead of columns though?

Thanks!
C

29 Feb 2020, 11:16 PM
#228
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Would also love to center the links in the center footer bar, cant find where this is called out or contained in php or css

1 Mar 2020, 12:13 PM
#229
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

AquaticAddiction:

Love this template!

Is there a way to make products display as rows instead of columns though?

Thanks!
C

Woops. Found it :) Admin > Configuration > Product Listing - Layout Style

2 Mar 2020, 1:06 PM
#230
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Last question. When you click into a product from the category, the price is not displayed - only the add to cart button.
I swapped it over to responsive classic, and the price displayed like normal which leads me to believe its a templating issue.
Help?

3 Mar 2020, 9:43 AM
#231
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

AquaticAddiction:

Last question. When you click into a product from the category, the price is not displayed - only the add to cart button.
I swapped it over to responsive classic, and the price displayed like normal which leads me to believe its a templating issue.
Help?
Do you see this in the source code when you check through a browser:

<div class="centerBoxContentsItem-price text-center"><span class="mx-auto w-100 p-1 productBasePrice">£32.95</span></div>
3 Mar 2020, 9:44 AM
#232
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

AquaticAddiction:

Would also love to center the links in the center footer bar, cant find where this is called out or contained in php or css
Check the source code in footer and add css rule to center text, make sure you end the css rule with !important

4 Mar 2020, 5:17 PM
#233
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I ended up taking tpl_product_info_display.php from the responsive classic template that comes with ZC and overwriting the Bootrap Templates tpl_product_info_display.php with it and then prices showed up.

Overall, its not as nicely templated in page layout as the original was, but at least Ive got prices displayed haha

5 Mar 2020, 9:59 AM
#234
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

AquaticAddiction:

I ended up taking tpl_product_info_display.php from the responsive classic template that comes with ZC and overwriting the Bootrap Templates tpl_product_info_display.php with it and then prices showed up.

Overall, its not as nicely templated in page layout as the original was, but at least Ive got prices displayed haha
Sorry I didn't realise it was the product page template that was an issue, I think I once had the same issue. If you still have the the bootstrap template make sure the following is in place.

<!--bof Product Price block --><?php if (zen_get_products_display_price((int)$_GET['products_id']) > '0') { ?><!--bof products price bottom card--><div id="productsPriceBottom-card" class="card mb-3">  <div id="productsPriceBottom-card-body" class="card-body p-3"><h2 id="productsPriceBottom-productPriceBottomPrice" class="productPriceBottomPrice">  <?php  // base price  if ($show_onetime_charges_description == 'true') {    $one_time = TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION;  } else {    $one_time = '';  }  ?>
<?php  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);?></h2>  </div></div><!--eof products price bottom card--><?php } ?><!--eof Product Price block -->
<!--bof Add to Cart Box -->
7 Mar 2020, 1:10 AM
#235
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

ianhg:

Sorry I didn't realise it was the product page template that was an issue, I think I once had the same issue. If you still have the the bootstrap template make sure the following is in place.

<!--bof Product Price block --><?php if (zen_get_products_display_price((int)$_GET['products_id']) > '0') { ?><!--bof products price bottom card--><div id="productsPriceBottom-card" class="card mb-3"> <div id="productsPriceBottom-card-body" class="card-body p-3"><h2 id="productsPriceBottom-productPriceBottomPrice" class="productPriceBottomPrice"> <?php // base price if ($show_onetime_charges_description == 'true') { $one_time = TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION; } else { $one_time = ''; } ?> <?php echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);?></h2> </div></div><!--eof products price bottom card--><?php } ?><!--eof Product Price block --> <!--bof Add to Cart Box -->

It sure is! :huh:
18 Mar 2020, 3:28 PM
#236
corseter avatar

corseter

New Zenner

Join Date:
Jun 2010
Location:
Crossmolina, Ireland
Posts:
55
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Hi, Just installed your template but when I set it all I get ont the website is a black line accross the top of the page. What has gone wrong? Luckily I have been able to turn it back to the old template.
Running v1.5.5e and your latest version of the template.

11 May 2020, 9:55 AM
#237
shifty_j avatar

shifty_j

New Zenner

Join Date:
May 2020
Posts:
16
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

ianhg:

<fieldset> <legend>Newsletter and Email Details</legend> <input class="custom-control-input" type="checkbox" name="newsletter" value="1" id="newsletter-checkbox" /><label class="checkboxLabel" for="newsletter-checkbox">Subscribe to Our Newsletter.</label><br class="clearBoth" />

<input class="custom-control-input" type="radio" name="email_format" value="HTML" checked="checked" id="email-format-html" /><label class="radioButtonLabel" for="email-format-html">HTML</label><input class="custom-control-input" type="radio" name="email_format" value="TEXT" id="email-format-text" /><label class="radioButtonLabel" for="email-format-text">TEXT-Only</label><br class="clearBoth" />

</fieldset> Thanks for reply

Not sure if you figured this out, but this is how I managed to do it. If anyone has a better way please let me know.

In /includes/templates/YOUR-TEMPLATE/templates/tpl_modules_create_account.php- around line 173

Replace:

<fieldset> <legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend> <?php if (ACCOUNT_NEWSLETTER_STATUS != 0) { ?> <?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?> <br class="clearBoth" /> <?php } ?> <?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?> <br class="clearBoth" /> </fieldset>

With:

<fieldset> <legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend> <div class="custom-control custom-checkbox"> <?php if (ACCOUNT_NEWSLETTER_STATUS != 0) { ?> <?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="custom-control-label" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?> <br class="clearBoth" /></div> <?php } ?> <div class="custom-control custom-radio"> <?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="custom-control-label" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label></div><div class="custom-control custom-radio">' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="custom-control-label" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?> <br class="clearBoth" /></div> </fieldset>

I hope this helps.

24 Jun 2020, 2:15 PM
#238
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

Is ZCA Bootstrap template compatible with Zen cart 1.5.7?

24 Jun 2020, 10:03 PM
#239
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 made a handful of changes to get it to work in PHP 7.4 without notices but it should be ok up to PHP 7.3.

25 Jun 2020, 9:01 AM
#240
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: ZCA Bootstrap 4 Template [Support Thread]

swguy:

I made a handful of changes to get it to work in PHP 7.4 without notices but it should be ok up to PHP 7.3.
Running Zen cart 1.5.7 With Bootstrap ZCA PHP 7.3.6
Thanks, I have loaded it on a VPS server to see if there are any issues and I am getting a few warnings and a couple or errors.

PHP Warning: Declaration of zca_breadcrumb::trail($separator = ' &nbs...') should be compatible with breadcrumb::trail($separator = ' &nbs...', $prefix = '', $suffix = '') in /var/www/vhosts/domain/httpdocs/zen1.5.7/includes/classes/zca/zca_breadcrumb.php on line 0.

fixed above by adding to line 34 prefix and suffix ```php
function trail($separator = '  ', $prefix = '', $suffix = '')


But I am getting warnings regarding an undefined constant DISPLAY_PAGE_PARSE_TIME in bootstrap/common/tpl_main_page.php line 253

Also Fatal Error 0:: ==> includes/modules/centerboxes/also_purchased_products.php line 18 <== in includes/classes/db/mysql/query_factory.php line 170