Re: ZCA Bootstrap Template
Crud, something in the base shopping-cart rendering of that update image changed between zc157 and zc158. The bootstrap template tries to change that image to an FA icon, but somethings' gone amiss.
GitHub tracking issue: https://github.com/lat9/ZCA-Bootstra...ate/issues/192
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
lat9
Crud, something in the base shopping-cart rendering of that update image changed between zc157 and zc158. The bootstrap template tries to change that image to an FA icon, but somethings' gone amiss.
GitHub tracking issue:
https://github.com/lat9/ZCA-Bootstra...ate/issues/192
While you're waiting for v3.5.1 of the template to be released, you can edit /includes/modules/pages/shopping_cart/header_php_shopping_cart_zca_bootstrap.php, changing this section
Code:
for ($i = 0, $n = count($productArray); $i < $n; $i++) {
$productArray[$i]['buttonUpdate'] = preg_replace(
'/(<input type="image".*?\?>)(.*)/', '<button type="submit" class="btn" aria-label="' . ICON_UPDATE_ALT . '" title="' . ICON_UPDATE_ALT . '"><i aria-hidden="true" class="fas fa-sync-alt"></i></button>$2',
$productArray[$i]['buttonUpdate']
);
}
to read
Code:
for ($i = 0, $n = count($productArray); $i < $n; $i++) {
$productArray[$i]['buttonUpdate'] = preg_replace(
'/(<input type="image".*?\/?>)(.*)/', '<button type="submit" class="btn" aria-label="' . ICON_UPDATE_ALT . '" title="' . ICON_UPDATE_ALT . '"><i aria-hidden="true" class="fas fa-sync-alt"></i></button>$2',
$productArray[$i]['buttonUpdate']
);
}
The underlying issue is that zc158 now renders that input without the /> at the end, just a >.
Re: ZCA Bootstrap Template
Thanks Lat9 your solution has restored my sanity, it works a charm. :D
I spent yesterday concentrating on includes/templates/MY_Template/templates/tpl_shopping_cart_default.php, wrongly thinking it must have been the problem.
:cheers:
Re: ZCA Bootstrap Template
Hi,
I have found just one more thing, the sold out gif image appears on the products listing and product info pages instead of css.
This only occurs on On zc158 and Bootstrap 4 and didn't occur on zc157d.
To over come this I have modified the following file includes/functions/functions_general.php. and reverted the code to a previous level as below.
I changed this code.
Code:
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
global $template;
$image = BUTTON_IMAGE_SOLD_OUT;
$alt = BUTTON_SOLD_OUT_ALT;
$return_button = '<span class="text-center">' . zen_image($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image, $alt, '', '', '') . '</span>';
$zco_notifier->notify('NOTIFY_ZEN_SOLD_OUT_IMAGE', array_merge($button_check->fields, ['products_id' => (int)$product_id]), $return_button);
break;
With code from previous version.
Code:
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
if ($_GET['main_page'] == zen_get_info_page($product_id)) {
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
} else {
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
}
break;
Don't know weather this is any good, but it works.
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
Valencia
Hi,
I have found just one more thing, the sold out gif image appears on the products listing and product info pages instead of css.
This only occurs on On zc158 and Bootstrap 4 and didn't occur on zc157d.
To over come this I have modified the following file includes/functions/functions_general.php. and reverted the code to a previous level as below.
I changed this code.
Code:
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
global $template;
$image = BUTTON_IMAGE_SOLD_OUT;
$alt = BUTTON_SOLD_OUT_ALT;
$return_button = '<span class="text-center">' . zen_image($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image, $alt, '', '', '') . '</span>';
$zco_notifier->notify('NOTIFY_ZEN_SOLD_OUT_IMAGE', array_merge($button_check->fields, ['products_id' => (int)$product_id]), $return_button);
break;
With code from previous version.
Code:
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
if ($_GET['main_page'] == zen_get_info_page($product_id)) {
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
} else {
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
}
break;
Don't know weather this is any good, but it works.
I'll be updating the template to recognize that new notification for zc158+ and "do the right thing".
See this GitHub issue for tracking: https://github.com/lat9/ZCA-Bootstra...ate/issues/196
Re: ZCA Bootstrap Template
Zencart version 1.58 (Fresh Install)
Template: Bootstrap (cloned)
PHP: 7.4
I think I fixed my issue with paypal pro by grabbing some code on github for paypaldp. However, I still have issues with not being able to pay using a credit card. When I click the CONTINUE button nothing happens.template thinking maybe it may be something with bootstrap. I still get the same issue.
The logs give this message. I have searched on and off this forum and can't find what the problem is.
[24-Jan-2023 01:56:02 America/New_York] Request URI: /xxxxx/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: xxx.xxx.xxx.xxx
#1 require_once() called at [/home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php:158]
#2 zcAjaxPayment->prepareConfirmation() called at [/home/xxxxx/public_html/xxxxx/ajax.php:85]
--> PHP Warning: require_once(/home/xxxxx/public_html/xxxxx/includes/languages/english.php): failed to open stream: No such file or directory in /home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php on line 158.
[24-Jan-2023 01:56:02 America/New_York] PHP Fatal error: require_once(): Failed opening required '/home/xxxxx/public_html/xxxxx/includes/languages/english.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php on line 158
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
printchic
Zencart version 1.58 (Fresh Install)
Template: Bootstrap (cloned)
PHP: 7.4
I think I fixed my issue with paypal pro by grabbing some code on github for paypaldp. However, I still have issues with not being able to pay using a credit card. When I click the CONTINUE button nothing happens.template thinking maybe it may be something with bootstrap. I still get the same issue.
The logs give this message. I have searched on and off this forum and can't find what the problem is.
[24-Jan-2023 01:56:02 America/New_York] Request URI: /xxxxx/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: xxx.xxx.xxx.xxx
#1 require_once() called at [/home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php:158]
#2 zcAjaxPayment->prepareConfirmation() called at [/home/xxxxx/public_html/xxxxx/ajax.php:85]
--> PHP Warning: require_once(/home/xxxxx/public_html/xxxxx/includes/languages/english.php): failed to open stream: No such file or directory in /home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php on line 158.
[24-Jan-2023 01:56:02 America/New_York] PHP Fatal error: require_once(): Failed opening required '/home/xxxxx/public_html/xxxxx/includes/languages/english.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php on line 158
That's a known issue with zc158, which will be corrected on the next release. See this GitHub 'commit' for the change-related details: https://github.com/zencart/zencart/c...a7a5d3d97f9e56
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
lat9
I have already applied this fix but it still got the following message;
"PHP Warning: require_once(/home/xxxxx/public_html/xxxxx/includes/languages/english.php): failed to open stream: No such file or directory in /home/xxxxx/public_html/xxxxx/includes/classes/ajax/zcAjaxPayment.php on line 158."
When I go to that directory "english.php" doesn't exist. Instead it's now called "lang.english.php" however the code is looking for "english.php".
FIX:
I added 'lang.' to the code and it works. I can now click the CONTINUE button when paying by credit card and it takes me to the next page to verify my order details".
The code now looks like this:
PHP Code:
require_once(zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES, 'lang.' . $_SESSION['language'].'.php', 'false'));
Re: ZCA Bootstrap Template
Is there a way to get a sidebox to show in mobile view?
When using a sidebox for banners for announcements (away/shipping delays etc) it's all fine in desktop view but missing in mobile view.
If not possible is there a way for a wide-banner at the top of the page to not be hidden by the navigation bar? It displays under the footer fine in both desktop and mobile view but is hidden at the top.
Thanks.
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
gsh68
Is there a way to get a sidebox to show in mobile view?
When using a sidebox for banners for announcements (away/shipping delays etc) it's all fine in desktop view but missing in mobile view.
If not possible is there a way for a wide-banner at the top of the page to not be hidden by the navigation bar? It displays under the footer fine in both desktop and mobile view but is hidden at the top.
Thanks.
Appreciate the report; that wide-banner at the top of each page has been obfuscated by the navigation bar forever!
GitHub tracking issue: https://github.com/lat9/ZCA-Bootstra...ate/issues/200