osCmax v2.5 User Manual
Results 1 to 6 of 6

Help on search

This is a discussion on Help on search within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; I need help when you type something on search it shows all my products out of stock... what can I ...

      
  1. #1
    New Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0


    Default Help on search

    I need help when you type something on search it shows all my products out of stock... what can I do to fix this

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Help on search

    You can turn off stock tracking, enable display out of stock products, or add stock quantities to the products.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0


    Default Re: Help on search

    Hi Micheal

    this is not the issue because even if I do this still the same
    what happen is I added the out of stock code but when tested on search
    it shows all the products out of stock instead of when you click on product it shows out of stock and what is available when I replace the original php product_listing.com now it shows everything is as available by showing buy now button but when you click the out of stock product it shows out of stock.

    but when I place the script php which I edit when you select products everything looks normal until you do a search than it shows everything out of stock here is the script which you can take a look at. Than maybe you know what is the issue

    PHP Code:
    <?php
    /*
      $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com

      Copyright (c) 2003 osCommerce

      Released under the GNU General Public License
    */

      
    $listing_split = new splitPageResults($listing_sqlMAX_DISPLAY_SEARCH_RESULTS'p.products_id');

      if ( (
    $listing_split->number_of_rows 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
        <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE ' ' $listing_split->display_links(MAX_DISPLAY_PAGE_LINKStep_get_all_get_params(array('page''info''x''y'))); ?></td>
      </tr>
    </table>
    <?php
      
    }

      
    $list_box_contents = array();

      for (
    $col=0$n=sizeof($column_list); $col<$n$col++) {
        switch (
    $column_list[$col]) {
          case 
    'PRODUCT_LIST_MODEL':
            
    $lc_text TABLE_HEADING_MODEL;
            
    $lc_align '';
            break;
          case 
    'PRODUCT_LIST_NAME':
            
    $lc_text TABLE_HEADING_PRODUCTS;
            
    $lc_align '';
            break;
          case 
    'PRODUCT_LIST_MANUFACTURER':
            
    $lc_text TABLE_HEADING_MANUFACTURER;
            
    $lc_align '';
            break;
          case 
    'PRODUCT_LIST_PRICE':
            
    $lc_text TABLE_HEADING_PRICE;
            
    $lc_align 'right';
            break;
           
    // Mod for Not Showing Quantity with No Stock No CheckOut
          //$lc_text = TABLE_HEADING_QUANTITY;
            
    $lc_text '';
            
    $lc_align 'right';
            break;
          case 
    'PRODUCT_LIST_WEIGHT':
            
    $lc_text TABLE_HEADING_WEIGHT;
            
    $lc_align 'right';
            break;
          case 
    'PRODUCT_LIST_IMAGE':
            
    $lc_text TABLE_HEADING_IMAGE;
            
    $lc_align 'center';
            break;
          case 
    'PRODUCT_LIST_BUY_NOW':
            
    $lc_text TABLE_HEADING_BUY_NOW;
            
    $lc_align 'center';
            break;
        }

        if ( (
    $column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
          
    $lc_text tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1$lc_text);
        }

        
    $list_box_contents[0][] = array('align' => $lc_align,
                                        
    'params' => 'class="productListing-heading"',
                                        
    'text' => '&nbsp;' $lc_text '&nbsp;');
      }

      if (
    $listing_split->number_of_rows 0) {
        
    $rows 0;
        
    $listing_query tep_db_query($listing_split->sql_query);
        while (
    $listing tep_db_fetch_array($listing_query)) {
          
    $rows++;

          if ((
    $rows/2) == floor($rows/2)) {
            
    $list_box_contents[] = array('params' => 'class="productListing-even"');
          } else {
            
    $list_box_contents[] = array('params' => 'class="productListing-odd"');
          }

          
    $cur_row sizeof($list_box_contents) - 1;

          for (
    $col=0$n=sizeof($column_list); $col<$n$col++) {
            
    $lc_align '';

            switch (
    $column_list[$col]) {
              case 
    'PRODUCT_LIST_MODEL':
                
    $lc_align '';
                
    $lc_text '&nbsp;' $listing['products_model'] . '&nbsp;';
                break;
              case 
    'PRODUCT_LIST_NAME':
                
    $lc_align '';
                if (isset(
    $HTTP_GET_VARS['manufacturers_id'])) {
                  
    $lc_text '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'manufacturers_id=' $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' $listing['products_id']) . '">' $listing['products_name'] . '</a>';
                } else {
                  
    $lc_text '&nbsp;<a href="' tep_href_link(FILENAME_PRODUCT_INFO, ($cPath 'cPath=' $cPath '&' '') . 'products_id=' $listing['products_id']) . '">' $listing['products_name'] . '</a>&nbsp;';
                }
                break;
              case 
    'PRODUCT_LIST_MANUFACTURER':
                
    $lc_align '';
                
    $lc_text '&nbsp;<a href="' tep_href_link(FILENAME_DEFAULT'manufacturers_id=' $listing['manufacturers_id']) . '">' $listing['manufacturers_name'] . '</a>&nbsp;';
                break;
              case 
    'PRODUCT_LIST_PRICE':
                
    $lc_align 'right';
                if (
    tep_not_null($listing['specials_new_products_price'])) {
                  
    $lc_text '&nbsp;<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>&nbsp;';
                } else {
                  
    $lc_text '&nbsp;' $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '&nbsp;';
                }
                break;
              case 
    'PRODUCT_LIST_QUANTITY':
               
    $lc_align 'right';
            
    // Mod for Not Showing Quantity with No Stock No CheckOut
           //  $lc_text = '&nbsp;' . $listing['products_quantity'] . '&nbsp;';
               
    $lc_text '&nbsp;&nbsp;';
               break;
              case 
    'PRODUCT_LIST_WEIGHT':
                
    $lc_align 'right';
                
    $lc_text '&nbsp;' $listing['products_weight'] . '&nbsp;';
                break;
              case 
    'PRODUCT_LIST_IMAGE':
                
    $lc_align 'center';
                if (isset(
    $HTTP_GET_VARS['manufacturers_id'])) {
                  
    $lc_text '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'manufacturers_id=' $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' $listing['products_id']) . '">' tep_image(DIR_WS_IMAGES $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a>';
                } else {
                  
    $lc_text '&nbsp;<a href="' tep_href_link(FILENAME_PRODUCT_INFO, ($cPath 'cPath=' $cPath '&' '') . 'products_id=' $listing['products_id']) . '">' tep_image(DIR_WS_IMAGES $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a>&nbsp;';
                }
                break;
              case 
    'PRODUCT_LIST_BUY_NOW':
                
    $lc_align 'center';
                if (
    $listing['products_quantity']<=0) {

           
    $lc_text tep_image_button('button_buy_now_na.gif'IMAGE_BUTTON_BUY_NOW_NA) . '&nbsp;';
         } else {
                }
                break;
            }

            
    $list_box_contents[$cur_row][] = array('align' => $lc_align,
                                                   
    'params' => 'class="productListing-data"',
                                                   
    'text'  => $lc_text);
          }
        }

        new 
    productListingBox($list_box_contents);
      } else {
        
    $list_box_contents = array();

        
    $list_box_contents[0] = array('params' => 'class="productListing-odd"');
        
    $list_box_contents[0][] = array('params' => 'class="productListing-data"',
                                       
    'text' => TEXT_NO_PRODUCTS);

        new 
    productListingBox($list_box_contents);
      }

      if ( (
    $listing_split->number_of_rows 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
        <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE ' ' $listing_split->display_links(MAX_DISPLAY_PAGE_LINKStep_get_all_get_params(array('page''info''x''y'))); ?></td>
      </tr>
    </table>
    <?php
      
    }
    ?>

  4. #4
    New Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0


    Default Re: Help on search

    Also my subtract stock does not work when someone purchase from my site
    cyber-jocks.com the quantity is not subtracted and the setting are correct on the admin which was check I have it on true for subtract stock

  5. #5
    New Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0


    Default Re: Help on search

    Quote Originally Posted by michael_s View Post
    You can turn off stock tracking, enable display out of stock products, or add stock quantities to the products.
    Hi Micheal I really like the templates I saw from your blog if I am interested in updating my shopping cart look can you install it and tell me the cost ..

    contact me

    cyber-jocks.com

  6. #6
    New Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0


    Default Re: Help on search

    Quote Originally Posted by nlacoss View Post
    Hi Micheal I really like the templates I saw from your blog if I am interested in updating my shopping cart look can you install it and tell me the cost ..

    contact me

    cyber-jocks.com
    how do I turn off stock tracking

Similar Threads

  1. Help Search Box
    By Kronox in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 04-21-2008, 01:52 PM
  2. Better Name Search
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 11-12-2007, 09:12 PM
  3. How to have Quick Search also search in Descriptions
    By ozstar in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 12-09-2005, 11:45 AM
  4. Full text search in advanced search
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-15-2004, 02:00 PM
  5. How to make search box also search descriptions
    By marco6090 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-06-2003, 04:31 AM

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
  •