-
AuthorPosts
-
October 3, 2015 at 1:30 am #513080
Hi there,
I’ve changed the text of the ‘out of stock’ message in the shop, and I’d like to add an email link in that text so customers can email us to check availability of an out of stock item.
Any idea how I can add a clickable email link to the out of stock message text?
Thanks!
URL: http://goodrotations.co/shop/bicycles/adventure-bicycles/all-terrain/surly-wednesday/
October 3, 2015 at 10:46 pm #513245Hi nokostudio!
use normal html code, for example:
<a href="mailto: (Email address hidden if logged out) ">Fritz Eierschale, (Email address hidden if logged out) </a>Best regards,
AndyOctober 4, 2015 at 1:14 am #513252Perfect, thanks!
October 5, 2015 at 4:17 am #513447Hello again,
Odd, I added the link, which worked for a while, but now the out of stock message show the html code instead of the active link:
http://goodrotations.co/shop/bikepacking-adventure/eating-drinking/msr-whisperlight-universal/
Any idea why that might be happening?
Thanks!
October 5, 2015 at 9:51 am #513572Hi,
Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.
Thanks,
RikardOctober 5, 2015 at 10:15 am #513580Hi there, temp user access for you.
Thanks!
October 6, 2015 at 9:58 am #514244Hi!
Please add this in the functions.php file:
/** * Change In Stock / Out of Stock Text */ add_filter( 'woocommerce_stock_html', 'woocommerce_stock_html_mod', 10, 1); function woocommerce_stock_html_mod($availability_html) { global $product; // Change Out of Stock Text if ( $product->stock_status == 'outofstock' ) { $availability_html = "Sorry, sold out! <a href='mailto: (Email address hidden if logged out) '>Email us</a> for availability"; } return $availability_html; }EDIT: We modified the code a bit.
Regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.
