Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter battleplan

    (@battleplan)

    Ah, that makes perfect sense. I won’t be using Guttenberg, so I hope the plug-in continues to work with non-Guttenberg layouts, as well. It’s a great tool! Thanks.

    Thread Starter battleplan

    (@battleplan)

    Hi. I don’t use a gallery plug-in…. the link I sent you simply uses the WordPress default gallery.

    do_shortcode(‘[gallery link="file" type="rectangular" size="thumbnail" order="ASC" orderby="menu_order" columns="0" ]‘);

    That being said, adding .gallery$$A to the custom grouping selectors seemed to have worked! The gallery is functioning as expected now.

    If you don’t mind my asking, why did this work? And, will this exact solutions work on another site that uses this plug in, as well?

    Thank you!
    Glendon

    I have installed latest version of plug-in and latest version of WP. Cleared cache. The menu does not display in iPad or the iPhone. Check https://garlandsindoorcomfort.com

    Thread Starter battleplan

    (@battleplan)

    You nailed it.

    I didn’t think that was the problem, because I had written an if/then condition on the page itself to ignore the checkout shortcode if cart was empty. The problem is… that code was never being read because the redirect happened before it.

    So….. I solved it using this code in my function.php file….

    add_action( ‘init’, ‘woocommerce_empty_cart_redirect’ );
    function woocommerce_empty_cart_redirect() {
    global $woocommerce;
    if ( $_SERVER[“REQUEST_URI”] == “/checkout/” && !sizeof( $woocommerce->cart->get_cart() )) {
    wp_redirect( get_permalink( wc_get_page_id( ‘shop’ ) ) );
    exit;
    }
    }

    If someone with an empty cart tries to view the cart, it simply redirects to the shop page.

    Another possibility would be to create a new page, and use the CART shortcode ONLY. Redirection to this would display the empty cart on that condition, and the cart/checkout combo page for all other carts.

    I appreciate your help. I doubt I ever would have figured this out on my own!!

    Thread Starter battleplan

    (@battleplan)

    Oh– because I just combined the 2 shortcodes on the checkout page, when you switch to the Twenty Fourteen theme, it still works because the changes are not made in the theme, but on-page.

    The only difference, when you use Twenty Fourteen, you see the cart at top and then repeated at the bottom (as is standard on checkout page). In my theme, I have made the 2nd cart display:none as it is not necessary to review it again, with it being at the top.

    Thread Starter battleplan

    (@battleplan)

    I do not use a 3rd party theme, rather one I have developed myself over time for the websites I create.

    I did not like having a separate cart page and checkout page (as it just added one more click to the process for people just buying one item, which is going to be the bulk of this website’s customers).

    So I combined the cart and checkout pages on to one page … and I did so by just including both short codes on one page, like this:

    <h2>Your Order</h2>
    [woocommerce_cart]
    [woocommerce_checkout]

    I don’t THINK this is the problem, however… because I have tested it with just the cart shortcode and just the checkout shortcode, and the problem occurs regardless.

    The redirect seems to be happening before the page even loads at all… before these shortcodes would even be processed. I have even added a forced redirect in the functions.php file that looks for the cart page, checks if it’s empty, and if so redirects to a totally different page. But this code never fires either.

    It’s as if, the moment you click the cart button with an empty cart, it never even tries to load the page. I am baffled.

    Thread Starter battleplan

    (@battleplan)

    No worries — I figured the settings would probably reset, so I was prepared for it. lol

    In General Settings, I have both the WordPress Address and Site Address set to http://urtfc.org (no www). That is how it always has been.

    I disabled all plug-ins … including the few WooCommerce add-ons I have such as Product Shipping and Name Your Price. With everything disabled, it still has the problem. I went through system status to make sure everything there checks out to be the newest version.

    I thought I had Apache, but I also know I’ve seen it’s a Windows server (as opposed to Linux) … but I know very little about all that. I do know that I have .htaccess files and not web.config.

    Thread Starter battleplan

    (@battleplan)

    Ugh… I re-installed WordPress, I deleted Woocommerce and re-installed … it lost all my settings which I had to go recalibrate… and of course, the problem still happens.

    Thread Starter battleplan

    (@battleplan)

    Thanks for the response. I followed your instructions. I renamed the old .htaccess file, clicked “Save” under permalinks, and WP created a new .htaccess file …. which looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    However, this did not solve the problem. The symptoms are the exact same as before.

    Now– I’m a designer, not a technical person … but I do host with GoDaddy and my server is a Windows server. I am not sure what the difference would be between mine and Apache.

Viewing 9 replies - 1 through 9 (of 9 total)