Zen Cart Logo
Forums / Addon Templates / ZCA Bootstrap Template 1.0 (BETA)

ZCA Bootstrap Template 1.0 (BETA)

Locked

Views: 51,445

Results 21 to 40 of 75
This thread is locked. New replies are disabled.
15 Mar 2018, 8:43 PM
#21
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

ZCA Bootstrap Template 1.0 (BETA)

I've installed the template from github on 1.5.5f . Everything works ok so far with the zca bootstrap template installed. I installed the clone template plugin and created a copy of the bootstrap template. I'm getting an error when the product listing page splits the pages. It works fine on the bootstrap template but not the clone. I went through the custom template folders to make sure that all the contents had been copied. They look identical. I deleted the bootstrap and clone folders and started from scratch with the same results. Here is the debug file:

 PHP Fatal error:  Class 'zca_splitPageResults' not found in /includes/modules/shaft/product_listing.php on line 32

The zca folder is in includes/classes. Any ideas?

15 Mar 2018, 9:22 PM
#22
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

I found the problem. In includes/functions/zca_bootstrap_functions.php there is a test for the template bootstrap being loaded.

function zca_bootstrap_active()
{
    return (isset($GLOBALS['template_dir']) && $GLOBALS['template_dir'] == 'bootstrap');
}

I edited that file and put the name of the template directory and it works fine. Not sure what the best solution is to this one. For now I'll just continue this way.

16 Mar 2018, 10:19 AM
#23
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

I found the problem. In includes/functions/zca_bootstrap_functions.php there is a test for the template bootstrap being loaded.

function zca_bootstrap_active()
{
return (isset($GLOBALS['template_dir']) && $GLOBALS['template_dir'] == 'bootstrap');
}

> I edited that file and put the name of the template directory and it works fine. Not sure what the best solution is to this one. For now I'll just continue this way.
Darn it, I didn't consider template-cloning.  That function is intended to "direct" the template's observer-class as to whether or not it's to apply the template modifications to the various price and HTML elements.

I'll need to ponder this to determine the "best" solution.
16 Mar 2018, 11:03 AM
#24
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap Template 1.0 (BETA)

GitHub issue created to identify this condition.

16 Mar 2018, 9:07 PM
#25
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

A class was removed hiddenField. I found this on the shipping estimator popup where it displayed an additional field under the state pulldown. I added it back to the css .hiddenField {display:none;}. That class is used in a number of places.

16 Mar 2018, 9:25 PM
#26
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

A formatting issue on the checkout_shipping page. If the UPS or USPS modules are used for shipping and multiple shipping options are presented, the names are shown on the left and the prices are floated to the right.
Attachment 17739

16 Mar 2018, 9:59 PM
#27
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

A class was removed hiddenField. I found this on the shipping estimator popup where it displayed an additional field under the state pulldown. I added it back to the css .hiddenField {display:none;}. That class is used in a number of places.

I have been working on this, converting to us BS classes that is......

16 Mar 2018, 10:13 PM
#28
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

lat9:

Darn it, I didn't consider template-cloning. That function is intended to "direct" the template's observer-class as to whether or not it's to apply the template modifications to the various price and HTML elements.

I'll need to ponder this to determine the "best" solution.

how about an extra entry of some sort in the template_info.php with comments that say "if this is entry is changed or deleted the template will fail to function correctly. Added to allow cloning of the template and/or changing the name of the template."

17 Mar 2018, 11:45 AM
#29
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap Template 1.0 (BETA)

barco57:

how about an extra entry of some sort in the template_info.php with comments that say "if this is entry is changed or deleted the template will fail to function correctly. Added to allow cloning of the template and/or changing the name of the template."
Hmm, that might be the plan. I was considering a similar update in a template-specific language file, but that might work too!

Thanks for the suggestion, @barco57!

17 Mar 2018, 3:13 PM
#30
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

A formatting issue on the checkout_shipping page. If the UPS or USPS modules are used for shipping and multiple shipping options are presented, the names are shown on the left and the prices are floated to the right.
Attachment 17739

A fix was provided for this in the /includes/templates/bootstrap/templates/tpl_checkout_shipping_default.php file.

This has been updated in GITHUB.

Nice Catch @badarac

17 Mar 2018, 5:34 PM
#31
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: ZCA Bootstrap Template 1.0 (BETA)

lat9:

Darn it, I didn't consider template-cloning. That function is intended to "direct" the template's observer-class as to whether or not it's to apply the template modifications to the various price and HTML elements.

