Results 1 to 10 of 1685

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default 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>
    Last edited by mcqueeneycoins; 19 Feb 2024 at 05:46 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default 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.

  3. #3
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by jpda View Post
    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

  5. #5
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap Template

    @lat9

    Thanks for replying so fast!
    Where should I have posted the first issue?
    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

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by jpda View Post
    @lat9

    Thanks for replying so fast!
    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"'
                        ); ?>

  7. #7
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap Template

    @lat9

    Thanks again! Added the (string) and that solved the problem!

    jpda

 

 

Similar Threads

  1. v155 Clone a Template [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 107
    Last Post: 11 Nov 2024, 08:28 PM
  2. v150 aBagon Template Support Thread
    By VJef in forum Addon Templates
    Replies: 54
    Last Post: 5 Sep 2020, 08:44 PM
  3. v155 ZCA Bootstrap Template 1.0 (BETA)
    By rbarbour in forum Addon Templates
    Replies: 74
    Last Post: 25 Apr 2018, 07:05 PM
  4. TB Sempre Template Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 48
    Last Post: 19 Mar 2015, 06:33 PM
  5. Wallet Template - Support Thread
    By zami in forum Addon Templates
    Replies: 45
    Last Post: 25 Mar 2010, 10:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg