Okay
  Public Ticket #3365107
Short code for product enquiry
Closed

Comments

  • BERGER started the conversation

    Hello,

    I am using a specific product page template on woocommerce made by JetWooBuilder (from Crocoblock) so not using the standard WooCommerce product page.

    I am interested in the product inquiry form but in this case it's not going to be displayed because of this specific template.

    Is there a way (short code ?) to have a link to the product inquiry form ? (in my case it's going to be used mainly for both logged in and not logged in users)

    Thanks

    Have a nice day !

  •  2,218
    WebWizards replied

    Hi there,

    Thank you for getting in touch,

    The product inquiry form can be called with this function:

    marketkingpro()->get_inquiries_form(false, $product_id);
    

    You could create a shortcode with this code snippet:

    add_shortcode('marketking_product_inquiry_form', function(){
        global $post;
        $product_id = $post->ID;
        ob_start();
        marketkingpro()->get_inquiries_form(false, $product_id);
        return ob_get_clean();
    });

    After adding the above code snippet to your site, you can then use the [marketking_product_inquiry_form] shortcode.


    Kind regards,

    Stefan