0

I m using two theme...one is for desktop and one is for mobile... In both file one class name is same in his lib the class name is mobile_detect ...so when i m using both theme i found one error....Fatal error: Cannot redeclare class Mobile_Detect in E:\xampp\htdocs\gala_theme_magento-9\lib\em\Mobile_Detect.php on line 34...

SO i need to know that without renaming class name how can i resolved this issue...

1 Answer 1

1

Actually, your Theme should imho not add something to the lib folder... This should be done by a custom extension that must (and can) only be installed once and can be disabled independently from the theme.

To resolve your issue, find the place where the second file (that tries to define the class a second time) is included and remove this. Again, not the "right" way though.

1
  • I find that and also rename...but when its goes on mobile..than both theme called....but error is resolved.....
    – Deepak Rai
    Apr 2, 2015 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.