
Originally Posted by
siliconbug
I finally figured out the issue of the price display box after upgrading to ZCA Bootstrap Template v3.7.x.
My site is running ZC v1.5.8a w/ PHP v7.4
After switching to PHP v8.1, the price display box shows up with ZCA Bootstrap Template v3.7.x correctly.
It looks like some functions in ZCA Bootstrap Template v3.7.x don't work well with PHP v7.4
Maybe a note can be added to remind people who still use PHP v7.4?
Nice sleuthing! With that information, I am able to recreate the issue under PHP 7.4.
The root-cause is the additional check on lines 192
Code:
if ($display_price_top === true && zen_get_products_display_price((int)$_GET['products_id']) > 0) {
and line 241
Code:
if ($display_price_bottom === true && zen_get_products_display_price((int)$_GET['products_id']) > 0) {
The zen_get_products_display_price function returns a string similar to
Code:
<span class="mx-auto w-100 p-1 productBasePrice">$35.99</span>
which fails the > 0 test on PHP 7.4 but passes on PHP 8.0+. Go figure. I'll get that worthless clause removed from v3.7.2 of the template.
See this GitHub issue for resolution: https://github.com/lat9/ZCA-Bootstra...ate/issues/414