dokan store products Category Layout woocommerce

Viewed 44

I'm using astra team with WordPress and dokan for multivendor,

I had woocommerce shop page layout by category which still works fine, but for some reason it does not apply to dokan store product listing.

the php code for woocoomerce shop page

 <php?
   add_action( 'woocommerce_no_products_found', 'bbloomer_show_4_products_per_category' );

      function bbloomer_show_4_products_per_category() {
       $args = array(
  'parent' => 0,
  'hide_empty' => true,
  'taxonomy' => 'product_cat',
  'fields' => 'slugs',
   );
     $categories = get_categories( $args );
    foreach ( $categories as $category_slug ) {
  $term_object = get_term_by( 'slug', $category_slug , 'product_cat' );
  echo '<hr><h2>' . $term_object->name . '</h2>';
  echo do_shortcode( '[products limit="4" columns="4" category="' . $category_slug . '"]' );
  echo '<p><a href="' . get_term_link( $category_slug, 'product_cat' ) . '">View all ' . 
      $term_object->name . ' products &rarr;</a>';
   }
   }

  >?

the output:
enter image description here

on the dokan vendor store the layout is:
enter image description here

It does not change the layout

I searched the plugin and find the script that renders the vendors products, but can't seems how to adjust it.

   <?php do_action( "dokan_store_before_{$section_id}_product_section", $vendor ); ?>

   <div id="dokan_store_section_<?php echo esc_attr( $section_id ); ?>" class="dokan-store-product-section">
     <h2 class="products-list-heading"><?php echo esc_html( $section_title ); ?></h2>
     <div class="seller-items">

    <?php woocommerce_product_loop_start(); ?>

        <?php while ( $products->have_posts() ) : $products->the_post(); ?>

            <?php wc_get_template_part( 'content', 'product' ); ?>

        <?php endwhile; ?>

    <?php woocommerce_product_loop_end(); ?>

    <?php wp_reset_postdata(); ?>

        </div>
        </div>




            <?php do_action( "dokan_store_after_{$section_id}_product_section", $vendor ); ?>
0 Answers
Related