[Support request] Change the WC single product minus button

Home Forums Support [Support request] Change the WC single product minus button

Home Forums Support Change the WC single product minus button

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1641007
    David R

    I find it peculiar that the plus and minus buttons on the WC single product page are added by javascript, but I suppose there is some good reason to go that route over php and templates.

    However, because those buttons are added that way, there doesn’t appear to be a good way to change the characters used in those buttons. It would be nice to change those characters to up and down arrows/chevrons. Also, the use a regular hyphen for minus makes it too small, in my opinion. An EN dash or EM dash would be more suitable.

    Is there something I’m missing that would make a change to these characters easy?

    #1641120
    Elvin
    Staff
    Customer Support

    Hi there,

    The quantity buttons are taken directly from the WooCommerce plugin. The theme doesn’t control what is being displayed. It’s from woocommerce/templates/global/quantity-input.php.

    As this is a third party plugin, it’s best to ask the plugin developer on what’s the best practice on which to customize this particular feature.

    I believe some third party plugins are offering this feature. Consider trying them out. 🙂

    A wise man once said:
    "Have you cleared your cache?"

    #1641424
    David R

    GP-Premium woocommerce/functions/js/woocommerce.js

    // Add plus and minus icons
    box.parent().addClass( 'buttons-added' ).prepend('<a href="javascript:void(0)" class="minus">-</a>');
    box.after('<a href="javascript:void(0)" class="plus">+</a>');

    That’s where it’s coming from.

    #1641688
    David
    Staff
    Customer Support

    Hi there,

    that code is not currently filterable, but we are reviewing Woo options for a future update and we’ll be looking at this function.

    JS was used, as we don’t like replacing woo templates so we can maintain compatibility.
    The feature can be disabled in Customizer > Layout > Woocommerce. Which would leave you with the default Woo layout.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.