Re: ZCA Bootstrap Template
Quote:
Originally Posted by
mcqueeneycoins
Got it, sorry if I confused anyone. Not sure if it is related or not, but it doesn't look like the State/Province drop down menus auto-update when a new country is selected in the estimator. Is it supposed to?
There are apparently multiple issues when the Shipping Estimator is displayed as a "Button" on the shopping-cart page; for the time being, changing Configuration :: Shipping/Packaging :: Shipping Estimator Display Settings for Shopping Cart to '2' (Display as Listing on Shopping Cart Page) will work-around the issue.
Re: ZCA Bootstrap Template
@lat9, possibly another bug found on the checkout_success page? "My Orders" button showing in the log off card box, the "My Account" box has a customer service text/button, and Customer Service box duplicates My Account content. See red below:
Code:
<!--bof log off card-->
<div id="logOff-card" class="card">
<div id="logOff-card-body" class="card-body">
<?php
if (isset($_SESSION['customer_guest_id'])) {
echo TEXT_CHECKOUT_LOGOFF_GUEST;
} elseif (isset($_SESSION['customer_id'])) {
echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
}
?>
<div id="logOff-btn-toolbar" class="btn-toolbar justify-content-between mt-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'), BUTTON_MY_ORDERS_TEXT, 'button_my_orders', 'id="linkMyAccount"'); ?>
<?php echo zca_button_link(zen_href_link(FILENAME_LOGOFF, '', 'SSL'), BUTTON_LOG_OFF_ALT, 'button_logoff', 'id="linkLogoff"'); ?>
</div>
</div>
</div>
<!--eof log off card-->
<!--bof my account card-->
<div id="myAccount-card" class="card">
<div id="myAccount-card-body" class="card-body">
<?php echo TEXT_CONTACT_STORE_OWNER;?>
<div id="cust-btn-toolbar" class="btn-toolbar justify-content-center mt-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'), BUTTON_CONTACT_US_TEXT, 'button_contact_us'); ?>
</div>
</div>
</div>
<!--eof my account card-->
</div>
<!--eof card deck-->
<!--bof customer service card-->
<div id="customerService-card" class="card mb-3">
<div id="customerService-card-body" class="card-body p-3">
<?php echo TEXT_CONTACT_STORE_OWNER;?>
</div>
</div>
<!--eof customer service card-->
Should the My Account card box be calling for the TEXT_SEE_ORDERS language?
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
mcqueeneycoins
@lat9, possibly another bug found on the checkout_success page? "My Orders" button showing in the log off card box, the "My Account" box has a customer service text/button, and Customer Service box duplicates My Account content. See red below:
Code:
<!--bof log off card-->
<div id="logOff-card" class="card">
<div id="logOff-card-body" class="card-body">
<?php
if (isset($_SESSION['customer_guest_id'])) {
echo TEXT_CHECKOUT_LOGOFF_GUEST;
} elseif (isset($_SESSION['customer_id'])) {
echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
}
?>
<div id="logOff-btn-toolbar" class="btn-toolbar justify-content-between mt-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'), BUTTON_MY_ORDERS_TEXT, 'button_my_orders', 'id="linkMyAccount"'); ?>
<?php echo zca_button_link(zen_href_link(FILENAME_LOGOFF, '', 'SSL'), BUTTON_LOG_OFF_ALT, 'button_logoff', 'id="linkLogoff"'); ?>
</div>
</div>
</div>
<!--eof log off card-->
<!--bof my account card-->
<div id="myAccount-card" class="card">
<div id="myAccount-card-body" class="card-body">
<?php echo TEXT_CONTACT_STORE_OWNER;?>
<div id="cust-btn-toolbar" class="btn-toolbar justify-content-center mt-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'), BUTTON_CONTACT_US_TEXT, 'button_contact_us'); ?>
</div>
</div>
</div>
<!--eof my account card-->
</div>
<!--eof card deck-->
<!--bof customer service card-->
<div id="customerService-card" class="card mb-3">
<div id="customerService-card-body" class="card-body p-3">
<?php echo TEXT_CONTACT_STORE_OWNER;?>
</div>
</div>
<!--eof customer service card-->
Should the My Account card box be calling for the TEXT_SEE_ORDERS language?
Yep, I saw that when I updated my site to use the template (the duplication). I'll be removing the following section from /bootstrap/templates/tpl_checkout_success_default.php for the next release:
Code:
<!--bof customer service card-->
<div id="customerService-card" class="card mb-3">
<div id="customerService-card-body" class="card-body p-3">
<?php echo TEXT_CONTACT_STORE_OWNER;?>
</div>
</div>
<!--eof customer service card-->
Re: ZCA Bootstrap Template
@lat9, sorry to be a pain, but have a new issue I could use some help with--I'm assuming it's something I did, but maybe you can identify the root cause. On shopping cart page, I combined the update button and delete buttons to be within the same div/column. Pretty much a straight cut and paste of the code which I initiated because the update icon was disappearing completely on smaller screens with the original bootstrap code (I think). However, the issue is the "update" icon actually deletes the item. More specifically, if there is one item in the cart, it deletes that item. If there are multiple items in the cart, it deletes all but the first item and changes the quantity for the wrong item (e.g. change quantity on item #3 to 5, code deletes item #2 and #3 and changes quantity of item #1 to 5).
Code:
<tr>
<td class="qtyCell text-center pb-1">
<?php
if ($product['flagShowFixedQuantity']) {
echo $product['showFixedQuantityAmount'] . ' ' . $product['flagStockCheck'] . ' ' . $product['showMinUnits'];
} else {
echo $product['quantityField'] . ' ' . $product['flagStockCheck'] . ' ' . $product['showMinUnits'];
}
?>
<div class="d-sm-none mt-2">
<?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?>
<?php
if ($product['buttonDelete']) {
?>
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>" class="btn btn-sm" aria-label="<?php echo ICON_TRASH_ALT; ?>" title="<?php echo ICON_TRASH_ALT; ?>"><i aria-hidden="true" class="fas fa-sm fa-trash-alt"></i></a>
<?php
}
if ($product['checkBoxDelete'] ) {
$checkbox_field = zen_draw_checkbox_field('cart_delete[]', $product['id'], false, 'id="del-r-' . $product['id'] . '"');
$checkbox_field = str_replace('custom-control-input', 'form-check-input', $checkbox_field);
?>
<div class="form-check mt-1">
<?php echo $checkbox_field; ?>
<label class="form-check-label sr-only" for="del-r-<?php echo $product['id']; ?>"><?php echo ARIA_DELETE_ITEM_FROM_CART; ?></label>
</div>
<?php
}
?>
</div>
</td>
<td class="qtyUpdateCell text-center align-middle d-none d-sm-table-cell"><?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?>
<?php
if ($product['buttonDelete']) {
?>
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>" class="btn btn-sm" aria-label="<?php echo ICON_TRASH_ALT; ?>" title="<?php echo ICON_TRASH_ALT; ?>"><i aria-hidden="true" class="fas fa-sm fa-trash-alt"></i></a>
<?php
}
if ($product['checkBoxDelete'] ) {
$checkbox_field = zen_draw_checkbox_field('cart_delete[]', $product['id'], false, 'id="del-' . $product['id'] . '"');
$checkbox_field = str_replace('custom-control-input', 'form-check-input', $checkbox_field);
?>
<div class="form-check mt-1">
<?php echo $checkbox_field; ?>
<label class="form-check-label sr-only" for="del-<?php echo $product['id']; ?>"><?php echo ARIA_DELETE_ITEM_FROM_CART; ?></label>
</div>
<?php
}
?>
</td>
<td class="productsCell">
<a href="<?php echo $product['linkProductsName']; ?>">
<span class="d-none d-sm-block float-left mr-3"><?php echo $product['productsImage']; ?></span>
<?php echo $product['productsName'] . ' ' . $product['flagStockCheck']; ?>
</a>
<?php
echo $product['attributeHiddenField'];
if (isset($product['attributes']) && is_array($product['attributes'])) {
?>
<div class="productsCell-attributes">
<ul>
<?php
foreach ($product['attributes'] as $option => $value) {
?>
<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
<?php
}
?>
</ul>
</div>
<?php
}
?>
</td>
<td class="priceCell text-right"><?php echo $product['productsPriceEach']; ?></td>
<td class="totalsCell text-right"><?php echo $product['productsPrice']; ?></td>
<!--changed price text to right align, hiding column, combined with update <td class="removeCell text-center d-none d-sm-table-cell">
</td> -->
</tr>
Re: ZCA Bootstrap Template
Disregard my last post--I managed to fix it. Just reinstalled the original code and redid my modifications. Must have been missing a closing tag or something somewhere.
Re: ZCA Bootstrap Template
Working on local XAMPP.
zencart-1.5.8a on PHP v8.1
Bootstrap 3.6.3
OPC 2.4.6 (2023-08-19)
These warnings received editing / creating customer account:
Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.
Customer creating account:
--> PHP Warning: Undefined variable $fax in ...\zc158a_2\includes\modules\pages\create_account\header_php_create_account_reg ister.php on line 474.
Any suggestions?
TIA,
jpda
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
jpda
Working on local XAMPP.
zencart-1.5.8a on PHP v8.1
Bootstrap 3.6.3
OPC 2.4.6 (2023-08-19)
These warnings received editing / creating customer account:
Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.
Customer creating account:
--> PHP Warning: Undefined variable $fax in ...\zc158a_2\includes\modules\pages\create_account\header_php_create_account_reg ister.php on line 474.
Any suggestions?
TIA,
jpda
Neither are associated with the template. I'd need to check on the admin issue (most likely base Zen Cart). For the customer creating account, that's a known OPC issue, staged for correct in the next release (v2.5.0): https://github.com/lat9/one_page_checkout/issues/386
Re: ZCA Bootstrap Template
@lat9
Thanks for replying so fast!:smile:
Where should I have posted the first issue?
Quote:
Editing customer: (ACCOUNT_FAX_NUMBER is set to false)
--> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in ...\zc158a_2\admin\customers.php on line 774.
jpda
Re: ZCA Bootstrap Template
Quote:
Originally Posted by
jpda
@lat9
Thanks for replying so fast!:smile:
Where should I have posted the first issue?
jpda
Not sure, but lines 772 through 780 of customers.php have changed since zc158a:
Code:
echo zen_draw_input_field(
'entry_suburb',
htmlspecialchars($cInfo->suburb, ENT_COMPAT, CHARSET, true),
zen_set_field_length(
TABLE_ADDRESS_BOOK,
'entry_suburb',
50
) . ' class="form-control" id="entry_suburb"'
); ?>
to lines 782 through 790 in zc200-beta1:
Code:
echo zen_draw_input_field(
'entry_suburb',
htmlspecialchars((string)$cInfo->suburb, ENT_COMPAT, CHARSET, true),
zen_set_field_length(
TABLE_ADDRESS_BOOK,
'entry_suburb',
50
) . ' class="form-control" id="entry_suburb"'
); ?>
Re: ZCA Bootstrap Template
@lat9
Thanks again! Added the (string) and that solved the problem! :thumbsup:
jpda