Results 1 to 3 of 3

Thread: How to filter product popup by availability

  1. #1
    raynor is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    sydney
    Posts
    71

    Default How to filter product popup by availability

    hi

    I used to have this on my earlier version of Sugar, but seemed to lose it when I went to version 6.

    When adding a Product to an Account, and using the Product Popup, I want it to always filter so that only products that are In Stock are shown.

    I've tried editing modules/ProductTemplates/Popup_picker.php and put
    $where = 'product_templates.status = "Available"'; into the function process_page, but it doesn't seem to apply.

    Any suggestions?
    sugar professional 6.4.0

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to filter product popup by availability

    Hi raynor

    I believe your old version had been customized accordingly.
    Can you provide the zipped custom/modules/ProductTemplates/ and custom/modules/ProductTemplates/

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    raynor is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    sydney
    Posts
    71

    Default Re: How to filter product popup by availability

    hi Andopes

    A new day is a good day. I'm sure i had tried this combination before, but I added:
    $where2 = "product_templates.status = 'Available'";
    if ($where) $where.= " AND product_templates.status = 'Available'";
    else $where = 'product_templates.status = "Available"';

    in function process_page, just after the call to get_where_clause, and it works now.

    Thanks!
    sugar professional 6.4.0

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. popup filter by assigned to
    By dsuvankar in forum Developer Help
    Replies: 2
    Last Post: 2010-03-04, 10:42 AM
  2. Popup filter
    By leowolff in forum Help
    Replies: 1
    Last Post: 2009-08-17, 08:33 PM
  3. How create an filter for the popup
    By youn008 in forum Developer Help
    Replies: 6
    Last Post: 2009-06-25, 09:30 AM
  4. How to filter popup in module
    By vishwasrao in forum Developer Help
    Replies: 7
    Last Post: 2009-06-01, 06:51 PM
  5. how to filter popup
    By Mubi in forum Developer Help
    Replies: 1
    Last Post: 2008-09-11, 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
  •