• When you edit a configuration using the button in the cart or checkout, the configurator has an additional button that says ‘edit item in cart’. I find that text a bit confusing and think it should say something more like ‘update item in cart’ or ‘save and update’. Is there a way to change the text that is displayed (using a hook?)?.

    Also, would be great to be able to edit what the ‘add to basket’ button says when editing a configuration too. Maybe to something like ‘add new item to basket’ (or similar).

    I feel this would make it easier for the user to know if they are updating the existing item that they previously added or if they are adding a completely new item.

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

    (@marcusig)

    Hi there,

    You can use the filter mkl_pc/add_to_cart_button/label to change the Add to basket label.

    I’ll add one for the Edit item in cart.

    Marc

    Thread Starter 3quid

    (@3quid)

    Thank you for this. Is there any chance you can give me the code? I’ve tried to use this but not completely competent at writing php myself 🙁

    Plugin Contributor Marc Lacroix

    (@marcusig)

    Sure.
    Here it is:

    add_filter( 'mkl_pc/add_to_cart_button/label', function( $label ) {
        if ( isset( $_REQUEST[ 'edit_config_from_cart' ] ) ) {
             // Use the alternative label if edit_config_from_cart is set
             return 'Add new item to basket';
        }
        // Otherwise, use the original label
        return $label;
    } );
    Thread Starter 3quid

    (@3quid)

    Thank you so much. Would be great if all 3 of these could be controlled in the settings.

    Buy button
    Buy New Edit button
    Update Basket button

    Thanks for your awesome quick replies!

    Hi Marc,

    did you have a chance to add the “Edit item in cart” already? If possible we would love to change this and the “Edit configuration” link in the plugin itself instead of installing a separate translation plugin.

    Thanks and best regards!

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

The topic ‘Edit configuration button title’ is closed to new replies.