Home Forums WoodMart support forum Display all variations at once

Display all variations at once

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #336958

    Golden1
    Participant

    Is there some option in theme settings so I can display all variations of a product on the page so that customer can select multiple variations and quantities and click ‘add to cart’ only once?

    Please see attached picture for an example

    Attachments:
    You must be logged in to view attached files.
    #337015

    Hello,

    The variation functionality is based on the default Woodoommerce functionality, Woocommmerce does not have such an option and you will have to find a plugin.

    We have not met or tested the equal plugin that is why we can hardly recommend it.

    If you have any questions please feel free to contact us.

    Best Regards

    #338965

    Golden1
    Participant

    Thank you for the response.

    Barn2 has a nice product table plugin and allows you to place the table on the single product page to list all variations in a nice grid similar to what my previous screenshot showed.

    Here is the code snippet:

    
    /**
     * Outputs WooCommerce Product Table shortcode after short description - place in functions.php
     * @param string $short_description - the original short description being passed into the filter 
 
     * @return string $short_description including WooCommerce Product Table shortcode
    **/
    
    function barn2media_product_table_after_short_desc($short_description) {
        global $product;
        if (!is_single() || !is_callable(array($product, 'get_id'))) {
            return $short_description;
        }
        $product_id = $product->get_id();
        $shortcode = "[product_table include='{$product_id}' variations='separate' lazy_load='false' columns='name,price,stock,buy' cart_button='checkbox' quantities='true' links='none' page_length='false' search_box='false' reset_button='false' totals='false']";
        return $short_description . $shortcode;
    }
    
    add_filter( 'woocommerce_short_description', 'barn2media_product_table_after_short_desc', 1 );
    

    I pasted this as a code snippet, but it is not working correctly and still showing the traditional drop-down style variations selections.

    Any idea?

    • This reply was modified 2 years, 9 months ago by Golden1.
    #339098

    Hello,

    Our support does not cover checking and fixing any customization. Please try to find a plugin.

    If you have any questions please feel free to contact us.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)