Skip to content

Instantly share code, notes, and snippets.

@markshust
Created April 24, 2013 14:26
Show Gist options
  • Select an option

  • Save markshust/5452536 to your computer and use it in GitHub Desktop.

Select an option

Save markshust/5452536 to your computer and use it in GitHub Desktop.
public function getMainImage()
{
$mainImage = $this->getSkinUrl('images/pd/bettercontact/contacts-main-image.jpg');
//Set main image from system config if it exist
if ($image = Mage::getStoreConfig('contacts/contacts/main_image', Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID)) {
$mainImage = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'contacts' . DS . $image;
}
return $mainImage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment