• Resolved WillOfTheWeb

    (@willoftheweb)


    Hi

    I’m having issues with this plugin when using Divi. I am designing the product pages in the Divi builder but when I do this the contact button appears out of the Divi builder area. It works fine when I use the default Woo layout. Can I use a shortcode instead?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Having a similar issue myself.

    Plugin Author WisdmLabs

    (@wisdmlabs)

    Hey @deltadude and @willoftheweb

    We will have the development team test the issue at our end and get back to you soon with an update ??

    Regarding the shortcode, we have this feature available in our Pro version of the plugin. Here is a link to our documentation: https://wisdmlabs.com/docs/article/wisdm-product-enquiry-pro/pep-features/compatibility-with-page-builder-elementor/

    Plugin Author WisdmLabs

    (@wisdmlabs)

    Hey @deltadude and @willoftheweb

    Please add the following code in your theme or child theme’s functions.php file:

    add_filter('wp_head', 'pe_is_divi_single_product_page_layout_enabled', 20);
    
    function pe_is_divi_single_product_page_layout_enabled()
    {
        // Check if PEP plugin is active
        if (is_plugin_active('product-enquiry-for-woocommerce/product-enquiry-for-woocommerce.php')) {
            // Check if single product page and Divi Layout has been set
            if (is_product() && defined('ET_THEME_BUILDER_BODY_LAYOUT_POST_TYPE') && 'et_body_layout' == ET_THEME_BUILDER_BODY_LAYOUT_POST_TYPE) {
                if (!class_exists('PE_Public_Enquiry_Button')) {
                    include_once(WDM_PE_PLUGIN_PATH . 'public/class-pe-public-enquiry-button.php');
                }
    
                $enq_btn = PE_Public_Enquiry_Button::instance();
                remove_action( 'woocommerce_single_product_summary', array($enq_btn, 'render_enquiry_button'), 30);
                remove_action( 'woocommerce_after_single_product_summary', array($enq_btn, 'render_enquiry_button'), 10);
    
                // Add PEP button after the add to cart form
                add_action('woocommerce_after_add_to_cart_form', 'pe_add_enq_btn_66737');
            }
        }
    }
    
    function pe_add_enq_btn_66737()
    {
        if(!class_exists('PE_Public_Enquiry_Button')) {
            include_once(WDM_PE_PLUGIN_PATH . 'public/class-pe-public-enquiry-button.php');
        }
        $enq_btn = PE_Public_Enquiry_Button::instance();
        $enq_btn->render_enquiry_button();
    }

    The above code will remove the PEFree enquiry button from the top-left corner and will add the enquiry button after the add to cart form.

    Please test this at your end and let us know if the issue is resolved for you ??

    Plugin Author WisdmLabs

    (@wisdmlabs)

    Hey @deltadude and @willoftheweb

    Could you please confirm if the solution we provided in the previous comment resolved the issue for you ??

    Thread Starter WillOfTheWeb

    (@willoftheweb)

    Hi, thanks for the fix. In the meantime though I used another way of adding the form.

    Plugin Author WisdmLabs

    (@wisdmlabs)

    Hey @willoftheweb

    I am glad you were able to find a solution. If you need any further assistance, please let us know, we are more than happy to help ??

    We will be closing this ticket for now. Feel free to contact us, we are always here to help ??

    Dear support

    I have the same issue, but the code-snippet you provided did not solve it for me.

    Neither adding the Divi-Woocommerce Cart-Module nor adding the PEP shortcode work, so I really do not know how to approach this problem.

    You can find an example under:

    https://critarion.com/wp/product/abasaglar-100-u-ml-solution-for-injection-cartridge/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Having Divi Problems’ is closed to new replies.