• Hello, kindly advise how to change the ‘add to cart’ text in the button on desktops to ‘get quote’ and how to change the mobile cart icon to a button stating ‘get quote’ when a customer is on the product customiser page. I have tried a number of plugins but none are working with this plugin. Thank you.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi there,

    You can change the Add to cart label using the following filter:

    add_filter( 'mkl_pc/add_to_cart_button/label', 'sproutpod_add_to_cart_label' );
    function sproutpod_add_to_cart_label( $label ) {
        return 'Get quote';
    }

    Then on mobile, you can use this CSS to change the display:

    @media (max-width: 660px) {
        .mkl_pc .mkl_pc_container footer button.configurator-add-to-cart svg {
            display: none;
        }
        .mkl_pc .mkl_pc_container footer button.configurator-add-to-cart span {
            display: inline-block;
        }
        .mkl_pc .mkl_pc_container footer button.configurator-add-to-cart:not(.edit-cart-item) {
            background-color: var(--fs-color-primary) !important;
        }
    }

    Marc

    Thread Starter designmedia1234

    (@designmedia1234)

    Hi Marc,

    Thank you for the feedback. The code for mobile worked perfectly for changing the icon to a button. The text on both mobile and desktop still is displaying as ‘add to cart’ and not ‘get quote’. Code was added to the CSS customizer in the child theme.

    Thanks

    Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi there.

    The provided code is PHP, so cannot be added to the CSS customizer:

    add_filter( 'mkl_pc/add_to_cart_button/label', 'sproutpod_add_to_cart_label' );
    function sproutpod_add_to_cart_label( $label ) {
        return 'Get quote';
    }

    Instead, it should be added to one of these places:

    • child theme functions.php
    • a mu-plugin
    • not great but also possible, using a code snippet plugin

    Marc

    Thread Starter designmedia1234

    (@designmedia1234)

    Hello Marc,

    The code has been added to the child functions.php but the ‘Get Quote’ text is not appearing on either desktop or mobile. I disabled all possible plugins that may be causing a conflict but still did not work.

    Thanks

    Thread Starter designmedia1234

    (@designmedia1234)

    Hello Marc,

    Do you have an update on the above. The code has been added to the child functions.php but the ‘Get Quote’ text is not appearing on either desktop or mobile. I disabled all possible plugins that may be causing a conflict but still did not work.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change ‘add to cart’ text and mobile cart icon’ is closed to new replies.