Catagory widget can't work

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 6 reply threads
  • Author
    Posts
    • #82850
      clickeke
      Participant

      Hi,
      https://sportown.com.tw/store/
      Category widget in sidebar at store and vendor list can not show all subcategory,only display the subcategory which vendor latest post product。
      I think the full function should show all products in category and subcategory add by this vendor。
      Help me out ,please!

    • #82949
      WCFM Forum
      Keymaster

      Hi,

      Well, this category filter shows only those categories and sub-categories which are associated with vendors’ products.

      Thank You

    • #82982
      clickeke
      Participant

      Hi,

      We’ve checked that categories and sub-categories which associated with vendor are more than two sub-categories.
      And we don’t know why $vendor_categories in wcfmmp-view-store-category.php are only 1 category and 1 sub-category.
      Could you help us to check database by using sql or any way we can check that $vendor_categories is query correctly?

      Thank you for your quickly responding.

    • #82998
      Makers
      Participant

      @clickeke I’ve been having this issue for 3 months as WC Lovers is aware and debugging still. I’ve been pulling my hair out trying to figure what causes this issue. I hate to say it, but I’m glad I’m not the only one because it shows it’s not an isolated issue. I’m going to follow this thread in hopes a solution to this problem is found, because this is a major problem for us for obvious reasons.

      Please see attached for temporary workaround. This is only a partial workaround and not a fix, because the workaround itself only lets you select sub-categories but no main categories.

      “I added this code temporarily….

      add_filter( ‘wcfmmp_force_store_taxonomy_refresh’, ‘__return_true’ );

      added code to a snippet after unchecking the main category “Main Category 1” and only leaving the sub-categories for “Main Category 1” checked and it populated the sub-categories for “Main Category 1” correctly. I was able to break the sub-categories again for “Main Category 1” by checking the main category “Main Category 1” along with the sub-categories.”

      Best of luck to us!

      Attachments:
      You must be logged in to view attached files.
    • #83624
      clickeke
      Participant

      @Makers Thank you for the information, we’ve tried your workaround and the result is the same as yours.

      About the workaround, we use woocommerce to disable main category at first, and it’s useless.
      So we take a look about the $vendor_categories.

      Please refer our analysis as below
      1. The SQL query is in function “wcfmmp_get_vendor_taxonomy” under wc-multivendor-marketplace\core\class-wcfmmp-vendor.php
      2. There are a huge logic after query, so we skip to verify those code.
      But we think the problem is in that.
      3. We take a shortcut by modifying SQL query.

      You can make the $vendor_categories return correctly by adding code

      $sql .= ” GROUP BY term, parent ORDER BY parent“;

      right after $sql is assembled.

      The SQL will force query return the correct structure for the logic after assembled.
      Even though this problem should be piece of a cake without changing sql.

      Wish we can see the fix coming.

      Attachments:
      You must be logged in to view attached files.
    • #83868
      Makers
      Participant

      @clickeke Wow! Thank you very much for this information.

      I’d like to see what @WCfMForum response is to your findings before I implement this into my site. Maybe they can utilize your findings to implement a fix in the next update for those of us effected that doesn’t require sql like you mentioned. Either way I really appreciate this information!

      Thank you!

    • #85297
      clickeke
      Participant

      WCFM Marketplace – Multivendor Marketplace 3.2.3 fix this issue verified.
      Thank you for your helps.

Viewing 6 reply threads
  • The topic ‘Catagory widget can't work’ is closed to new replies.