Jump to content


information

Create An Update-Safe Change To "buy Now" Button

exchange Buy Now templates

4 replies to this topic

#1 Ray @sixfourweb

Ray @sixfourweb

    Advanced Member

  • Members
  • Others: Toolkit
  • PipPipPip
  • 109 posts
  • LocationNorth Carolina

Posted 09 March 2014 - 04:41 PM

Is there a way to change the "Buy Now" button in a way that is persistent via the exchange templates? I"m building a donation site, where the method of using the Free Offer add-on is viable, however I need to be able to prompt specific dollar amounts in another donation option, as a result the "Buy Now" is present.

Here's a link to the demo site. http://leo.thesinglepreneur.com/make-a-donation/

You can see that for the one-time donation, where there is no specified or suggested donation amount, the transaction button is "Donate Now". In the Monthly donation where the donor is prompted to select a suggested a donation amount (which is greater than $0.00), the transaction button reads "Buy Now".

Is it possible to make a create a new template for inclusion into the child theme folders that would survive updates to Exchange?
SixFour Web Design creates effective WordPress websites for small businesses as well as non-profit organizations.

#2 Ray @sixfourweb

Ray @sixfourweb

    Advanced Member

  • Members
  • Others: Toolkit
  • PipPipPip
  • 109 posts
  • LocationNorth Carolina

Posted 14 March 2014 - 12:18 PM

Bueller? Bueller? Anyone?
SixFour Web Design creates effective WordPress websites for small businesses as well as non-profit organizations.

#3 Elise Alley

Elise Alley

    iThemes Support

  • Administrators
  • Others: All Plugins, All Themes, Members, Moderators, Toolkit, Webdesign
  • 5,224 posts
  • LocationOklahoma City, OK

Posted 14 March 2014 - 02:11 PM

Hi Ray,

I apologize that your post was missed originally.  

Try adding this code to the bottom of your child theme's functions.php file before the closing ?> and see how it works for you:

function my_translated_text_strings( $translated_text, $untranslated_text, $domain ) {

		$translated_text = $untranslated_text;
   
		if ( 'LION' === $domain || 'it-l10n-ithemes-exchange' === $domain ) {
				
				switch ( $untranslated_text ) {
						case 'Buy Now' :
								$translated_text = 'Donate Now';
								break;
				}
		}

		return $translated_text;
}
add_filter( 'gettext', 'my_translated_text_strings', 10, 3 );
add_filter( 'ngettext', 'my_translated_text_strings', 10, 3 );

Give that a try and let us know how it goes.  And I apologize again that your post was missed previously.

Thanks,

Elise

#4 Ray @sixfourweb

Ray @sixfourweb

    Advanced Member

  • Members
  • Others: Toolkit
  • PipPipPip
  • 109 posts
  • LocationNorth Carolina

Posted 16 March 2014 - 05:41 PM

Elise - Thanks it works.  Can you explain the highlighted conditional?

 if ( 'LION' === $domain || 'it-l10n-ithemes-exchange' === $domain )

The site is currently on a development server. When I move to production, what does the 'LION' in the code represent?
SixFour Web Design creates effective WordPress websites for small businesses as well as non-profit organizations.

#5 Elise Alley

Elise Alley

    iThemes Support

  • Administrators
  • Others: All Plugins, All Themes, Members, Moderators, Toolkit, Webdesign
  • 5,224 posts
  • LocationOklahoma City, OK

Posted 17 March 2014 - 02:31 PM

Hi Ray,

LION is just an internally used code.  The code I gave you will work both on development and live sites.  If you look into the Exchange files, you'll see it called throughout the code.  

Let us know if you have any additional questions.

Thanks,

Elise



Reply to this Topic


ATTENTION
If this topic is marked RESOLVED or INFORMATION, or if you are NOT experiencing EXACTLY the same issue, please start a new topic to provide the details of your problem. If the solution provided doesn't work for you, you should start a new topic. If you feel this thread contains relevant information, you may include a link to it in your new topic. To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. When posting your question or request on the forum, please be as concise and specific as possible. The shorter and more to the point you can make your request, the better.

For BackupBuddy related issues, be sure to include the status log from your most recent backup.

CLICK HERE to start a new topic in the Exchange ecommerce plugin forum.


  



Also tagged with one or more of these keywords: information, exchange, Buy Now, templates

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users