Page 356 of 356 FirstFirst ... 256306346354355356
Results 3,551 to 3,558 of 3558
  1. #3551
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

    Default Re: SBA Select List (Dropdown) Basic

    [ZC v1.5.8][Bootstrap v3.5.0][SBA v4.0]

    Unfortunately I can not share a link, coz it is yet running on a localhost.
    The versions of modules I use are in the upper part of my message.
    I have checked for mistakes by a validator; the only important mistake i got is SBA_ProductImage id tag being repeated:
    Validator message export for "https://localhost/":
    Generated by CSS HTML Validator Professional 2024/v24.0100 (https://htmlval.com/)

    1. Error in line 754 at character 194: The "id" attribute value "SBA_ProductImage" has already been used in this document in a <img> tag that starts in line 719. An element's "id" value must be unique within the document. An element cannot have an "id" attribute that has already been used. Note that "id" values are treated as being case-sensitive.

    2. Error in line 765 at character 151: The "id" attribute value "SBA_ProductImage" has already been used in this document in a <img> tag that starts in line 719. An element's "id" value must be unique within the document. An element cannot have an "id" attribute that has already been used. Note that "id" values are treated as being case-sensitive.
    I bet, this is the tag being used by the javascript for an image swap, so it sounded important to me.
    This is probably because in includes/templates/bootstrap/templates/tpl_product_info_display.php in the <-- Main Product Image --> section there is a call to includes/templates/bootstrap/templates/tpl_modules_main_product_image.php and then from there to includes/modules/main_product_image.php which has a notifer to 'NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_FILENAME' which is observed by includes/classes/observers/auto.pwas_imageswap.php and hence in the first call to zen_image function ' id="SBA_ProductImage" ' is added to the images HTML output.
    However also in tpl_product_info_display.php in the <-- Additional Product Images --> section there is a call to includes/templates/bootstrap/modalboxes/tpl_bootstrap_images.php which has an include to main_product_image.php and again SBA_ProductImage gets appended twice more to html image output.
    Now, this I have overcome by stoping the observation of 'NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_FILENAME' after the first occurance of 'NOTIFY_OPTIMIZE_IMAGE' (html image output). Does it sound right?
    In includes/classes/observers/auto.pwas_imageswap.php after around line 53 I add the detach statement:
    PHP Code:
        $parameters .= ' id="SBA_ProductImage" ';
        
    $this->detach($this, array('NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_START')); 
    thus no other SBA_ProductImage id tag is added to the images.

    Now, this is not even the tip of the iceberg. There are a lot more changes/modifications needed in the bootstrap template files so that an image swap may succeed. Most important of all, the javascript part which is supposed to do the imageswap is not appended.

    In order to separate the focus, I will discuss/consult in the following posts.

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

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by zamzom View Post
    [ZC v1.5.8][Bootstrap v3.5.0][SBA v4.0]

    Unfortunately I can not share a link, coz it is yet running on a localhost.
    The versions of modules I use are in the upper part of my message.
    I have checked for mistakes by a validator; the only important mistake i got is SBA_ProductImage id tag being repeated:


    I bet, this is the tag being used by the javascript for an image swap, so it sounded important to me.
    This is probably because in includes/templates/bootstrap/templates/tpl_product_info_display.php in the <-- Main Product Image --> section there is a call to includes/templates/bootstrap/templates/tpl_modules_main_product_image.php and then from there to includes/modules/main_product_image.php which has a notifer to 'NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_FILENAME' which is observed by includes/classes/observers/auto.pwas_imageswap.php and hence in the first call to zen_image function ' id="SBA_ProductImage" ' is added to the images HTML output.
    However also in tpl_product_info_display.php in the <-- Additional Product Images --> section there is a call to includes/templates/bootstrap/modalboxes/tpl_bootstrap_images.php which has an include to main_product_image.php and again SBA_ProductImage gets appended twice more to html image output.
    Now, this I have overcome by stoping the observation of 'NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_FILENAME' after the first occurance of 'NOTIFY_OPTIMIZE_IMAGE' (html image output). Does it sound right?
    In includes/classes/observers/auto.pwas_imageswap.php after around line 53 I add the detach statement:
    PHP Code:
        $parameters .= ' id="SBA_ProductImage" ';
        
    $this->detach($this, array('NOTIFY_MODULES_MAIN_PRODUCT_IMAGE_START')); 
    thus no other SBA_ProductImage id tag is added to the images.

    Now, this is not even the tip of the iceberg. There are a lot more changes/modifications needed in the bootstrap template files so that an image swap may succeed. Most important of all, the javascript part which is supposed to do the imageswap is not appended.

    In order to separate the focus, I will discuss/consult in the following posts.
    There's a number of ways to address the situation. Detaching after the first occurrence can be an appropriate solution, though I personally find this designed loop to be troubling where such an observer is effectively reused.

    So what are some other ways to address/handle this? What I am thinking of doing is implementing a class internal counter that accounts for the number of times that a particular notifier is called. In this way, a modicum of control could be maintained about what is and what is not executed within a notifier. By detaching, the observer is ignored completely as compared to being entered but a quantity of action bypassed. Sure maybe an observer should only be tracked by a used/not used condition instead of them going down a "how many times have you been called" counter. Each has its place and need though I may implement one type throughout it all.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3553
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by mc12345678 View Post
    There's a number of ways to address the situation. Detaching after the first occurrence can be an appropriate solution, though I personally find this designed loop to be troubling where such an observer is effectively reused.

    So what are some other ways to address/handle this? What I am thinking of doing is implementing a class internal counter that accounts for the number of times that a particular notifier is called. In this way, a modicum of control could be maintained about what is and what is not executed within a notifier. By detaching, the observer is ignored completely as compared to being entered but a quantity of action bypassed. Sure maybe an observer should only be tracked by a used/not used condition instead of them going down a "how many times have you been called" counter. Each has its place and need though I may implement one type throughout it all.
    Yes, I agree, therefore in fact I have been also along the same path of thinking and I have given up detaching the observer, because there are other images need to be swapped, too. I have not posted about it in here, since things are not completely working yet. But since you mentioned, here is what I have done:

    Changes in auto.pwas_imageswap.php
    1- I have added a new variable to count occurances of SBA_ProductImage (around after line #17)
    PHP Code:
      private $MainImage;
      
      private 
    $image_no;     // Add underscore image no

      
    function __construct() {
        
        
    $image_no =0;     // Reset image no
        
    $attachNotifier = array(); 
    2-I have changed the parameters variable as follows (around line #56)
    PHP Code:
        $parameters .= ' id="SBA_ProductImage_' strval(++$this->image_no) . '" ';   // Modified to add underscore number 
    This creates id tags such as SBA_ProductImage_1, SBA_ProductImage_2 etc. for each occurance.

    But then, since the javascript is looking for SBA_ProductImage id tag to replace the image, I needed to change the
    includes/classes/class.products_with_attributes_class_stock.php as follows (changes are on those lines where SBA_ProductImage occurs)
    PHP Code:
      function zen_draw_pull_down_menu_SBAmod($name$values$default ''$parameters ''$required false$disable = array(), $options_menu_images null) {
        
    //    global $template_dir;
        
    $tmp_attribID trim($name'id[]');//used to get the select ID reference to be used in jquery
        
    $field '';
        if (
    defined('SBA_SHOW_IMAGE_ON_PRODUCT_INFO') && SBA_SHOW_IMAGE_ON_PRODUCT_INFO != '0' && !empty($_GET['products_id']) && $this->zen_product_is_sba($_GET['products_id'])) 
        {
          
    $field /*'<script ' . *//*src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"*//* '></script> */
            
    '<script type="text/javascript">
              $(function(){
              $("#attrib-'
    .$tmp_attribID.'").change(function(){
          if (typeof $(this).find(":selected").attr("data-src") == "undefined") { 
                  $("[id^=\'SBA_ProductImage_\']").attr("src", "'
    // This is the end of the assignment to $field before the below
          
    if (isset($options_menu_images) && is_array($options_menu_images) && (isset($options_menu_images['product_image']) || array_key_exists('product_image'$options_menu_images))) {
            if (
    $options_menu_images['product_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1' 
                 
    or $options_menu_images['product_image'] == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
              
    $field .= DIR_WS_IMAGES PRODUCTS_IMAGE_NO_IMAGE;
            } else {
              
    $field .= $options_menu_images['product_image'];
            }
          } else {
            if (
    PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
             
    $field .= DIR_WS_IMAGES PRODUCTS_IMAGE_NO_IMAGE;
            }
          }
        
          
    $field .= '"); 
                 } else { 
                   $("[id^=\'SBA_ProductImage_\']").attr("src", $(this).find(":selected").attr("data-src"));
                 } 
                 if (typeof $("#productMainImage") != "undefined") {
                   if (typeof $("#productMainImage a[href]") != "undefined") {
                     $("#productMainImage a[href]").attr("href",$("#SBA_ProductImage_1").attr("src"));
                   }
                 }
              });
            });
          </script>'
    ;
        } 
    So, it will replace all images no matter what is after the underscore.
    I am not good in PHP, but particularly bad in javascript, and I found this solution on StackOverflow. Does it look good? It works fine though.

  4. #3554
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

    Default Re: SBA Select List (Dropdown) Basic


  5. #3555
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    how do i fix this warning
    [28-Mar-2024 21:32:23 UTC] Request URI: /Returns, IP address: 44.222.104.49
    #1 products_with_attributes_stock->catalogCustomID() called at [/var/www/clients/client1/web3/web/includes/classes/observers/class.pwas_customid.php:32]
    #2 pwas_customid->updateNotifyHeaderEndAccountHistoryInfo() called at [/var/www/clients/client1/web3/web/includes/classes/class.base.php:103]
    #3 base->notify() called at [/var/www/clients/client1/web3/web/includes/modules/pages/returns_request/header_php.php:74]
    #4 require(/var/www/clients/client1/web3/web/includes/modules/pages/returns_request/header_php.php) called at [/var/www/clients/client1/web3/web/index.php:36]
    --> PHP Warning: Invalid argument supplied for foreach() in /var/www/clients/client1/web3/web/includes/classes/observers/class.products_with_attributes_stock.php on line 1612.
    and here is line 1612 from file
    Code:
    foreach ($productArray as $i => &$productsI) {
          $customid[$i] = '';

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

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by jimmie View Post
    how do i fix this warning
    [28-Mar-2024 21:32:23 UTC] Request URI: /Returns, IP address: 44.222.104.49
    #1 products_with_attributes_stock->catalogCustomID() called at [/var/www/clients/client1/web3/web/includes/classes/observers/class.pwas_customid.php:32]
    #2 pwas_customid->updateNotifyHeaderEndAccountHistoryInfo() called at [/var/www/clients/client1/web3/web/includes/classes/class.base.php:103]
    #3 base->notify() called at [/var/www/clients/client1/web3/web/includes/modules/pages/returns_request/header_php.php:74]
    #4 require(/var/www/clients/client1/web3/web/includes/modules/pages/returns_request/header_php.php) called at [/var/www/clients/client1/web3/web/index.php:36]
    --> PHP Warning: Invalid argument supplied for foreach() in /var/www/clients/client1/web3/web/includes/classes/observers/class.products_with_attributes_stock.php on line 1612.
    and here is line 1612 from file
    Code:
    foreach ($productArray as $i => &$productsI) {
          $customid[$i] = '';
    Could you post the contents of includes/modules/pages/returns_request/header_php.php?

    It appears that the code is "misusing" or not properly initiating the process to fully support reuse of the notifier associated with account history information...

    While, the code may be "the same" as a possibility, perhaps the avenue to arrive there is not equivalent. When looking at the code for includes/modules/pages/account_history_info/header_php.php, there are a number of "early out" operations to ensure that processing continues successfully and as expected for arriving on that page.

    Reviewing the order class initiation (__construct) at least in ZC 1.5.8, the result is at least an array of product even if that is an empty array. Provided the product member is an array, there should be no issue with attempting execution of that foreach loop. It just wouldn't do any action if it was empty. That said, I see in the order class initiation there are also two additional notifiers either of which may have been called and modified the data being returned... That could be an indicator of the situation's cause.

    Based on the warning message, it appears that $order is initiated (not null), otherwise there would be an issue within observer class.pwas_customid.php at line 32 with attempting to access a null variable or accessing a member that does not exist $order->products. These issues do not arise and instead $order->products appears to not be an array, though the warning doesn't identify what type of variable it is (null, false, or something else). There may also be other information in that particular log that points to one or more of the above issues, but I have to assume that the entire log was provided.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #3557
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    here you go, also forgot to mention im using zen version 1.56c
    Code:
    <?php
    
    /**
    
     *
    
     * @package page
    
     * @copyright Copyright 2003-2005 Zen Cart Development Team
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     * @version $Id: J_Schilz for Integrated COWOA - 14 April 2007
    
     */
    
    // This should be first line of the script:
    
    $zco_notifier->notify('NOTIFY_HEADER_START_ACCOUNT_HISTORY_INFO');
    
    
    
        $_SESSION['navigation']->set_snapshot();
    
    
    
      if ($_SESSION['customer_id']) {
    
        zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY, 'action=returns_request', 'SSL'));
    
      }
    
    
    
    if (!isset($_POST['order_id']) || (isset($_POST['order_id']) && !is_numeric($_POST['order_id'])))
    
      $errorInvalidID=TRUE;
    
    
    
    $query_email_address = trim($_POST['query_email_address']);  
    
    if(!isset($query_email_address) || zen_validate_email($query_email_address) == false)
    
      $errorInvalidEmail=TRUE;
    
    
    
    if(!$errorInvalidID && !$errorInvalidEmail)
    
    {
    
    
    
      $customer_info_query = "SELECT customers_email_address, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country,
    
                                     billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country     
    
                              FROM   " . TABLE_ORDERS . "
    
                              WHERE  orders_id = :ordersID";
    
    
    
      $customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
    
      $customer_info = $db->Execute($customer_info_query);
    
    
    
      if (isset($query_email_address) && $customer_info->fields['customers_email_address'] != $query_email_address && $customer_info->fields['customers_email_address'] != $query_email_address . '.')
    
        $errorNoMatch=TRUE;
    
      else
    
      {
    
    
    
        $statuses_query = "SELECT os.orders_status_name, osh.date_added, osh.comments
    
                           FROM   " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh
    
                           WHERE      osh.orders_id = :ordersID
    
                           AND        osh.orders_status_id = os.orders_status_id
    
                           AND        os.language_id = :languagesID
    
                           AND        osh.customer_notified >= 0
    
                           ORDER BY   osh.date_added";
    
    
    
        $statuses_query = $db->bindVars($statuses_query, ':ordersID', $_POST['order_id'], 'integer');
    
        $statuses_query = $db->bindVars($statuses_query, ':languagesID', $_SESSION['languages_id'], 'integer');
    
        $statuses = $db->Execute($statuses_query);
    
    
    
        while (!$statuses->EOF) {
    
    
    
          $statusArray[] = array('date_added'=>$statuses->fields['date_added'],
    
          'orders_status_name'=>$statuses->fields['orders_status_name'],
    
          'comments'=>$statuses->fields['comments']);
    
    
    
          $statuses->MoveNext();
    
        }
    
    
    
        require(DIR_WS_CLASSES . 'order.php');
    
        $order = new order($_POST['order_id']);
    
      }
    
    }
    
    
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    
    $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
    
    
    
    
    
    
    
    // This should be last line of the script:
    
    $zco_notifier->notify('NOTIFY_HEADER_END_ACCOUNT_HISTORY_INFO');
    
    ?>

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

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by jimmie View Post
    here you go, also forgot to mention im using zen version 1.56c
    Code:
    <?php
    
    /**
    
     *
    
     * @package page
    
     * @copyright Copyright 2003-2005 Zen Cart Development Team
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     * @version $Id: J_Schilz for Integrated COWOA - 14 April 2007
    
     */
    
    // This should be first line of the script:
    
    $zco_notifier->notify('NOTIFY_HEADER_START_ACCOUNT_HISTORY_INFO');
    
    
    
        $_SESSION['navigation']->set_snapshot();
    
    
    
      if ($_SESSION['customer_id']) {
    
        zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY, 'action=returns_request', 'SSL'));
    
      }
    
    
    
    if (!isset($_POST['order_id']) || (isset($_POST['order_id']) && !is_numeric($_POST['order_id'])))
    
      $errorInvalidID=TRUE;
    
    
    
    $query_email_address = trim($_POST['query_email_address']);  
    
    if(!isset($query_email_address) || zen_validate_email($query_email_address) == false)
    
      $errorInvalidEmail=TRUE;
    
    
    
    if(!$errorInvalidID && !$errorInvalidEmail)
    
    {
    
    
    
      $customer_info_query = "SELECT customers_email_address, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country,
    
                                     billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country     
    
                              FROM   " . TABLE_ORDERS . "
    
                              WHERE  orders_id = :ordersID";
    
    
    
      $customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
    
      $customer_info = $db->Execute($customer_info_query);
    
    
    
      if (isset($query_email_address) && $customer_info->fields['customers_email_address'] != $query_email_address && $customer_info->fields['customers_email_address'] != $query_email_address . '.')
    
        $errorNoMatch=TRUE;
    
      else
    
      {
    
    
    
        $statuses_query = "SELECT os.orders_status_name, osh.date_added, osh.comments
    
                           FROM   " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh
    
                           WHERE      osh.orders_id = :ordersID
    
                           AND        osh.orders_status_id = os.orders_status_id
    
                           AND        os.language_id = :languagesID
    
                           AND        osh.customer_notified >= 0
    
                           ORDER BY   osh.date_added";
    
    
    
        $statuses_query = $db->bindVars($statuses_query, ':ordersID', $_POST['order_id'], 'integer');
    
        $statuses_query = $db->bindVars($statuses_query, ':languagesID', $_SESSION['languages_id'], 'integer');
    
        $statuses = $db->Execute($statuses_query);
    
    
    
        while (!$statuses->EOF) {
    
    
    
          $statusArray[] = array('date_added'=>$statuses->fields['date_added'],
    
          'orders_status_name'=>$statuses->fields['orders_status_name'],
    
          'comments'=>$statuses->fields['comments']);
    
    
    
          $statuses->MoveNext();
    
        }
    
    
    
        require(DIR_WS_CLASSES . 'order.php');
    
        $order = new order($_POST['order_id']);
    
      }
    
    }
    
    
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    
    $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
    
    
    
    
    
    
    
    // This should be last line of the script:
    
    $zco_notifier->notify('NOTIFY_HEADER_END_ACCOUNT_HISTORY_INFO');
    
    ?>

    Not sure why a portion of the code is/was written the way it was; however, may I suggest trying the below code in place of what is there? Have to test it though also. A major difference is that I added execution/generation of an order, though it will get populated with what is in the shopping cart if some of the entered data is incorrect. I don't know the impact of the $order variable being populated like that, though the notifier(s) being reused like they are is not a great idea, especially because of the condition it creates.

    Code:
    <?php
    
    
    /**
     *
     * @package page
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: J_Schilz for Integrated COWOA - 14 April 2007 edited by mc12345678 2024-03-30
     */
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_ACCOUNT_HISTORY_INFO');
    
    
    $_SESSION['navigation']->set_snapshot();
    
    
    // if logged in then go to account history
    if (!empty($_SESSION['customer_id'])) {
      zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY, 'action=returns_request', 'SSL'));
    }
    
    
    if (!isset($errorInvalidID)) {
      $errorInvalidID = false;
    }
    
    
    if (!isset($errorInvalidEmail)) {
      $errorInvalidEmail = false;
    }
    
    
    if (!isset($_POST['order_id']) || (isset($_POST['order_id']) && !is_numeric($_POST['order_id']))) {
      $errorInvalidID=TRUE; // Really should initiate this; however, it may already have a value.
    }
    
    
    $query_email_address = isset($_POST['query_email_address']) ? trim($_POST['query_email_address']) : null;  
    if(!isset($query_email_address) || zen_validate_email($query_email_address) == false) {
      $errorInvalidEmail=TRUE; // Really should initiate this; however, it may already have a value.
    }
    
    
    require_once(DIR_WS_CLASSES . 'order.php');
    if (!isset($statusArray) || !is_array($statusArray)) {
      $statusArray = array();
    }
    
    
    // No issues identified, continue processing
    if(empty($errorInvalidID) && empty($errorInvalidEmail))
    {
    
    
      $customer_info_query = "SELECT customers_email_address, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country,
                                     billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country    
                              FROM   " . TABLE_ORDERS . "
                              WHERE  orders_id = :ordersID";
    
    
      $customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_POST['order_id'], 'integer');
      $customer_info = $db->Execute($customer_info_query, 1);
    
    
      if (isset($query_email_address) && $customer_info->fields['customers_email_address'] != $query_email_address && $customer_info->fields['customers_email_address'] != $query_email_address . '.') {
        $errorNoMatch=TRUE; // Really should initiate this; however, it may already have a value.
        $order = new order();
      } else
      {
    
    
        $statuses_query = "SELECT os.orders_status_name, osh.date_added, osh.comments
                           FROM   " . TABLE_ORDERS_STATUS . " os
                             INNER JOIN " . TABLE_ORDERS_STATUS_HISTORY . " osh ON (osh.orders_status_id = os.orders_status_id)
                           WHERE      osh.orders_id = :ordersID
                           AND        os.language_id = :languagesID
                           AND        osh.customer_notified >= 0
                           ORDER BY   osh.date_added";
    
    
        $statuses_query = $db->bindVars($statuses_query, ':ordersID', $_POST['order_id'], 'integer');
        $statuses_query = $db->bindVars($statuses_query, ':languagesID', $_SESSION['languages_id'], 'integer');
        $statuses = $db->Execute($statuses_query);
    
    
        while (!$statuses->EOF) {
    
    
          $statusArray[] = array(
          'date_added'=>$statuses->fields['date_added'],
          'orders_status_name'=>$statuses->fields['orders_status_name'],
          'comments'=>$statuses->fields['comments'],
          );
    
    
          $statuses->MoveNext();
        }
    
    
    //    require(DIR_WS_CLASSES . 'order.php');
        $order = new order($_POST['order_id']);
      }
    } else {
      $order = new order();
    }
    
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
    
    
    
    
    
    
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_ACCOUNT_HISTORY_INFO');
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 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