• Resolved haruns1995

    (@haruns1995)


    Hi,

    I found this code in previous topic with same name:

    “`add_action(‘woocommerce_after_single_product_summary’, function() {

    echo esc_html(‘More products from this vendor:’);
    dokan_get_more_products_from_seller( $seller_id = 0, $posts_per_page = 4 );
    });`”

    I added that code and it works, however, I want to show 5 or 6 products but I want them to be centered in a page. As You can see on the page link I added to this topic, the products are in a row, but not centered: https://ibb.co/rwGMDWS

    Is there a way to center it on the page, or to show 5 but with bigger gap between each product so I can play with it until they look centered ?

    Thanks in advance!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @haruns1995

    By default, the More Products tab shows the other 6 products from the same vendor. If you want to show 5 instead of 6 then you can use the below-mentioned code on your functions.php file.

    #-- Products per page of the More Products tab --#
    add_filter('dokan_get_more_products_per_page', function($post_per_page){
      return 3;
    });

    The rest of the things need to be managed by adding some CSS. For your information, the content under the More Products tab is being handled from dokan-lite\includes\wc-functions.php this file.

    I hope the information will help.

    Thread Starter haruns1995

    (@haruns1995)

    Hi,

    I already have that displayed and I can easily change to 5 by editing post per page, so that is not a problem.

    Problem I have is that the displayed products are not centered on the website.
    Is there a way this code can be edited to align them to center to to increase the spacing between each displayed product:

    “`add_action(‘woocommerce_after_single_product_summary’, function() {

    echo ‘
    <br>
    <br><p style=”color:#000000″;><span style=”font-size:14.0pt”;”><b>More logos from this Designer</b></span></p></br>’;

    dokan_get_more_products_from_seller( $seller_id = 0, $posts_per_page = 6 );
    });`”

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @haruns1995

    From Dokan’s end, we haven’t added any style for the more product tab section of the single product page. We have used the WooCommerce template. If the tab is facing any issue related to style then it will be better to contact your theme support or fix it using some additional CSS.

    I hope the information helps. Thanks!

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @haruns1995

    Due to inactivity, I am marking this topic as resolved. Feel free to open a new one if you face any further issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display vendor products’ is closed to new replies.