Grid with Vendors

Future Ideas

Tagged: 

Resolved
Viewing 10 reply threads
  • Author
    Posts
    • #126811
      Kevin
      Participant

      Is it possible we can get a content block that contains a grid layout (fx. 3×4 with pagination functionality) with Vendors?

      So instead of displaying products on the frontpage, we get to display Vendors?

      The current widget with List of Vendors is really underwhelming and doesn’t suit our needs. That also only works with sidebars, top bars and footers.
      Our customers prioritize Vendor -> Products
      .. and not Product -> Vendor

    • #126820

      @Kevin Ørskov, thanks for getting in touch with us.

      As you want to display list of vendor’s in the homepage, you can create vendor’s list page using our shortcode : [wcmp_vendorslist orderby=”registered” order=”ASC”]. As you can see here : http://wcmpdemos.com/all-in-one-demo/vendors/

      You can set this page as your Homepage.

    • #126840
      Kevin
      Participant

      Looks interesting!

      I can see it also allow parameters for customization.. can I see the full list of parameters somewhere and what input values are available?
      This is a great start but I want to customize it to suit our needs

    • #126856

      @Kevin Ørskov, it would be better if you can explain the modification you are looking for, so we can help you out.

      • #126879
        Kevin
        Participant

        1. We want to remove the default search inputs like e-mail address, miles radius and sort functionality.
        Instead, we want to be able to search specific vendors by text input and also filter vendors by custom taxonomy.

        2. Also, in each vendor box, we want to remove the phone-icon and location-icon.
        We would also like to add the cover image from the profile to the vendor box.

        3. Lastly, some images of the products in the “Top Products” section in the vendor box, does not scale to fit. Some images exceed the border of the vendor box.

    • #126903

      Hi,
      1. We want to remove the default search inputs like e-mail address, miles radius and sort functionality.
      Instead, we want to be able to search specific vendors by text input and also filter vendors by custom taxonomy.

      — Please add this code in the function.php of the current active theme :

      add_action('init', 'wcmp_vendor_list_modification');
      function wcmp_vendor_list_modification() {
          remove_action( 'wcmp_after_vendor_list_map_section', 'wcmp_vendor_list_map_filters', 10 );
          remove_action( 'wcmp_before_vendor_list_vendors_section', 'wcmp_vendor_list_catalog_ordering', 5 );
          add_action( 'wcmp_before_vendor_list_vendors_section', 'custom_wcmp_vendor_list_catalog_ordering', 5 );
      }
      
      function custom_wcmp_vendor_list_catalog_ordering() {
      
      if ( ! defined( 'ABSPATH' ) ) {
          exit; // Exit if accessed directly
      }
      
      global $WCMp, $vendor_list;
      ?>
      <div class="wcmp-store-map-pagination">
          <p class="wcmp-pagination-count wcmp-pull-right">
              <?php
              wcmp_vendor_list_paging_info();
              ?>
          </p>
          
          <?php wcmp_vendor_list_form_wrapper(); ?>        
          <?php wcmp_vendor_list_form_wrapper_end(); ?>
      </div><?php
      }
      Copy

      2. Also, in each vendor box, we want to remove the phone-icon and location-icon.
      We would also like to add the cover image from the profile to the vendor box.

      –As per your requirement kindly overridden templates/shortcode/vendor-list/content-vendor.php template by copying it to yourtheme/dc-product-vendor/shortcode/vendor-list/content-vendor.php

      to remove phone icon and location icon remove lone no 32 to 43.
      to add cover photo add your custom code

      3. Lastly, some images of the products in the “Top Products” section in the vendor box, does not scale to fit. Some images exceed the border of the vendor box.
      WCMp use this below hook to add top product

      do_action('wcmp_vendor_lists_vendor_top_products', $vendor);
      Copy

      You can also add your custom css or
      remove above action hook and the add hook your custom code .

      Regards,

    • #127476
      Kevin
      Participant

      Thank you for the feedback!

      I have another three questions:
      – is it possible to configure the vendor grid to only show a fixed amount of vendors – fx. only 12 vendors?
      I’ll be needing this to show 12 vendors on the frontpage and then I’ll have an additional page showing all vendors.
      – is it possible to fetch the vendors in the order of the newest one first?
      – is it possible to add a field that filters on name?

      All the best!

    • #127523

      Hi,
      Our replies are inline:

      – is it possible to configure the vendor grid to only show a fixed amount of vendors – fx. only 12 vendors?
      I’ll be needing this to show 12 vendors on the frontpage and then I’ll have an additional page showing all vendors.
      –>
      using below code you can remove pagination

      add_filter('wcmp_vendor_list_ignore_pagination', '__return_true');
      Copy

      – is it possible to fetch the vendors in the order of the newest one first?
      –> Yes, for this you have to add custom code using below filter -:

      wcmp_vendor_list_data
      Copy

      – is it possible to add a field that filters on name?
      –> Yes, for this you have to add custom code, let me know if you need hook and filters,

      Regards,

      • #127547
        Kevin
        Participant

        I’ll respond to each inline:

        1. We still want pagination on the page with all vendors, so we don’t want to disable it.
        Isn’t possible to disable pagination by parameter in the shortcode?

        2. Alright..

        3. Yes, please let me know the hook and filters.

      • #127548
        Kevin
        Participant

        Additional comment:

        1. We also still want to limit the numbers of vendors on the front page. In the code, the default number is 16 vendors – is it possible to limit it by passing a parameter in the shortcode? If not, then how?

        • #127549
          Kevin
          Participant

          EDIT: The default number of vendors is 12 and we want 8 shown on the frontpage while showing the default 12 on the sub-page.

    • #127562

      Kevin, use the below code to set the number of vendors you want to display in a page

      /*Increase number of vendors shown on vendor list */
      add_filter('wcmp_vendor_list_vendors_query_args', 'display_number');
      function display_number( $args ) {
      $args['number'] = 8;
      return $args;
      }
      Copy

      But this number will be same for all the pages.

    • #128908
      aburkhart
      Participant

      Hello – I’m trying to do the same thing. Did you guys get this figured out? If so, could you please share the code? I’m having a horrible time trying to figure out the vendor grid.

      Thank you

    • #128918
      aburkhart
      Participant

      Nevermind. I think I figured it out! Thank you.

    • #128925

      Thanks for the update @aburkhart

Viewing 10 reply threads

The topic ‘Grid with Vendors’ is closed to new replies.