Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    hopefully this helps

    Code:
     <?php
    
          
    
    if (FEC_SPLIT_CHECKOUT == 'true') {
    
        $splitColumns = "split-column";
    
    }
    
    ?>
    
    
    
    <div class="fec-container">
    
      <ul class="checkout-columns">
    
      	<li class="checkout-leftcolumn <?php echo $splitColumns; ?>">
    
      		<!-- BOF SHOPPING CART -->
    
      <?php
    
          
    
          if (FEC_SPLIT_CHECKOUT == 'true') {
    
              $selectionStyle = ($numselection%2 == 0 ? 'split' : '');
    
          }
    
      ?>
    
    
      <div id="checkoutOrderForm" class="fec-block-checkout <?php echo $checkoutStyle; ?>">
    
          <fieldset class="fec-table-items fec-fieldset" id="checkoutShoppingCart">
    
              <legend><?php echo TABLE_HEADING_SHOPPING_CART; ?></legend>
    
              <!-- <span class="fec-fieldset-legend"><?php echo TABLE_HEADING_SHOPPING_CART; ?></span> -->
    
              
    
              <div class="buttonRow forward fec-edit-button" id="editButton"><?php echo '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
    
              
    
              <?php 
    
                  if ($flagAnyOutOfStock) {
    
              ?>
    
                  <?php
    
                      if (STOCK_ALLOW_CHECKOUT == 'true') {
    
                  ?>
    
                          <div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>
    
                  <?php }
    
                      else {
    
                  ?>
    
                          <div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>
    
                  <?php } //endif STOCK_ALLOW_CHECKOUT ?>
    
              <?php  } //endif flagAnyOutOfStock ?>
    
                    
    
              <table id="cartContentsDisplay">
    
    
                  <tr class="cartTableHeading">
    
                      <th scope="col" id="ccQuantityHeading"><?php echo TABLE_HEADING_QUANTITY; ?></th>
    
                      <th scope="col" id="ccProductsHeading" colspan="3"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
    
                      <th scope="col" id="ccTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
    
                  </tr>
    
    
                  <?php // now loop thru all products to display quantity and price ?>
    
                  <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
    
                        <?php $thumbnail = zen_get_products_image($order->products[$i]['id'], 40, 42); ?>
    
                        <tr class="<?php echo $order->products[$i]['rowClass']; ?>">
    
                            
    
                            <td class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
    
                            <td class="cartImage"><?php echo $thumbnail; ?></td>
    
                            <td class="cartProductDisplay" colspan="2"><?php echo $order->products[$i]['name']; ?>
    
                                <?php  echo $stock_check[$i]; ?>
    
                                
    
                                <?php // if there are attributes, loop thru them and display one per line
    
                                    if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
    
                                    echo '<ul class="cartAttribsList">';
    
                                      for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
    
                                ?>
    
                                      <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
    
                                <?php
    
                                      } // end loop
    
                                      echo '</ul>';
    
                                    } // endif attribute-info
    
                                ?>
    
                            </td>
    
                            <td class="cartTotalDisplay">
    
                                <?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
    
                                    if ($order->products[$i]['onetime_charges'] != 0 ) echo '<br /> ' . $currencies->display_price($order->products[$i]['onetime_charges'], $order->products[$i]['tax'], 1);
    
                                ?>
    
                            </td>
    
    
                        </tr>
    
                    <?php  }  // end for loopthru all products 
    
                    ?>   
    
              </table>
    
                    
    
              <?php
    
                  if (MODULE_ORDER_TOTAL_INSTALLED) {
    
                      $order_totals = $order_total_modules->process();
    
              ?>
    
                    <div id="orderTotals"><?php $order_total_modules->output(); ?></div>
    
              <?php } ?>
    
          </fieldset>
    
      </div>
    
      <!-- EOF SHOPPING CART -->
    
    
      <!--BOF SHIPPING-->
    
    
    <?php
    
        if ($order->content_type != 'virtual') {
    
    ?>
    
            <div id="checkoutShippingForm" class="fec-block-checkout align321 <?php echo $checkoutStyle; ?>">
    
    
                <!-- <h1 id="checkoutShippingHeading"><?php echo HEADING_TITLE_SHIPPING; ?></h1> -->
    
                
    
                <fieldset class="fec-shipping-methods fec-fieldset" id="checkoutShippingMethods">
    
                    <legend><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></legend>
    
                    <span class="fec-fieldset-legend"><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></span>
    
                
    
                    <fieldset class="fec-shipping-to fec-shipping-address fec-fieldset" id="checkoutShipTo">
    
                        <legend><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></legend>
    
                        <span class="fec-fieldset-legend-two"><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></span>
    
                
    
                        <?php if ($messageStack->size('checkout_shipping') > 0) echo $messageStack->output('checkout_shipping'); ?>  
    
                        <div class="fec-address-container">
    
                            <div id="checkoutShipto">
    
                                <address class="checkoutAddress"><?php echo html_entity_decode(zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />')); ?></address>
    
                            </div> 
    
                            <?php if ($displayAddressEdit) { ?>
    
                                <?php 
    
                                    echo '<a id="linkCheckoutShippingAddr" class="cssButton normal_button button  button_change_address" href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHANGE_ADDRESS, BUTTON_CHANGE_ADDRESS_ALT) . '</a>';
    
                                ?>
    
                            <?php } ?>
    
                        </div>
    
                    </fieldset>
    
          <?php
    
            //$addresses_count = zen_count_customer_address_book_entries();
    
            //require($template->get_template_dir('tpl_modules_fec_change_checkout_shipping_address.php', DIR_WS_TEMPLATE, $current_page_base,'templates/fec'). '/' . 'tpl_modules_fec_change_checkout_shipping_address.php');
    
          ?>
    
    
      <?php
    
          if (zen_count_shipping_modules() > 0) {
    
      ?>
    
              
    
                    <span class="fec-fieldset-legend-two"><?php echo TABLE_SUBHEADING_SHIPPING_METHOD; ?></span>
    
    
              <?php
    
                  if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
    
              ?>
    
                      <!-- <div id="checkoutShippingContentChoose" class="fec-information"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></div> -->
    
              <?php } 
    
                  elseif ($free_shipping == false) {
    
              ?>
    
                      <!-- <div id="checkoutShippingContentChoose" class="fec-information"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></div> -->
    
    
              <?php
    
                  }
    
              ?>
    
              <?php
    
                  if ($free_shipping == true) {
    
              ?>
    
                      <div id="freeShip" class="fec-information" ><?php echo FREE_SHIPPING_TITLE; ?>&nbsp;<?php echo $quotes[$i]['icon']; ?></div>
    
                      <div id="defaultSelected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>
    
    
              <?php }
    
                  else {
    
                      $radio_buttons = 0;
    
                      for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
    
                  ?>
    
    
                          <div class="fec-shipping-method">
    
                              <span><?php echo $quotes[$i]['module']; ?>&nbsp;<?php if (isset($quotes[$i]['icon']) && zen_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></span>
    
                              <?php
    
                                  if (isset($quotes[$i]['error'])) {
    
                              ?>  
    
                                      <div><?php echo $quotes[$i]['error']; ?></div>
    
                              <?php }
    
                                  else {
    
                                      for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    
                                      // set the radio button to be checked if it is the method chosen
    
                                          $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
    
    
                                          if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
    
                                              //echo '      <div id="defaultSelected" class="moduleRowSelected">' . "\n";
    
                                          //} else {
    
                                              //echo '      <div class="moduleRow">' . "\n";
    
                                          }
    
                                  ?>
    
                              <?php
    
                  if ( ($n > 1) || ($n2 > 1) ) {
    
    
      ?>
    
                      <div class="important fec-shipping-value"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></div>
    
      <?php
    
                  } else {
    
      ?>
    
                      <div class="important fec-shipping-value"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . zen_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></div>
    
      <?php
    
                  }
    
      ?>
    
                
    
                  <div class="fec-box-check-radio">
    
                      <?php echo zen_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'onclick="updateForm();" id="ship-'.$quotes[$i]['id'] . '-' . $quotes[$i]['methods'][$j]['id'].'"'); ?>
    
                      <label for="ship-<?php echo $quotes[$i]['id'] . '-' . $quotes[$i]['methods'][$j]['id']; ?>" class="checkboxLabel" ><?php echo $quotes[$i]['methods'][$j]['title']; ?></label>
    
                  </div>
    
      <!--</div>-->
    
      <?php
    
                  $radio_buttons++;
    
                }
    
                //bof tell a friend
    
                if($quotes[$i]["id"] == "tellafriend") {
    
                  echo MODULE_SHIPPING_TELL_A_FRIEND_TEXT_CUSTOMER;
    
                  echo $tell_a_friend_email_error != "" ? "<div class='messageStackWarning'>$tell_a_friend_email_error</div>" : "";
    
      ?>
    
                  <div class="tellAFriendContent" style="width:50%;"><strong>Email</strong></div>
    
                  <div class="tellAFriendContent" style="width:25%;"><strong>First Name</strong></div>
    
                  <div class="tellAFriendContent" style="width:25%;"><strong>Last Name</strong></div>
    
      <?php          
    
            for ($j = 0; $j < $quotes[$i]['email_no']; $j++) {
    
      ?>
    
                <div class="tellAFriendContent" style="width:50%;"><?php echo zen_draw_input_field('tell_a_friend_email[]', $_SESSION["tell_a_friend_email"][$j], 'size="28"'); ?></div>
    
                <div class="tellAFriendContent" style="width:25%;"><?php echo zen_draw_input_field('tell_a_friend_email_f_name[]', $_SESSION["tell_a_friend_email_f_name"][$j], 'size="15"'); ?></div>
    
                <div class="tellAFriendContent" style="width:25%;"><?php echo zen_draw_input_field('tell_a_friend_email_l_name[]', $_SESSION["tell_a_friend_email_l_name"][$j], 'size="15"'); ?></div>
    
    
      <?php
    
            }
    
      // BOF Captcha
    
      if(is_object($captcha)) {
    
      ?>
    
      <?php echo $captcha->img(); ?>
    
      <?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
    
      <br class="clearBoth" />
    
      <label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
    
      <?php echo $captcha->input_field('captcha', 'id="captcha"') . '&nbsp;<span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
    
      <br class="clearBoth" />
    
      <?php
    
      }
    
      // EOF Captcha          
    
                }
    
      //eof tell a friend
    
              }
    
      ?>
    
    
      </div>
      
      
    
      <?php
    
            }
    
          }
    
      ?>
    
    
      <?php
    
        } else {
    
      ?>
    
        <h2 id="checkoutShippingHeadingMethod"><?php echo TITLE_NO_SHIPPING_AVAILABLE; ?></h2>
    
        <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_NO_SHIPPING_AVAILABLE; ?></div>
    
      <?php
    
        }
    
      ?>
    
      </fieldset>
    
      </div>
    
      <?php
    
        }
    
      ?>
    
      <!--EOF SHIPPING-->
    Last edited by chadlly2003; 5 Jul 2020 at 06:58 AM.

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Is that log always issued, or is it dependent on the elements in the cart or shipping-method chosen?

    For instance, a 'virtual' order has no delivery address and, starting with the zc156 base, neither does an order being shipped via the storepickup method.

  3. #13
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    I got a little lost here. If i understand your question correctly....

    1. The error is always issued once i get to the checkout page.

    2. The Shipping selects the cheapest method automatically prior to the page loading.
    (shipping module is ups_v2020_07_01)

  4. #14
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    anyone have any ideas on how to solve my initial issue.

  5. #15
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Quote Originally Posted by chadlly2003 View Post
    anyone have any ideas on how to solve my initial issue.
    Did you contact Numinix? As it is their plugin, it will probably be very easy for them to solve it permanently for everybody.

  6. #16
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Don't know what it will fix/break, but at least execution shouldn't stop on the line if the following is added just before the for loop and just after the else line:
    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    Again, I don't really know what that will do to further operation/display of information, but it won't throw the same issue at that line. As suggested above/before, identifying what product and/or checkout is being performed helps to properly correct the issue/suggest at least one other path forwards.

    Also, just because the report for that line may be corrected, there may be an issue further downstream that causes the catalog side to respond the same, but generate a different set of debug contents...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Shoot... I forgot to add/suggest a closing parentheses:

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #18
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    where do i put that piece of code.

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }

  9. #19
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Quote Originally Posted by chadlly2003 View Post
    where do i put that piece of code.

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    From I think post 2 line 313 is the below for line the new code goes just before it:
    Code:
    else {
    for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    Like so:
    Code:
    else {
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #20
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,691
    Plugin Contributions
    9

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Quote Originally Posted by chadlly2003 View Post
    where do i put that piece of code.

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    you would put it after your else statement and before the statement that begins with the for. which i think is line 313.

    i resolved it by doing this:

    PHP Code:
                                  <?php } else {
                                          if (
    is_array($quotes[$i]['methods'])) {
                                              for (
    $j 0$n2 sizeof($quotes[$i]['methods']); $j $n2$j++) {
    // more code

    }
    you have to find the end bracket `}` for the for loop and the then close the if statement that you added.

    this has worked for me with a couple of clients; but our versions of FEC seem different/modified as my line numbers come no where close to yours.

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 24 Dec 2019, 08:16 AM
  2. Replies: 11
    Last Post: 21 Dec 2018, 09:06 PM
  3. Replies: 7
    Last Post: 16 Dec 2018, 04:00 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR