Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default [Done v1.3.9a] Products Purchased search issue

    Zen Cart 1.3.8a default install. Products Purchased report, search feature.

    Problem:
    After a search it's not possible to do another search without resetting the form. It's minor but annoying (if you can't get used to it, like me ...).

    Cause:
    The search forms are (opened but) not closed.

    Code:
    // show reset search
        echo zen_draw_form('search', FILENAME_STATS_PRODUCTS_PURCHASED, '', 'get', '', true);
        echo '<br/ >' . HEADING_TITLE_SEARCH_DETAIL_REPORTS_NAME_MODEL . ' ' . zen_draw_input_field('products_filter_name_model') . zen_hide_session_id();
        if (isset($products_filter_name_model) && zen_not_null($products_filter_name_model)) {
          $products_filter_name_model = zen_db_input(zen_db_prepare_input($products_filter_name_model));
          echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER . zen_db_prepare_input($products_filter_name_model);
        }
        if (isset($products_filter_name_model) && zen_not_null($products_filter_name_model)) {
          echo '<br/ >' . '<a href="' . zen_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>&nbsp;&nbsp;';
        } else {
          echo '</form>';
        }
    Fix:
    2x Replace:
    Code:
        } else {
          echo '</form>';
        }
    By:
    Code:
        }
        echo '</form>';
    (2x because the products_id search form has the same problem as the model/name search)

  2. #2
    Join Date
    Oct 2007
    Location
    Kentucky - USA
    Posts
    428
    Plugin Contributions
    0

    Default Re: [Done v1.3.9] Products Purchased search issue

    Paulm, just to clarify your corrections. The file you are talking about can be found at public_html/admin/stats_products_purchased.php

    The first problem code starts at approx line 72 and is as follows:
    Code:
    // show reset search
    
        echo zen_draw_form('search', FILENAME_STATS_PRODUCTS_PURCHASED, '', 'get', '', true);
    
        echo HEADING_TITLE_SEARCH_DETAIL_REPORTS . ' ' . zen_draw_input_field('products_filter') . zen_hide_session_id();
    
        if (isset($products_filter) && zen_not_null($products_filter)) {
    
          $products_filter = zen_db_input(zen_db_prepare_input($products_filter));
    
          echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER . $products_filter;
    
        }
    
        if (isset($products_filter) && zen_not_null($products_filter)) {
    
          echo '<br/ >' . '<a href="' . zen_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>&nbsp;&nbsp;';
    
        } else {
    
          echo '</form>';
    
        }
    One should change code about line 82 shown above in red to the following:
    Code:
    }
        echo '</form>';
    The second and very similar problem code starts at approx line 86 and is as follows:
    Code:
    // show reset search
    
        echo zen_draw_form('search', FILENAME_STATS_PRODUCTS_PURCHASED, '', 'get', '', true);
    
        echo '<br/ >' . HEADING_TITLE_SEARCH_DETAIL_REPORTS_NAME_MODEL . ' ' . zen_draw_input_field('products_filter_name_model') . zen_hide_session_id();
    
        if (isset($products_filter_name_model) && zen_not_null($products_filter_name_model)) {
    
          $products_filter_name_model = zen_db_input(zen_db_prepare_input($products_filter_name_model));
    
          echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER . zen_db_prepare_input($products_filter_name_model);
    
        }
    
        if (isset($products_filter_name_model) && zen_not_null($products_filter_name_model)) {
    
          echo '<br/ >' . '<a href="' . zen_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>&nbsp;&nbsp;';
    
        } else {
    
          echo '</form>';
    
        }
    One should again change code about line 95 shown above in red to the following:
    Code:
    }
        echo '</form>';
    Is my understanding correct?

    Sawhorse

  3. #3
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: [Done v1.3.9] Products Purchased search issue

    Quote Originally Posted by Sawhorse View Post
    Is my understanding correct?
    Yes it is

  4. #4
    Join Date
    Oct 2007
    Location
    Kentucky - USA
    Posts
    428
    Plugin Contributions
    0

    Default Re: [Done v1.3.9] Products Purchased search issue

    Thanks

    Sawhorse

 

 

Similar Threads

  1. Replies: 7
    Last Post: 19 Apr 2010, 06:31 AM
  2. Customers who purchased this, also purchased this, CSS issue
    By stlnyc in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jul 2009, 11:12 PM
  3. Replies: 5
    Last Post: 30 Mar 2009, 05:01 AM
  4. [Done v1.3.8] Also Purchased Products Columns per Row
    By The Spirit in forum Bug Reports
    Replies: 4
    Last Post: 8 Jan 2007, 10:48 PM
  5. Products Purchased Reports Search
    By damonp in forum General Questions
    Replies: 0
    Last Post: 9 Nov 2006, 07:40 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