Select delivery promotion popup is not working
-
I have changed settings to popup delivery location but it doesn’t work. https://ibb.co/YRcyNfx
site – https://ibb.co/wNPhddV
-
Hi,
Due to conflict with some other plugin or theme the popup button is not been added in your site
add the below code in your theme functions.php file it should add a Delivery popup button
add_action('wp_body_open', function(){ if((function_exists('is_cart') && is_cart()) || (function_exists('is_cart') && is_checkout())) return; $bg = get_option('pi_ppscw_badge_bg_color', '#000000'); $color = get_option('pi_ppscw_badge_text_color', '#FFFFFF'); $text = get_option('pi_ppscw_badge_text', 'Delivery location'); if(apply_filters('pisol_ppscw_enable_popup',true)){ echo '<div id="pisol-ppscw-badge-container" class="pisol-badge-bottom-right"><a id="pisol-ppscw-badge" href="javascript:void(0);" style="background-color:'.$bg.'; color:'.$color.';"><span>'.$text.'</span></a></div>'; } });
HI, Thanks. ill try this. can u please kindly tell me how i can add an additional field to address the “province” please?
Hi i tried the above code but it still doesn’t popup in single product page
Hi,
You will have to test by disabling all the plugin leaving this plugin and WooCommerce acive and activating TwentyTwenty theme of wordpress
once you do this then it will start showing the popup button and then you can activate other plugin one by one an keep checking that popup is still working
and at the end when you have tested with all the plugin you can activate your original theme
this way you will be able to find the conflict causing plugin
=======================================================================================
apart from this if you want you can add this link in your website this link will open the popup on click
<a id="pisol-ppscw-badge" href="javascript:void(0);" ><span>Delivery popup</span></a>
well wow. i needed one like this. but there’s an issue after i enter the address it shows “your details are saved” BUT it still shows “insert your location to get the shipping method” .
Sorry not understood the issue properly,
popup is different module to take only address saving address in the popup will not trigger the module that is on your product page but since address is saved when the page will be refreshed the page module will show the shipping method for that location
oh no. hmm can’t we make the page reload auto by it self when we click on save address in the popup?
Hi,
Add the below code in your theme functions.php file this will make the page reload once user insert an address in the popup box
function pisol_custom_20210815() { $js = ' jQuery(document).ready(function($){ $(document).ajaxComplete(function (event, jqxhr, settings) { if (settings.data && settings.data.includes("action=pisol_save_address_form")) { if(jqxhr.responseJSON){ if(jqxhr.responseJSON.success){ location.reload(); } } } }); });'; wp_add_inline_script('jquery', $js, 'after'); } add_action( 'wp_print_scripts', 'pisol_custom_20210815', 100 );
You are awesome. I still didn’t try this because I’m outside right now but I will rate 5 for this best service now till I try.
Hi i tried the above code, it refresh the page but it still doesn’t show the calculate amount it shows “insert your location to get the shipping method”
please send us the link of the page where we can try it and also send the correct post code (for which you have the shipping zone defined on your site)
Hi,
Make sure this option “Auto calculation of shipping method” is set to enabled
i can’t turn it on because i dont want to display the shipping cost until the address has inserted.
https://www.temporary-url.com/CB48D8 <- this is the product link. like this due to privacy.Thank you and hope to hear from you soon
Hi,
you can try the below code this will trigger the loading the shipping method on the product page without form refresh
(replace the old code with this new one)function pisol_custom_20210815() { $js = ' jQuery(document).ready(function($){ $(document).ajaxComplete(function (event, jqxhr, settings) { if (settings.data && settings.data.includes("action=pisol_save_address_form")) { if(jqxhr.responseJSON){ var country = jQuery("form.pi-ppscw-address-form #calc_shipping_country").val(); var state = jQuery("form.pi-ppscw-address-form #calc_shipping_state").val(); var city = jQuery("form.pi-ppscw-address-form #calc_shipping_city").val(); var post = jQuery("form.pi-ppscw-address-form #calc_shipping_postcode").val(); jQuery("form.pisol-woocommerce-shipping-calculator #calc_shipping_country").val(country); jQuery("form.pisol-woocommerce-shipping-calculator #calc_shipping_state").val(state); jQuery("form.pisol-woocommerce-shipping-calculator #calc_shipping_city").val(city); jQuery("form.pisol-woocommerce-shipping-calculator #calc_shipping_postcode").val(post); jQuery("form.pisol-woocommerce-shipping-calculator").trigger("submit"); } } }); });'; wp_add_inline_script('jquery', $js, 'after'); } add_action( 'wp_print_scripts', 'pisol_custom_20210815', 100 );
Dear @rajeshsingh520 i know this is so annoying buddy and i know that u re doing a very very very great job.
just wanna say when i use the cal on product page it is showing like this https://ibb.co/S3gkWCY (no shipping method available in your area)… But on the checkout page it is showing the shipping cost https://ibb.co/yP1YkN2. This was working fine before in the product page.
Please and im sorry
- The topic ‘Select delivery promotion popup is not working’ is closed to new replies.