[MarketPress eCommerce] Changing text via plugin

I want to change the coupon text in the cart:
"More than one code? That's OK! Just be sure to enter one at a time."
I'm using the Say What plugin. I can't seem to find a way to change the Marketpress texts, not just this one.
Can you help?
Thanks

  • Adam Czajczyk

    Hello Pat

    I hope you're well today and thank you for your question!

    The "More than one code? That's OK!..." text is actually a setting that can be changed directly in MarketPress plugin. To do this, please go to the "Store Settings -> Add-ons" page and click on "Settings" link in "Coupons" line (next to "Enabled" button):

    I assume it might be a similar case with other text that you cannot find with Say What plugin but I'd need to know which ones do you mean to be able to give you detailed directions :slight_smile:

    Let me know please which other texts are you trying to change then.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Pat

    Please ignore my "empty" post above, I posted it by mistake :slight_smile:

    The "empty cart" messages are "fixed" so they come from translation files. The one in "mini cart" can be changed with Say What? plugin, you just need to put an exact text in "original string" field and use "mp" as "Text domain" value.

    The one on a cart page (which originally says: "There are no items in your cart - go add some!") is a bit different. An original text contains a "variable" which is then replaced by the plugin "on the fly" (that's the "go add some" link part) and such strings usually cannot be addressed by Say What? and similar plugins.

    The workaround would be to use a small snippet of code. Take a look below please:

    <?php
    function mp_replace_empty_cart_text() {
        ?>
        <script type="text/javascript">
        jQuery(function($) {
            $('.mp_cart_empty_message').html( 'YOUR EMPTY CART MESSAGE HERE' );
        });
        </script>
        <?php
    }
    add_action('wp_footer', 'mp_replace_empty_cart_text');

    To apply it to your site:

    - create an empty file with .php extension (e.g. "mp-replace-empty-cart-text.php")
    - using a clean text editor (such as e.g. Notepad++, Sublime or similar or just editor in cPanel's File Manager) copy and past that code from above to your file
    - replace

    YOUR EMPTY CART MESSAGE HERE

    with the text you want to use (it can also contain HTML tags if you want)

    - save the file and upload it to "/wp-content/mu-plugins" folder of your site; if there's no "mu-plugins" folder inside "wp-content" folder, just create it

    There's no need to activate the plugin, it will automatically execute the small JS code that will replace the text.

    I hope that helps :slight_smile:

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.