Re: ZCA Bootstrap 4 Template [Support Thread]
actually you are correct.
i am running a module that is overriding the bestseller list; and is using an older version of the module.
the change did happen in v158a, and specifically this commit:
https://github.com/zencart/zencart/c...980bee4b28f972
the old code was like this:
PHP Code:
$rows = 0;
while (!$best_sellers->EOF) {
$rows++;
$bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id'];
...
the index value being the var $rows, and here, it starts at 1.
the new code is like this:
PHP Code:
$bestsellers_list = [];
foreach ($best_sellers as $bestseller) {
$best_products_id = $bestseller['products_id'];
$bestsellers_list[] = [
'id' => $best_products_id,
'name' => $bestseller['products_name'],
...
with no explicit setting of the index, it will definitely start at 0.
good catch.
as to what is the most eloquent way to address this error, i can not say.
but the commit i referenced above is definitely where this bug got introduced.
Re: ZCA Bootstrap 4 Template [Support Thread]
Thank for confirming, carlwhat.
Re: ZCA Bootstrap 4 Template [Support Thread]
ZC 2.0.1
PHP 8.3
Bootstrap 3.7.3
So, I setup a new site and got everything working but for some reason I cannot get it to use the override template files
ZCs Doc page description is fairly stupid proof but it does not work on my site.
**********
Edit includes/languages/english/YOURTEMPLATE/lang.index.php. (Copy includes/languages/english/lang.index.php to includes/languages/english/YOURTEMPLATE/lang.index.php if the override file doesn’t already exist.)
**********
I have done the exact method as described above but for changing the "YOURTEMPLATE" to my own template name "wsworx"
I also did the same thing for the main page logo and it doesn't work either.
The system will not use my override file.
I have the bootstrap template selected in the system
If I inspect the logo element on the main page it shows it using the image from the "template_default" template
I cleared the cache in my browser
Any assistance would be greatly appreciated
Re: ZCA Bootstrap 4 Template [Support Thread]
I setup the new store in a subfolder as a demo for testing before taking it live
I just realized when I inspect the logo on the main page it is actually being pulled from the default_template of my live site.
I don't understand that as I have the includes/configure.php setup to use the demo site as the catalog
Re: ZCA Bootstrap 4 Template [Support Thread]
Quote:
Originally Posted by
wsworx
I setup the new store in a subfolder as a demo for testing before taking it live
I just realized when I inspect the logo on the main page it is actually being pulled from the default_template of my live site.
I don't understand that as I have the includes/configure.php setup to use the demo site as the catalog
There are two config files. includes/configure.php and YOURADMIN/includes/configure.php
As to the template being used. If you cloned something to wsworx or created it in some other way, you still need to select it in Tools >> Template Selection
Re: ZCA Bootstrap 4 Template [Support Thread]
> I just realized when I inspect the logo on the main page it is actually being pulled from the default_template of my live site.
You might have an absolute path reference hardcoded somewhere (perhaps in your template).
Check includes/templates/bootstrap/templates/tpl_header.php in your demo site to see if you changed it to hardcode the logo path?
Re: ZCA Bootstrap 4 Template [Support Thread]
Quote:
Originally Posted by
carlwhat
actually you are correct.
i am running a module that is overriding the bestseller list; and is using an older version of the module.
the change did happen in v158a, and specifically this commit:
https://github.com/zencart/zencart/c...980bee4b28f972
the old code was like this:
PHP Code:
$rows = 0;
while (!$best_sellers->EOF) {
$rows++;
$bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id'];
...
the index value being the var $rows, and here, it starts at 1.
the new code is like this:
PHP Code:
$bestsellers_list = [];
foreach ($best_sellers as $bestseller) {
$best_products_id = $bestseller['products_id'];
$bestsellers_list[] = [
'id' => $best_products_id,
'name' => $bestseller['products_name'],
...
with no explicit setting of the index, it will definitely start at 0.
good catch.
as to what is the most eloquent way to address this error, i can not say.
but the commit i referenced above is definitely where this bug got introduced.
See this Zen Cart PR for the correction: https://github.com/zencart/zencart/pull/6769
Re: ZCA Bootstrap 4 Template [Support Thread]
PHP 8.1.2
ZC 2.0.1
ZCA Bootstrap 3.7.3
Right now I'm running parts of the product pages through a screen reader. One of my pages has the following
https://i.imgur.com/DmV5pju.png
Running it through a screen reader, I hear this:
Code:
Enhance Commit 1 foundation: Your (image for) High Attack or (image for) Mid Attack attack gets +1 speed and +1 damage.
What I wanted to know was, without disabling or changing the IMAGE_ALT_PREFIX define (since it is useful in some cases), is there a way that I can modify the zen_image call to not auto insert the "(image for)" so that a screen reader doesn't insert it?
Re: ZCA Bootstrap 4 Template [Support Thread]
Quote:
Originally Posted by
retched
PHP 8.1.2
ZC 2.0.1
ZCA Bootstrap 3.7.3
Right now I'm running parts of the product pages through a screen reader. One of my pages has the following
https://i.imgur.com/DmV5pju.png
Running it through a screen reader, I hear this:
Code:
Enhance Commit 1 foundation: Your (image for) High Attack or (image for) Mid Attack attack gets +1 speed and +1 damage.
What I wanted to know was, without disabling or changing the IMAGE_ALT_PREFIX define (since it is useful in some cases), is there a way that I can modify the zen_image call to not auto insert the "(image for)" so that a screen reader doesn't insert it?
That (image for) text is coming from the base Zen Cart's zen_image function's use of
PHP Code:
'IMAGE_ALT_PREFIX' => '(image for)',
which is set in the default lang.english.php. You could add that definition to your template-override version, simply setting the language-constant's value to an empty string.
Re: ZCA Bootstrap 4 Template [Support Thread]
v3.7.4 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:
#268: Correct image resizing on column-based products' listings.
#438: "Retire" use of banners_on_ssl field, per zc210 usage.
#439: Update "Matching Heights" jQuery to its most recent version.
#442: Correct quantity-entry "shrink" on column-based products' listings.
#444: Add zc210 notifications to html_header.php and tpl_main_page.php.
#446: "Hide" the ZCA Bootstrap Colors configuration group.
#447: Correct best-sellers' sidebox display (was missing the last item).
#448: Add notifications to tpl_account_history_info.php, primarily for Ty Package Tracker.
#450: Add notification to tpl_footer.php to enable a footer-menu to be included.
#452: Add a 'soft' setting to enable the inclusion of Font Awesome Brands' icons, e.g. Twitter or Facebook.