Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1081961

    cwallace
    Participant

    Greetings, X Team…

    Actually, this is two bugs rolled into one.

    #1: I was seeing two “Apply Coupon” buttons on the Cart page. I traced it down to /framework/functions/global/plugins/woocommerce.php, function x_woocommerce_cart_actions(), line 369:

    add_action( ‘woocommerce_cart_actions’, ‘x_woocommerce_cart_actions’ );

    I commented out this line and now there’s only one Apply Coupon button. 🙂

    #2: I found it…well, shall we say “irritating” to discover that after creating the appropriate directory structure in my child theme (see path mentioned above) and copying the modified woocommerce.php file to that new directory, that it had NO EFFECT. I ended up having to OVERWRITE the original source file, which of course got clobbered when I updated to 4.6.0 (and THAT is why we create child themes, boys and girls!) I had no trouble re-doing it since it was still fresh on my mind. The fact that I couldn’t override this file is the real point here — unless of course it should actually be placed in a different directory, and if that’s the case, there oughta be a note in the file.

    Best regards,
    Chris

    #1082507

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! I have tested this in a similar setup as follows.
    – WordPress v4.5.3
    – X theme v4.6.0
    – Cornerstone v1.3.0
    – WooCommerce v2.6.2

    But I could not replicate this issue. Could you please provide us with more information on how to replicate this issue, your current stack using etc, so that we can look into this.

    Thanks!

    #1083330

    cwallace
    Participant

    I remember now how all this started — I’ve slept several times since this all began! 🙂

    The coupon code text field was set to 100% width, forcing the “Apply Coupon” button down to the next line. I found this to be aesthetically displeasing, since the “Update Cart” button followed on yet the next line down as well. The whole thing was quite, well, ugly.

    So, I added some CSS to reduce the width of the text field, set it to “inline” and made the button “inline” as well. This had the effect of placing the button to the right of the text field, and that’s when the second “Apply Coupon” button appeared.

    Here’s the CSS I used (local to just the cart page via the “add to page CSS” plugin). There’s some additional CSS here that doesn’t apply to this problem, but it shouldn’t interfere with your testing. In this case, it’s just the first few definitions that count.

    Hopefully this will let you duplicate the situation.

    Chris

    =====================================

    .woocommerce .cart .actions .coupon {
    padding: 15px 0 !important;
    }

    .woocommerce .cart .actions .coupon label {
    display: block;
    }
    .woocommerce .cart .actions .coupon input[type=”submit”] {
    display: inline !important;
    padding: 6px 16px !important;
    margin-left: 10px !important;
    }
    .woocommerce .cart .actions .coupon input[type=”text”] {
    width: 80% !important;
    display: inline !important;
    }
    .woocommerce .wc-proceed-to-checkout {
    padding: 15px !important;
    font-size: 16px !important;
    line-height: 16px !important;
    }
    .woocommerce .wc-proceed-to-checkout br {
    display: none;
    }
    .woocommerce .wc-proceed-to-checkout .button {
    font-size: 16px !important;
    line-height: 16px !important;
    margin: 0 !important;
    display: inline;
    vertical-align: middle;
    }
    #shipping_method li input[type=”radio”] {
    float: none !important;
    display: inline !important;
    }
    #shipping_method li label {
    float: none !important;
    display: inline !important;
    font-weight: normal !important;
    }
    #shipping_method li br {
    display: none;
    }

    #1084181

    Lely
    Moderator

    Hi Chris,

    We’re sorry you’re having this issue and thank you for giving us your custom CSS. To assist you with this issue, we’ll first need you to provide us with your URL where this issue exists. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.