Skip to content

Instantly share code, notes, and snippets.

@jasontipton
Created February 8, 2015 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasontipton/0e30d8d2e35a06f31e54 to your computer and use it in GitHub Desktop.
Save jasontipton/0e30d8d2e35a06f31e54 to your computer and use it in GitHub Desktop.
HTML Phone Link in Magento
<a href="tel:<?php echo preg_replace('/[^0-9]/','',$storePhone = Mage::getStoreConfig('general/store_information/phone')); ?>"><?php echo $storePhone = Mage::getStoreConfig('general/store_information/phone'); ?></a>
@jasontipton
Copy link
Author

Drop this link in a Magento template file to display the store phone number. The link will create an HTML telephone anchor for call capable devices to easily touch/click to call the store. Requires a phone number to be entered in the Magento admin System -> Configuration -> General -> Store Information -> Store Contact Telephone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment