Support » Plugin: Product page shipping calculator for WooCommerce » Custom Implementation

  • Resolved samsmotorsports

    (@samsmotorsports)


    Hi,
    I have a custom text that is displayed on the product page only if the product is not associated with Free Shipping class.
    I don’t want to use the automatic hook to display the Calculate Shipping, instead I want to only add the option to load the popup when the customer click on a link in my page. How can I achieve that?
    https://prnt.sc/21a1ij2

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    add the below code in your theme functions.php file to hide the calculator button

    
    
    remove_action('woocommerce_after_add_to_cart_form', ['pisol_ppscw_product_page_calculator', 'calculator']);
    
    

    To trigger popup from that link add ID pisol-ppscw-badge to the tag

    e.g: Calculate shipping

    and make sure you have enabled the popup option from the Popup tab in our plugin

    Thread Starter samsmotorsports

    (@samsmotorsports)

    Thanks.
    I think I didn’t explain my requirements well.
    I am looking for a method to allow customers to calculate shipping from the product page. However instead of displaying the form on the page, I want to display it in a popup.
    The method you explained above will load the “Set your delivery location” in a popup that is triggered by the link, however I need to display the form where the customer can calculate the shipping within a popup not just change the location.
    I have also noticed that after activating the plugin the loading speed of the page has increased. So a perfect scenario will be to load the plugin files in the popup so these resources are not loaded unless the customer loads the popup.

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Sorry that form cant be loaded in the popup

    Thread Starter samsmotorsports

    (@samsmotorsports)

    Thanks for trying to help.
    I ended up using another plugin which has this feature and it works like a charm.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.