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

ZCA Bootstrap 4 Template [Support Thread]

Views: 542,604

Results 1,401 to 1,420 of 1,686
6 Aug 2024, 7:07 AM
#1401
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

ZCA Bootstrap 4 Template [Support Thread]

barco57:

ok, testing shows that Ckeditor5 is what is stripping the class off the image tag.
So another thing that Ckeditor 5 causes an issue with

Ok, so to workaround this currently I am pasting code directly into the database - it may be slow, but it works.

Another couple of questions:
In the documentation (https://github.com/lat9/ZCA-Bootstrap-Template/wiki/Frequently-Asked-Questions#applying-site-specific-styling)
the following code is mentioned:
if ($this_is_home_page) {
?>

<style> h1 {color: red;} </style> <?php } This will allow for styling of the home page, is there a list of codes for the various pages? e.g. contact us, ez pages, etc? I assume this code could also used to load a style sheet for a specific page? <link href="<?php echo $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/mysite.css'; ?>" rel="stylesheet">
6 Aug 2024, 9:20 AM
#1402
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
284
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

royaldave:

Not seeing anything, no.

I have reverted to using responsive classic in this setup and its now working as should.

No idea what the issue is - I'm faced with starting over on this upgrade and checking the shopping cart at each step.

OK.

Installed fresh copy of 2.0.1. Using demo DB. All is good.
Installed fresh copy of bootstrap. All is good - shopping cart update qty works as it should.
Dropped the demo DB and put a copy of my live DB in there. Upgraded it through zc_install.
Shopping cart update qty now broken!

So something in my DB is causing the issue! What?

Here's the weird thing though - if I get a copy of the recursive classic version of tpl_shopping_cart_default.php and drop it in over the bootstrap one (and remove the isMobile bits so it will run) - the update qty functionality works as it should!

I promise you no other changes have been made.

Any ideas?

6 Aug 2024, 2:04 PM
#1403
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

mikecnz:

Ok, so to workaround this currently I am pasting code directly into the database - it may be slow, but it works.

Another couple of questions:
In the documentation (https://github.com/lat9/ZCA-Bootstrap-Template/wiki/Frequently-Asked-Questions#applying-site-specific-styling)
the following code is mentioned:
if ($this_is_home_page) {
?>

<style> h1 {color: red;} </style> <?php } This will allow for styling of the home page, is there a list of codes for the various pages? e.g. contact us, ez pages, etc? I assume this code could also used to load a style sheet for a specific page? <link href="<?php echo $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/mysite.css'; ?>" rel="stylesheet">

The various pages can be seen by viewing the names of the sub-directories in /includes/modules/pages. To load a page-specific stylesheet, you can refer to /includes/templates/template_default/css/CSS_read_me.txt, which contains

The CSS files are sent to the browser in this order: (and alphabetically within each case of more than one match):

             style*.css   // are always loaded and at least ONE should contain site-wide properties.
language_stylesheet.css   // changes to ALL pages, when that language is used
         index_home.css   // specifically affects the home page only
          page_name.css   // changes to one page, ie: index.php?main_page=page_name
 language_page_name.css   // changes to one page, when that language is used
            c_??_??.css   // changes to all info pages in a category
   language_c_??_??.css   // changes to all info pages in a category, when that language is used
   c_??_??_children.css   // changes for all children of the specified parent. Also supports a language prefix.
               m_??.css   // changes to a manufacturer's listing page
      language_m_??.css   // changes to a manufacturer's listing page, when that language is used
               p_??.css   // changes to a product's info page
      language_p_??.css   // changes to a product's info page, when that language is used
             print*.css   // printer-friendly global usage site-wide changes for printing-only
             page##.css   // EZ-Page -- css specific to a numbered EZ-page ... ie:  page21.css would be for EZ-Page number 21 ... ie: for the URL index.php?main_page=page&id=21

The 'stylesheet.css' is expected to load first and should contain the bulk of your CSS selectors. Each file loaded takes priority over previously loaded file(s). To save loading time, only new selectors or selectors whose properties you wish to change should be in the optional CSS files. You can have different overrides for the same page, in different languages, because the two would never be called at the same time.

If someone selected the French language on your site, the 'french_stylesheet.css' would also be loaded. It should only contain the site-wide changes you want to make to 'stylesheet.css'. For example, change a 'background-image' for your French customers.

If someone went to any of the other pages, that page's CSS file would be loaded. Possibly you want different 'background-image' & 'background-color' on each of 'page_x' pages. Possibly you do not want a border around '.plainBox' most of the time, but on a couple of pages you do... and on one of those pages you want it in black and the other in red.

Possibly you created a NEW tag and did a <span class="newtag"> in your Privacy Statement. It is defined in only one CSS file, 'german_privacy.css' as '.newtag { text-transform: uppercase }' Because, in Germany, that phrase must be in all CAPS, but not in other countries.

Use your CSS files and the standard tags as much as possible, just change their properties when needed. If possible, DON'T HACK the core code. Use your CSS files to do the work for you. When the style coding has been removed from the ZenCart code and people have to decide if they want to go without the upgrade ~or~ undo all their hacks and finally learn about CSS... your site will still be up and running.

Additional information is contained in the Zen Cart documentation.


Adapted from ideas presented by
Juxi Zoza
03/15/05
6 Aug 2024, 2:06 PM
#1404
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

royaldave:

OK.

Installed fresh copy of 2.0.1. Using demo DB. All is good.
Installed fresh copy of bootstrap. All is good - shopping cart update qty works as it should.
Dropped the demo DB and put a copy of my live DB in there. Upgraded it through zc_install.
Shopping cart update qty now broken!

So something in my DB is causing the issue! What?

Here's the weird thing though - if I get a copy of the recursive classic version of tpl_shopping_cart_default.php and drop it in over the bootstrap one (and remove the isMobile bits so it will run) - the update qty functionality works as it should!

I promise you no other changes have been made.

Any ideas?
I'd need a gzipped copy of the database to see for myself; send me a PM with a link, please.

7 Aug 2024, 5:02 AM
#1405
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

Further to my query above, in regards to id's or classes that already exist in the template but don't appear to have any set styling for example:

h1 id="indexCategories-pageHeading" class="pageHeading" from the home page.

Can I add these to the stylesheet, or should I create and load a new one?

7 Aug 2024, 1:46 PM
#1406
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

mikecnz:

Further to my query above, in regards to id's or classes that already exist in the template but don't appear to have any set styling for example:

h1 id="indexCategories-pageHeading" class="pageHeading" from the home page.

Can I add these to the stylesheet, or should I create and load a new one?
Your "best" option is to add them to the site_specific_styles.php, within a <style></style> section. That way, you won't overwrite your updates when the base template is updated.

18 Aug 2024, 3:17 PM
#1407
jpda avatar

jpda

Zen Follower

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

Re: ZCA Bootstrap 4 Template [Support Thread]

@mikecnz

if ($this_is_home_page) {
?>

<style> h1 {color: red;} </style> <?php } This will allow for styling of the home page, is there a list of codes for the various pages? e.g. contact us, ez pages, etc?

See this post: https://www.zen-cart.com/showthread.php?223910-ZCA-Bootstrap-4-Template-Support-Thread&p=1391428#post1391428

jpda

18 Aug 2024, 11:33 PM
#1408
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

Is there any work underway to update this to use Bootstrap 5.3.3 or is it staying on Bootstrap 4.6.2 for the foreseeable future?

18 Aug 2024, 11:51 PM
#1409
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

strelitzia:

Is there any work underway to update this to use Bootstrap 5.3.3 or is it staying on Bootstrap 4.6.2 for the foreseeable future?
Planned, but nothing currently underway.

19 Aug 2024, 12:00 AM
#1410
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

Planned, but nothing currently underway.

I have a client wanting BS5 so I may need to look at the conversion then. Perhaps you could set up a BS5 directory in your GitHub repo so I can share any work that I might do.
Would also help to agree on a version number for the change to 5.

19 Aug 2024, 11:21 AM
#1411
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

strelitzia:

I have a client wanting BS5 so I may need to look at the conversion then. Perhaps you could set up a BS5 directory in your GitHub repo so I can share any work that I might do.
Would also help to agree on a version number for the change to 5.
Just for grins and giggles, let's call it v5.0.0 ... thanks for your assistance.

26 Aug 2024, 10:03 AM
#1412
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

Hi Cindy,

I've started working on migrating the template from Bootstrap 4 to Bootstrap 5. One significant change in Bootstrap 5 is the removal of the jQuery dependency, which affects how we handle certain components, such as carousels.

Regarding the carousel updates, I wanted to get your input on the approach we should take. There are two options:

Stick with the existing jQuery carousel code: This would involve keeping the current jQuery implementation of the carousel and making necessary adjustments to ensure compatibility with Bootstrap 5. However, this approach would still rely on jQuery, which goes against Bootstrap 5's philosophy of removing the dependency.

Update to use the Bootstrap 5 default carousel: This would involve refactoring the carousel code to utilize the native Bootstrap 5 carousel component, which is built using vanilla JavaScript. This approach aligns with Bootstrap 5's recommended practices and eliminates the need for jQuery.

Considering the long-term maintainability and alignment with Bootstrap 5's principles, which approach do you prefer? Let me know your thoughts, and we can discuss further to determine the best course of action."

26 Aug 2024, 12:59 PM
#1413
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

strelitzia:

Hi Cindy,

I've started working on migrating the template from Bootstrap 4 to Bootstrap 5. One significant change in Bootstrap 5 is the removal of the jQuery dependency, which affects how we handle certain components, such as carousels.

Regarding the carousel updates, I wanted to get your input on the approach we should take. There are two options:

Stick with the existing jQuery carousel code: This would involve keeping the current jQuery implementation of the carousel and making necessary adjustments to ensure compatibility with Bootstrap 5. However, this approach would still rely on jQuery, which goes against Bootstrap 5's philosophy of removing the dependency.

Update to use the Bootstrap 5 default carousel: This would involve refactoring the carousel code to utilize the native Bootstrap 5 carousel component, which is built using vanilla JavaScript. This approach aligns with Bootstrap 5's recommended practices and eliminates the need for jQuery.

Considering the long-term maintainability and alignment with Bootstrap 5's principles, which approach do you prefer? Let me know your thoughts, and we can discuss further to determine the best course of action."
Using the native Bootstrap 5 for the carousel seems the right path to me. Please note that the template's load of the latest jQuery should be kept, since many other plugins make use of that interface.

26 Aug 2024, 1:20 PM
#1414
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: ZCA Bootstrap 4 Template [Support Thread]

lat9:

Using the native Bootstrap 5 for the carousel seems the right path to me. Please note that the template's load of the latest jQuery should be kept, since many other plugins make use of that interface.

Yes, I've noticed this and retained it in the preload.

26 Aug 2024, 3:04 PM
#1415
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

strelitzia:

Yes, I've noticed this and retained it in the preload.
Great. Note, too, that I've created a v500 branch on the repo: https://github.com/lat9/ZCA-Bootstrap-Template/tree/v500

30 Aug 2024, 6:46 PM
#1416
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap 4 Template [Support Thread]

v3.7.3 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 associated with these GitHub issues:

#316: Don't display back-to-top on small/medium devices.
#386: Use the $template class to locate site_specific_styles.php.
#411: Add the zc210 notifier to the account_history_info page's template.
#417: Submitted keywords to AJAX search must be a 'string'.
#419: Display shipping module's error messages in the shipping-estimator.
#421: "Align" with zc210's implementation for the order_status page's template.
#422: Split CSS/JS loading into separate modules; was in common/html_header.php.
#426: ezpages :: page_is_ssl removed in zc210; default always to 'SSL'.
#428: Recognize zc210's mobile-menu settings for EZ-Pages.
#429: Add support for zc210's "Featured Categories" feature.
#432: Correct layout inconsistency between "Notification" and "Manufacturers Info" centerboxes.
#434: Correct background-color bleed-through on various card classes.
#435: Centerbox Background Color applied to containing cards, not the wrapper.

13 Sep 2024, 4:45 AM
#1417
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I had the following problems with the bestsellers displayed in the sideboxes:

  • In Configuration -> Maximum Values -> Best Sellers for Box I had to put in 11 to display 10 bestseller.
  • The number 1 bestseller was never displayed. It started with the second best selling item.

I fixed it by modifying includes/templates/bootstrap/sideboxes/tpl_best_sellers.php.
Line 19

for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {

should be

for ($i = 0, $j = count($bestsellers_list); $i<$j; $i++) {

Line 22

$i . '. ' .

should be

$i+1 . '. ' .

Somebody check please.

13 Sep 2024, 4:59 AM
#1418
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I forgot to add:
Zen Cart version 1.5.8a
Bootstrap 3.7.0

13 Sep 2024, 5:37 AM
#1419
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: ZCA Bootstrap 4 Template [Support Thread]

todoonada:

I had the following problems with the bestsellers displayed in the sideboxes:

  • In Configuration -> Maximum Values -> Best Sellers for Box I had to put in 11 to display 10 bestseller.
  • The number 1 bestseller was never displayed. It started with the second best selling item.

...

i can confirm the first item, but not the 2nd item; ie if you needed to have 1 more then the max to display that number.

BUT, the #1 best seller was displayed in my setup.

my fix:

//from
for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {
// to
for ($i = 1, $j = count($bestsellers_list); $i<=$j; $i++) {

in my setup, your line 22 fix, is not correct.

my $bestsellers_list is an array. and the first array element is 1. if your first array element is 0 (which is possible if you have an override of the bestseller module; and i will note that your version of bootstrap does not); then i can see how your code would be correct.

best.

14 Sep 2024, 12:02 AM
#1420
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: ZCA Bootstrap 4 Template [Support Thread]

I do not have an override of the bestseller module.
This code is the original code. I just added the first line (echo $bestsellers_list[0]['name'];) to access the first element in the array, which is position 0.

echo $bestsellers_list[0]['name'];
if ($is_carousel === false) {


    $content = '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="list-group-flush sideBoxContent">' . "\n";


    for ($i = 1, $j = count($bestsellers_list); $i<$j; $i++) {
        $content .=
            '<a class="list-group-item list-group-item-action" href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' .
                $i . '. ' .
                zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) .
            '</a>';
    }


    $content .= "</div>\n";
    return;
}

Result looks like this. The item above the "Bestseller" headline is the best selling item at array position 0.

Attachment 20753