I'll need to ponder this to determine the "best" solution.

What about an additional check or explode in /includes/functions/zca_bootstrap_functions.php with an extra entry of some sort in the template_info.php with comments that say "if using the Clone a Template plugin, you need to add the Target Template in zca_bootstrap_functions.php first".

Maybe something like: (not tested)

function zca_bootstrap_active()
{
    return (isset($GLOBALS['template_dir']) && $GLOBALS['template_dir'] == (in_array($GLOBALS['template_dir'],explode(",",'bootstrap,bootstrap_test')) ));
}
17 Mar 2018, 6:02 PM
#32
lat9 avatar

lat9

Administrator

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

Re: ZCA Bootstrap Template 1.0 (BETA)

rbarbour:

What about an additional check or explode in /includes/functions/zca_bootstrap_functions.php with an extra entry of some sort in the template_info.php with comments that say "if using the Clone a Template plugin, you need to add the Target Template in zca_bootstrap_functions.php first".

Maybe something like: (not tested)

function zca_bootstrap_active()
{
return (isset($GLOBALS['template_dir']) && $GLOBALS['template_dir'] == (in_array($GLOBALS['template_dir'],explode(",",'bootstrap,bootstrap_test')) ));
}

I went down a *simple *path.

There's a new file as part of the template:  /includes/languages/english/extra_definitions/bootstrap/zca_bootstrap_id.php.  That file contains a single definition (IS_ZCA_BOOTSTRAP_TEMPLATE).  The template's function-file has been updated to check *solely for its definition* (no specific value) to identify that the bootstrap template (or a clone) is the active template.

Change available on the template's GitHub repository.
17 Mar 2018, 6:11 PM
#33
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: ZCA Bootstrap Template 1.0 (BETA)

lat9:

I went down a *simple *path.

There's a new file as part of the template: /includes/languages/english/extra_definitions/bootstrap/zca_bootstrap_id.php. That file contains a single definition (IS_ZCA_BOOTSTRAP_TEMPLATE). The template's function-file has been updated to check solely for its definition (no specific value) to identify that the bootstrap template (or a clone) is the active template.

Change available on the template's GitHub repository.

Simple indeed, nice work as always! :cool:

18 Mar 2018, 6:57 PM
#34
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

rbarbour:

A fix was provided for this in the /includes/templates/bootstrap/templates/tpl_checkout_shipping_default.php file.

This has been updated in GITHUB.

Nice Catch @badarac

The problem is fixed sort of. The radio button now work and the contents are aligned correctly. There is what appears to be a second radio button on each row now. Not clickable but appearing nonetheless.
Attachment 17743
It appears on the payment page also.
Attachment 17744

18 Mar 2018, 7:16 PM
#35
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

The problem is fixed sort of. The radio button now work and the contents are aligned correctly. There is what appears to be a second radio button on each row now. Not clickable but appearing nonetheless.
Attachment 17743
It appears on the payment page also.
Attachment 17744

Disregard. My problem.

18 Mar 2018, 7:56 PM
#36
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

If you set ```php
define('HEADER_SALES_TEXT', '');

18 Mar 2018, 8:09 PM
#37
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

If you set ```php
define('HEADER_SALES_TEXT', '');


BS grid is like tables, if there is nothing there, it's width becomes 0.

add:

```php
define('HEADER_SALES_TEXT',  ' ');
18 Mar 2018, 8:14 PM
#38
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

badarac:

If you set ```php
define('HEADER_SALES_TEXT', '');


Here's the change I made ```php
<?php } else {echo '    <div id="taglineWrapper" class="text-center col-sm-8"><br/>';}
// no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>
<br />     <br/>
<!--eof-branding display-->
18 Mar 2018, 8:18 PM
#39
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

rbarbour:

BS grid is like tables, if there is nothing there, it's width becomes 0.

add:

define('HEADER_SALES_TEXT', '##');


Or I could do that :cool::blink::blush:
21 Mar 2018, 4:12 PM
#40
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: ZCA Bootstrap Template 1.0 (BETA)

I thought I'd document here that I installed Image handler from https://github.com/lat9/zen_Image-Handler along with bootstrap on a 1.5.5f site. I only needed to change one file in includes/modules/your_template/additional_images.php. I added a check to see if it was a bootstrap template and included the correct content. Cindy has opened an issue in github to modify bootstrap with a more elegant solution and accommodate the use of modal display of product images.