Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • I was planning to replace FastSecure on my sites with Forminator, but am having the same issue.

    I have disabled Fast Secure in case there was a conflict, but that made no difference.

    I do not understand the duplicate instructions above.

    richterworks

    (@richterworks)

    I believe it resolved. At what point I am not sure, it just was suddenly working. I think there may have been a server cache issue.
    The chosen_shipping was local_pickup:7, which also didn’t work any better. After I put it back to local_pickup it finally worked.
    Client has yet to test with a user login (as opposed to admin login), but I think we’re good. Thank you for all the patience and help.

    richterworks

    (@richterworks)

    OK so I have added that after the hook after the code, but it is not printing anything to screen. Can you look at this code and see if I messed something up?

    function remove_shipping_to_cart_local() {
            // part 1: check on page load and hide if local pickup
            $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
            $chosen_shipping = $chosen_methods[0];
            if ( 0 === strpos( $chosen_shipping, 'local_pickup' ) ) {
                ?>
                <script type="text/javascript">
                    jQuery(document).ready(function () {
                        jQuery('p.woocommerce-shipping-destination').css("display", "none");
    					jQuery('form.woocommerce-shipping-calculator').css("display", "none");
                    });
                </script>
                <?php
            }
            ?>
            <script type="text/javascript">
    
                jQuery('form.woocommerce-cart-form').on('change', 'input[name^="shipping_method"]', function () {
                    var val = jQuery('input[name^="shipping_method"]:checked').val(); // If it changed, then it must be the radio options so check the one that's selected
                    if (typeof val !== 'undefined' && typeof val.match !== 'undefined') {
                        if (val.match("^local_pickup")) {
                            jQuery('p.woocommerce-shipping-destination').css("display", "none");
    						jQuery('form.woocommerce-shipping-calculator').css("display", "none");
                        }
                    }
                });
    
                jQuery(document).ajaxComplete(function () {
                    if (jQuery('input[name^="shipping_method"]').attr('type') === 'hidden') { // There's only one option so check the hidden input field with the value
                        var val = jQuery('input[name^="shipping_method"]').val();
                    } else { // Otherwise, it must be the radio options so check the one that's selected
                        var val = jQuery('input[name^="shipping_method"]:hidden').val();
                    }
                    if (typeof val !== 'undefined' && typeof val.match !== 'undefined') {
                        if (val.match("^local_pickup")) {
                            jQuery('p.woocommerce-shipping-destination').css("display", "none");
    						jQuery('form.woocommerce-shipping-calculator').css("display", "none");
                        }
                    }
                });
    
            </script>
            <?php
        }
    add_action('woocommerce_after_cart', 'remove_shipping_to_cart_local');
    echo '<pre>';
     echo print_r($chosen_shipping, true);
     echo '</pre>';

    Thanks again!

    richterworks

    (@richterworks)

    Thanks for your help so far!
    OK so added the hook but still not working. Is there any way to print the $chosen_shipping to screen or console rather than error log (just while troubleshooting and on the dev site)?

    richterworks

    (@richterworks)

    Wow, thanks for getting back to me so quickly.
    I am trying to help another web company with this. I know that pickup only products are not given another shipping method but I don’t know what causes that message. I will ask and see if they know. They didn’t create the site either so they may not know.

    I am putting the code into a plugin called Code Snippets which is where I put all my php function changes.

    I tried putting the following

    $this->loader->add_action( ‘woocommerce_after_cart’, $public_class, ‘remove_shipping_to_cart_local’ );

    before the rest of the code snippet above but it threw a fatal error. I dont know what I’m doing wrong.
    As for this part: “If you have the code running on cart load, what is the value of $chosen_shipping after it gets defined in these two lines?” I dont know/understand enough to answer this.

    richterworks

    (@richterworks)

    I have the same issue of shipping options appearing in the cart for pickup only products. I have put this code into Code Snippets but its making no change. I have also added a line to try to make the form.woocommerce-shipping-calculator not display and have tried making display none!important. My jQuery is rusty but could sure use some help trying to get this to work.
    https://marchestaging.wpengine.com/cart/ is the URL and Party Boards are Local Pickup only. If I am logged in or have previously entered address info, it automatically shows the options/costs.

    Any help would be greatly appreciated! Thanks in advance.

    Would work better with Gutenbeug if JS call was to a class which we could add to a group block without having to convert to HTML (such as class=”modal-ready”).

    Ok so it worked fine without the id wrap before. I dont know why it stopped showing just the content and added the header footer and menu.

    I tried adding the id to a group block and Gutenberg forced me to convert to HTML. So my code looks like this (below) but now works without adding header and footer.
    <!– wp:html –>
    <div class=”wp-block-group”><div class=”wp-block-group__inner-container” id=”modal-ready”>
    This is a sample popup. Your content would go here.
    </div></div>
    <!– /wp:html –>

    allure,
    Glad I am not the only one. I was about to drop over. It worked before but is broken now. I know the docs say you can wrap in a div with id=modal ready but that doesnt work in Gutenberg.

    Two examples:
    Click on view recipe on this:
    http://webintheworks.com/PhD3/maffe-recipes/

    or any link on these overlay pages
    http://webintheworks.com/Omni/

    Thread Starter richterworks

    (@richterworks)

    OK so this is weird. Just realized my dev site is https, so that is not the issue.

    Thread Starter richterworks

    (@richterworks)

    Pearl,
    It was and I had, but I tried it again. Same result. Interestingly, I tried adding it to the non-https version of the same site on my dev server and had no issue. Looks like an https conflict. Still need to get it solved. Any help you can give would be appreciated.

    Leah

    richterworks

    (@richterworks)

    Same situation. Have always been able to resolve FSCF issues. Not this time. Have used for years and it was working on this site. Then made live on Monday onto newest version of WP and form does not work. Have different email return on dame domain, tried domain email address, gmail and other domain emails as ‘to’ address. Cant say it never works, but it usually doesnt so cant really troubleshoot. Test usually work from the Tool test, but not always. Have even checked, double and triple checked all the items under documentation and even suggestions listed in others’ comments on this page.

    Ach! Please help or I will have to change out.

    I host with Bluehost. Domain at GoDaddy.

    Thread Starter richterworks

    (@richterworks)

    Thanks. I thought David was answering these and I read that he was the security guru. I am sure there is a way through htaccess to protect the file, but I am not sure how to do it and if it would hinder access via the website or through RSVP maker which I am also using.

    I had the same problem (my show stopped at 4 images though I had added til it was 14)and tried everything (short of a different theme cause I was almost done with the site).

    This is what finally worked for me and it makes no sense at all.
    I rearranged the order of the slides by making the last one that was showing (in the live slideshow) the last one in my order (in the admin for the slideshow)and Voila! they all showed up.

    I think it has to do with the original import of images making the last imported the default last slide, which messes things up if you reorder (as I did, though I also added so its possibly the same issue exactly) or add (as andrea_montuori did).

    Thread Starter richterworks

    (@richterworks)

    I take that back. One is and one isnt.
    http://webintheworks.com/Coaching2Dream/ still is not rotating. Oddly, the one in Genesis/Agency is now working but the one just in the new version of WordPress is not.

Viewing 15 replies - 1 through 15 (of 16 total)