- This topic has 2 replies, 2 voices, and was last updated 13 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Customizing "Buy Now" button text
Tagged: button, buttons, buy now button text
I know you can upload a button image but is there a way to customise the text on a button? Instead of having just the word “Buy Now” I would prefer “Buy Now (£9.95)” or even a customised version per button.
This forum post kind of helps…
https://support.tipsandtricks-hq.com/forums/topic/change-text-on-add-to-cart-button
But the file structure of the plugin has obviously changed since it was posted and I cannot see how to do it now.
If you just want to change the text of the button then this post will help:
However, if you are looking to add the price amount to the “Buy Now” button text programmatically you will need to tweak the code.
Open the “eStore_misc_functions.php” file and search for the following line of code:
$button_type .= '<input type="submit" class="eStore_buy_now_button" value="'.WP_ESTORE_BUY_NOW.'" />';
Once you find it replace it with the following code:
$custom_text = 'Buy Now (£'.$ret_product->price.')';
$button_type .= '<input type="submit" class="eStore_buy_now_button" value="'.$custom_text.'" />';
Thanks for the help.