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

search box results

This is a discussion on search box results within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi - I have found a problem with search results - they all show as out of stock! I have ...

      
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    49
    Rep Power
    0


    Default search box results

    Hi - I have found a problem with search results - they all show as out of stock! I have the SPPC mod added. I have tried in vain to find the error. Can anyone point me in the right direction?
    Thanks

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: search box results

    I can not see this issue on your site ... search works fine! Can you give a few more details about the issue - perhaps a screen shot showing the problem. Regards,
    pgmarshall
    _______________________________

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: search box results

    Okay I see the Green Button (out of stock) - but I can not work how you got that there ... have you change the product_listing.php code (includes/modules)? Regards,
    pgmarshall
    _______________________________

  4. #4
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: search box results

    Also your articles sections appears to have crashed! Regards,
    pgmarshall
    _______________________________

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    49
    Rep Power
    0


    Default Re: search box results

    Hi - I changed the out of 'stock gif' to 'click here' (although you cannot click it!) as a quick work around. I think somewhere in the code it thinks that all products have a stock of 0 so puts this out of stock gif on. I imagine the error is somewhere in the SPPC code added to advanced search.php.

  6. #6
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: search box results

    Like I said - this is not default osCmax code ... have you changed this? I don't know what SPPC code you are talking about being added to advanced search results? Post the contents of catalog/includes/modules/product_listing.php Regards,
    pgmarshall
    _______________________________

  7. #7
    Member
    Join Date
    Jul 2008
    Posts
    49
    Rep Power
    0


    Default Re: search box results

    Hi - I have now looked at the product_listing.php and remember adding code to create a non clickable OUT OF STOCK button. If I change back to the original then the search function brings up the basket image for all of search results, even out of stock ones, which is an improvement. The code causing the problem in product_listing.php is in bold with a few lines either end to show where it is;

    case 'PRODUCT_LIST_BUY_NOW':
    $lc_align = 'center';
    // out of stock - $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
    If ($listing['products_quantity'] != 0){
    $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
    }else{
    $lc_text = tep_image_button('button_out_of_stock.gif', IMAGE_BUTTON_OUT_OF_STOCK) . '&nbsp;';
    }
    break;
    // EOF: MOD - Separate Pricing per Customer - Added on may lines [$x]

    Hope this is clear!

  8. #8
    Member
    Join Date
    Jul 2008
    Posts
    49
    Rep Power
    0


    Default Re: search box results

    Hi - Managed to get it to work - had to change <> to >; and include the [Sx] which is part of SPPC thus:

    If ($listing[$x]['products_quantity'] > 0){
    $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
    }else{
    $lc_text = tep_image_button('button_out_of_stock.gif', IMAGE_BUTTON_OUT_OF_STOCK) . '&nbsp;';
    }

    Thanks for pointing me in the right direction!

  9. #9
    Member
    Join Date
    Jul 2008
    Posts
    49
    Rep Power
    0


    Default Re: search box results

    Hi - Found another issue with this - if you go to admin-configuration-product listing and set display product quantity as 0 (ie do not display) then the shop part works fine; but any search will show out of stock for all products. Change it back (to 5 for example) and stock shows on the shop part still works and now the search also works.

Similar Threads

  1. Search results page
    By Bones in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 05-14-2009, 02:48 AM
  2. search results to categories
    By zeberrun in forum osCommerce 2.2 Discussion
    Replies: 0
    Last Post: 10-15-2008, 01:24 PM
  3. Highlight search results
    By altenter in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 06-08-2007, 04:01 AM
  4. Search not showing results.
    By JonCloud420 in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 09-03-2006, 06:59 PM
  5. modifing meta_tags.php to help search results?
    By Redeye_Joe in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 02-20-2006, 06:08 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
  •