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

    (@rajeshsingh520)

    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>';
            }
    });
    
    
    Thread Starter shenalorlof

    (@shenalorlof)

    HI, Thanks. ill try this. can u please kindly tell me how i can add an additional field to address the “province” please?

    Thread Starter shenalorlof

    (@shenalorlof)

    Hi i tried the above code but it still doesn’t popup in single product page

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    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>
    
    Thread Starter shenalorlof

    (@shenalorlof)

    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” .

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    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

    Thread Starter shenalorlof

    (@shenalorlof)

    oh no. hmm can’t we make the page reload auto by it self when we click on save address in the popup?

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    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 );
    
    
    Thread Starter shenalorlof

    (@shenalorlof)

    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.

    Thread Starter shenalorlof

    (@shenalorlof)

    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”

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    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)

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    Make sure this option “Auto calculation of shipping method” is set to enabled

    View post on imgur.com

    Thread Starter shenalorlof

    (@shenalorlof)

    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

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    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 );
    
    
    Thread Starter shenalorlof

    (@shenalorlof)

    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

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Select delivery promotion popup is not working’ is closed to new replies.