• Resolved kelseyduerksen

    (@kelseyduerksen)


    I was wondering if there would be a way to have the configure button replace the “Add to Cart” page, or in my case “Request Quote”.

    The way it is, clicking on the product from the “Shop” page takes you to the product page, and then you click on the configure button. Just wondering if there’s a way to skip this step and have the configure button appear directly on the product shown in the “shop”.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi there,

    It should be possible, but would require to be coded to replace the “Request Quote” link with the configurator button.

    So there’s no “already made” solution, but it’s doable.

    Marc

    Thread Starter kelseyduerksen

    (@kelseyduerksen)

    How would I find the code for the “Configure” button to replace the one that’s there? (Request Quote)

    Thread Starter kelseyduerksen

    (@kelseyduerksen)

    Actually, if I could redirect the product page to the configurator every time, that would be ideal.

    Plugin Contributor Marc Lacroix

    (@marcusig)

    There are several ways to do it.

    1. Custom product template

    If you use a page builder such as Divi or Elementor Pro (or an other alternative), you can create a custom product template and insert the shortcode [mkl_configurator] in the page.

    This way the product page will contain the configurator directly.
    This has the advantage that you can display other things in your product page.

    If you are not using a page builder, this can be achieved by creating a custom “single product” template inside your child theme, but requires a little bit of development.

    2. Add open_configurator to the URLs

    Otherwise, you could add the parameter open_configurator=1 to the product URL.

    The following code snippet will add it to the products in the “Shop” page:

    add_filter( 'woocommerce_loop_product_link', function( $link, $product ) {
        if ( function_exists( 'mkl_pc_is_configurable' ) && mkl_pc_is_configurable( $product->get_id() ) ) {
    		return add_query_arg( [ 'open_configurator' => 1 ], $link );
    	}
    	return $link;
    }, 20, 2 );

    You can add this in your child theme’s functions.php for example.

    Marc.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Configure button in “Shop” page’ is closed to new replies.