How Do I Change Default Text

Hey Guys,
I'm setting up MarketPress for a service-oriented business and I need to change some of the default text.

First, since this is a service-oriented business, I'd like to replace the word "product" with the word "service" (and "products" with "services") on whatever PAGES make reference to it. Similarly, I'd like to replace the word "shipping" with "customer". So that, for example, headings that currently read "Shipping Information" read "Customer Information" in the future.

The changes need to be permanent so they aren't overwritten by future updates.

Thanks

  • 3SixtyEvolve
    • New Recruit

    Hi @nycwebworks

    Greetings from the WPMU DEV Support Team and thank you for being a member of our community.

    The MarketPress Plugin can be translated by using the provided .po file. You can find the file in the downloaded zip file of the Plugin:

    marketpress/marketpress-includes/languages/mp-default.po

    As you rightfully mentioned, it is best not to edit plugin raw files as updates are coming out every few weeks and you will overwrite any changes that you made to those files if you upgrade. To know more on translating a plugin you can read about it here:

    http://codex.wordpress.org/Translating_WordPress
    http://www.lost-in-code.com/platforms/wordpress/wordpress-translate-a-plugin/

    All the best and let me know if you need any further assistance.

    Gina

  • 3SixtyEvolve
    • New Recruit

    @nycwebworks

    I will go ahead and resolve this thread, but please don't hesitate to reopen it if you still require additional feedback from our Support Team. Just select the 'Mark as Not Resolved (re-open)' box below the post area (otherwise we might miss your new post).

    All the best with your site setup and have a great weekend!

    Gina

  • NYCWW
    • Site Builder, Child of Zeus

    Ok, the tutorial you linked to provided instructions for translating a files into another language. It's not clear how the instructions are applicable here.

    First I tried following the tutorial to create an English translation of the mp-default.po file. This did not have any effect.

    Next I tried using the POEDIT tool to edit the mp-default.po file. This didn't have an effect either.

    I'm drawing a blank Am I supposed to be editing the mp-default.po or creating a translation of it?

    If I'm translating, should I be placing the new english.po file in the plugins/marketpress/marketpress-includes/languages/ folder with the other language files or in the plugins/marketpress/ folder as was the case in the tutorial? Do I need to modify wp-config to get it to recognize the english.po file?

    Please advise.

  • 3SixtyEvolve
    • New Recruit

    Hi @nycwebworks

    It can be confusing, I know! Let me give you a bit more assistance with this. :slight_smile:

    I use Poedit to translate my plugins and themes. Now you don't necessarily have to translate to another language. If it mentions 'store' on the plugin and you want it to say 'shop', then this is the easy way to change it, without affecting core files that would be changed after upgrading.

    I found some good online tutorials (much better than the previous links I provided :slight_smile: - hope these helps... Enjoy them over a coffee!

    Localize & Translate Your WordPress Themes
    Localizing and Translating WordPress Plugins
    Localizing and Translating WordPress Plugins
    Translating Your WordPress Theme Using .Po & .Mo Files

    Let me know if you need any further assistance.

    Gina

  • NYCWW
    • Site Builder, Child of Zeus

    Thanks Gina.

    I was able to resolve the issue in almost all of the instances. There is still one place where the "shipping" reference is still prominently displayed and it does not appear the text is capable of being translated. It's the "Shipping Form" page (see attachment).

    The Shipping Form page seems to be dynamically generated by MarketPress. Since it doesn't appear in the list of pages, I can not change the page title or slug using the page/post editor. I'm completely stumped.

    Asking buyers to provide "shipping" information during the checkout process for a service doesn't make sense. Unless properly labeled, it seems like an unnecessary step and can lead to confusion as to whether I'm doing the work or sending them something that will require extra effort on their part. In either case, this is a potential conversion killer for me.

    Please tell me exactly how to change the page title in question (I'm less concerned about the slug).

    Thanks again for all your help on this.

  • 3SixtyEvolve
    • New Recruit

    Hi @nycwebworks

    You can turn of the shipping function here:

    Admin Dashboard » Products » Store Settings » Shipping and then under 'Select Shipping Method' select 'No Shipping'. This should remove the shipping information page completely on checkout.

    Let me know if this helps :slight_smile:

    Gina

  • NYCWW
    • Site Builder, Child of Zeus

    To clarify, setting the option to "No Shipping" option does not resolve the problem. It does not turn off the shipping information form.

    The details collected on this page are required for the PayPal (or whatever gateway you happen to be using) regardless of whether you are selling physical products, downloads or services.

    The problem is the page heading, not the page itself.

  • 3SixtyEvolve
    • New Recruit

    Hi @nycwebworks

    As you can see, we are very eager to solve this, so much so that we missed that key piece of information, thank you for reminding us.

    The problem is the page heading, not the page itself.

    Let me have a look if there's a way to change it. I will revert back to you later, once I'm online again.

    All the best and talk soon!

    Gina

  • NYCWW
    • Site Builder, Child of Zeus

    Good morning, @GinaB. Just checking to make sure you haven't forgotten about me. I can only imagine how many threads you guys respond to a day.

    If I don't hear from you by the end of the day, I'll resolve this thread and open a new one.

    Thanks

  • PC
    • WPMU DEV Initiate

    @Nycwebworks, Till Gina checks it and responds to the thread, I am trying to do a test install and will do some R&D to see if I can get it fixed for you.

    I understand that at times it takes a long time for an issue to get fixed, but I assure you, if something is possible, it will be done @ WPMUDEV :slight_smile:

    Cheers
    PC
    will be back soon

  • PC
    • WPMU DEV Initiate

    Heya NWW and GWBB, I tried editing plugins > marketpress > marketpress-includes > template-functions.php as per the above link sent by Gina, but that did not help me on my test install which I did to help nycwebworks.

    It seems that plugin itself is creating a shipping page with title Shipping Information which if, can be edited can fix the issue for him.

    Here is what it says in the source

    <div class="" id="post-">
    
    <h1 class="post-title">Shipping Information</h1>

    Now, the question is, where do we edit this ?

    Cheers
    PC

  • NYCWW
    • Site Builder, Child of Zeus

    @PC - Thanks for looking into this. I got the same results independently when following the instructions @GinaB linked to.

    However, through a little trial and error (and a good old-fashioned multi file text search using TextWrangler), I was able to find the code! It's around line 1428 of the marketpress.php file.

    I changed:

    switch ($wp_query->query_vars['pagename']) {
          case 'cart':
            if ($wp_query->query_vars['checkoutstep'] == 'shipping')
              return $this->download_only_cart($this->get_cart_contents()) ? __('Checkout Information', 'mp') : __('Shipping Information', 'mp');

    To:

    switch ($wp_query->query_vars['pagename']) {
          case 'cart':
            if ($wp_query->query_vars['checkoutstep'] == 'shipping')
              return $this->download_only_cart($this->get_cart_contents()) ? __('Checkout Information', 'mp') : __('Checkout Information', 'mp');

    This is a obviously a workaround and I'll have to make the change each time the plugin is upgraded, but at least it's a small change.

    As for the root of the problem, the code above appears to be a switch that determines which version of the text to display ("Checkout Information" or "Shipping Information"). Unfortunately, the switch only kicks in when there is a download. In my case, there is nothing to download so it defaults to the shipping text. I'm praying the good folks at WPMU Dev see the wisdom in adding an option for selling services in the near future. At a minimum, they could tweak the logic so that it is slightly more...ummm...logical. Instead of determining whether or not to show the shipping text (here and elsewhere) based on whether or not "download only" is selected, the logic should be basing the decision on whether or not "no shipping" is selected.

    Thanks again for your help @PC... Sending some rep your way.

  • PC
    • WPMU DEV Initiate

    @nycwebworks,

    Glad that you got it sorted out.

    This is a obviously a workaround and I'll have to make the change each time the plugin is upgraded, but at least it's a small change.

    You can login to FTP and change the permissions of marketpress.php to readonly. I think that might prevent it from getting re-written in case of any updates.

    But as its a minor change, you may want to note it in your little black book and remember to change it :slight_smile:

    BTW : Thanks for the rep points :slight_smile:

    Cheers
    PC

  • 3SixtyEvolve
    • New Recruit

    Hi @nycwebworks

    I'm so glad you got sorted with the help of PC. As you can see, we have an active community here and support is always given, whether from the support team or from members.

    If you need any further assistance, please don't hesitate to be in touch.

    Have a good weekend and all the best!

    Gina

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.