• Pick up products already registered in woocommerce and display for all sellers who use dokan.

    I changed the dokan-lite/templates/store.php

    if ( have_posts() ) { ?>
    
                <div class="seller-items">
    
                    <?php woocommerce_product_loop_start(); ?>
    
                        <?php while ( have_posts() ) : the_post(); ?>
    
                            <?php wc_get_template_part( 'content', 'product' ); ?>
    
                        <?php endwhile; // end of the loop. ?>
    
                    <?php woocommerce_product_loop_end(); ?>
    
                </div>

    To stay as below

    $args=array(
                'author' => 0,
                'post_type' => 'product',
                'post_status' => 'publish'
            );
            $my_query = null;
            $my_query = new WP_Query($args);
    
            if ( $my_query->have_posts() ) { ?>
    
                <div class="seller-items">
    
                    <?php woocommerce_product_loop_start(); ?>
    
                        <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
    
                            <?php wc_get_template_part( 'content', 'product' ); ?>
    
                        <?php endwhile; // end of the loop. ?>
    
                    <?php woocommerce_product_loop_end(); ?>
    
                </div>

    But when making the sale, the product remains related to the administrator who registered the product, not the owner of the store that made the sale.

    • This topic was modified 7 years, 3 months ago by guttemberg.

    The page I need help with: [log in to see the link]

  • The topic ‘Pick up products already registered in woocommerce and display for all sellers’ is closed to new replies.