4

Here my code use in our local environment it's working but in live site not working When i click image gif image not open it live site.but in localhost it's working properly

$baseDir = Mage::getBaseDir('media');
  $file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
  $path = str_replace($baseDir . DS, "", $file);
  return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);
  • What is the error you are getting in live? Can you check if returns correct url. – Sukumar Gorai Sep 19 '18 at 14:22
  • i have the same problem. Don't get any error message but GIF image is not working on detail page. I have also used same code and it's working fine in localhost but not working in live site. – Sarfaraj Sipai Sep 24 '18 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.