Thread: hideCategories

Page 31 of 49 FirstFirst ... 21293031323341 ... LastLast
Results 301 to 310 of 487
  1. #301
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Alrighty, I think I've got it.

    MAKE A BACKUP BEFORE YOU MAKE THIS CHANGE BECAUSE THIS ISN'T AN OVERRIDE FILE and it worked for me, but I'm not 100% sure it is correct.

    In includes/modules/pages/advanced_search_result/header.php, find
    PHP Code:
    $from_str "FROM (" TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    and change to
    PHP Code:
    $from_str "FROM (" TABLE_HIDE_CATEGORIES " h, " TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    Then find
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    and change to
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   and (p.master_categories_id = h.categories_id and h.visibility_status !=2)
                   AND p2c.categories_id = c.categories_id "

    All I did was utilize the code from hideCategories/includes/modules/sideboxes/my_template/whats_new.php and adapted it to fit the search code.

    Hopefully it will continue to work and not cause issues with any of my other mods but I would appreciate feedback from someone who knows code as to whether it is the appropriate way to handle this situation.

    Thanks!

  2. #302
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    Will test this out and let you know if I get a similar result..

    Quote Originally Posted by kamelion0927 View Post
    Alrighty, I think I've got it.

    MAKE A BACKUP BEFORE YOU MAKE THIS CHANGE BECAUSE THIS ISN'T AN OVERRIDE FILE and it worked for me, but I'm not 100% sure it is correct.

    In includes/modules/pages/advanced_search_result/header.php, find
    PHP Code:
    $from_str "FROM (" TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    and change to
    PHP Code:
    $from_str "FROM (" TABLE_HIDE_CATEGORIES " h, " TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    Then find
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    and change to
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   and (p.master_categories_id = h.categories_id and h.visibility_status !=2)
                   AND p2c.categories_id = c.categories_id "

    All I did was utilize the code from hideCategories/includes/modules/sideboxes/my_template/whats_new.php and adapted it to fit the search code.

    Hopefully it will continue to work and not cause issues with any of my other mods but I would appreciate feedback from someone who knows code as to whether it is the appropriate way to handle this situation.

    Thanks!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #303
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    Will test this out and let you know if I get a similar result..
    Much appreciated.

  4. #304
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    What version of Zen Cart are you running?? The code in my files looks slightly different than what you posted.. In particular that second code block. This is what my original file looks like:

    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    BUT...

    This is what you posted as part of your original file:
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    Quote Originally Posted by kamelion0927 View Post
    Alrighty, I think I've got it.

    MAKE A BACKUP BEFORE YOU MAKE THIS CHANGE BECAUSE THIS ISN'T AN OVERRIDE FILE and it worked for me, but I'm not 100% sure it is correct.

    In includes/modules/pages/advanced_search_result/header.php, find
    PHP Code:
    $from_str "FROM (" TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    and change to
    PHP Code:
    $from_str "FROM (" TABLE_HIDE_CATEGORIES " h, " TABLE_PRODUCTS " p
                 LEFT JOIN " 
    TABLE_MANUFACTURERS " m
                 USING(manufacturers_id), " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_CATEGORIES " c, " TABLE_PRODUCTS_TO_CATEGORIES " p2c )
                 LEFT JOIN " 
    TABLE_META_TAGS_PRODUCTS_DESCRIPTION " mtpd
                 ON mtpd.products_id= p2c.products_id
                 AND mtpd.language_id = :languagesID"

    Then find
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    and change to
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   and (p.master_categories_id = h.categories_id and h.visibility_status !=2)
                   AND p2c.categories_id = c.categories_id "

    All I did was utilize the code from hideCategories/includes/modules/sideboxes/my_template/whats_new.php and adapted it to fit the search code.

    Hopefully it will continue to work and not cause issues with any of my other mods but I would appreciate feedback from someone who knows code as to whether it is the appropriate way to handle this situation.

    Thanks!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #305
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    What version of Zen Cart are you running?? The code in my files looks slightly different than what you posted.. In particular that second code block. This is what my original file looks like:

    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    BUT...

    This is what you posted as part of your original file:
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_quantity > 0
                   AND p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    I am running 1.39h. My apologies - I modified that block of code prior to tackling the hideCategories search issue (if I look the files for one issue for too long, I get cross-eyed so I jump around from issue to issue). If anyone is interested, the modified code that I used is for hiding sold out items from the search (a lot of my stock are one-of-a-kinds so there isn't any use for them to be in the search after they're sold).

    The unmodified code would be as you stated.
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "


  6. #306
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    Got it.. I knew the code you posted was meant to exclude sold out items.. Just wasn't sure where it came from.. Will let you know what my test results reveal..

    Quote Originally Posted by kamelion0927 View Post
    I am running 1.39h. My apologies - I modified that block of code prior to tackling the hideCategories search issue (if I look the files for one issue for too long, I get cross-eyed so I jump around from issue to issue). If anyone is interested, the modified code that I used is for hiding sold out items from the search (a lot of my stock are one-of-a-kinds so there isn't any use for them to be in the search after they're sold).

    The unmodified code would be as you stated.
    PHP Code:
    // Notifier Point
    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id "

    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #307
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    Got it.. I knew the code you posted was meant to exclude sold out items.. Just wasn't sure where it came from.. Will let you know what my test results reveal..
    Thanks for calling me on it - I forget when I change stuff and you know someone else will be looking at my post and thinking, "What the?!? My code doesn't match hers..." Been there, done that and it's frustrating when your code doesn't match what you're supposed to change.

    Thanks for testing it!

  8. #308
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    Quote Originally Posted by kamelion0927 View Post
    Thanks for calling me on it - I forget when I change stuff and you know someone else will be looking at my post and thinking, "What the?!? My code doesn't match hers..." Been there, done that and it's frustrating when your code doesn't match what you're supposed to change.

    Thanks for testing it!
    No problem.. Thank YOU for plugging away at this.. I did a little digging, and realized that Advanced Search stopped working in this version due to a change I made to hideCategories to resolve an issue with a duplicated join. The code I removed was meant to keep hidden products out of the searches, but it caused other issues when run under SQL5..

    So I am hoping my testing confirms/backs up yours..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #309
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    No problem.. Thank YOU for plugging away at this.. I did a little digging, and realized that Advanced Search stopped working in this version due to a change I made to hideCategories to resolve an issue with a duplicated join. The code I removed was meant to keep hidden products out of the searches, but it caused other issues when run under SQL5..

    So I am hoping my testing confirms/backs up yours..
    Thanks for acknowledging - I'm just happy to be able to give just a little bit back.

    I thought the modifications to product_listing.php were for hiding products from the search (being so crappy with coding, it's nice to know I've been picking some things up ).

    The changes in product_listing.php may have made it so the products show in the search, but at least thanks to you, the mod is working - I'm hoping to do Custom Orders which would be a lot more difficult without this mod. And figuring out how to hide hidden products from the search query was the easy part of updating the mod.

    In fact, I think 3/4 of my site was built with your help (not only the mods that you've worked on, but a lot of your posts have kept me from having to ask a ton of questions as well as giving me a laugh once in a while) so thanks for all your hard work!

  10. #310
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    Oh yes.. I'm glad you found an alternate solution (still need to test to confirm your results).. The duplicate join caused quite an issue for a few of my clients.. (I documented the issue) I REALLY didn't want to have to restore that code..


    Quote Originally Posted by kamelion0927 View Post
    Thanks for acknowledging - I'm just happy to be able to give just a little bit back.

    I thought the modifications to product_listing.php were for hiding products from the search (being so crappy with coding, it's nice to know I've been picking some things up ).

    The changes in product_listing.php may have made it so the products show in the search, but at least thanks to you, the mod is working - I'm hoping to do Custom Orders which would be a lot more difficult without this mod. And figuring out how to hide hidden products from the search query was the easy part of updating the mod.
    Well I'm glad I could be of some small amount of help.. Would love to know what I said that was funny though..

    Quote Originally Posted by kamelion0927 View Post
    In fact, I think 3/4 of my site was built with your help (not only the mods that you've worked on, but a lot of your posts have kept me from having to ask a ton of questions as well as giving me a laugh once in a while) so thanks for all your hard work!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 31 of 49 FirstFirst ... 21293031323341 ... LastLast

Similar Threads

  1. how to get hidecategories an dual pricing to work
    By davidweaver88 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 Jun 2012, 03:35 PM
  2. anyone using HideCategories in 1.3.9d??
    By redheads in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 8 Jun 2010, 06:54 AM
  3. HideCategories problem...
    By ShadowAngel in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Nov 2009, 10:17 PM
  4. hideCategories Module
    By marcusimages in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Aug 2009, 06:31 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