Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Changing index.php or adding some new file on the root folder of project is not recommended.
  2. Git can help you to customize your project on local instance without bothering any team members.
  3.  
  4.  
  5. file .git/info/exclude
  6.  
  7. ```
  8. /index2.php
  9. /test.php
  10. ```
  11.  
  12. edit index2.php line ~ 73-75
  13. ```php
  14. // if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
  15. Mage::setIsDeveloperMode(true);
  16. // }
  17. ```
  18.  
  19. edit magento config for nginx server, change all "index.php" to "index2.php".
  20.  
  21. add test.php for testing some feature easily, that is example file.
  22. ```php
  23. <?php
  24. error_reporting(E_ALL | E_STRICT);
  25. define('MAGENTO_ROOT', getcwd());
  26. require_once MAGENTO_ROOT . '/app/Mage.php';
  27. Mage::setIsDeveloperMode(true);
  28. ini_set('display_errors', 1);
  29.  
  30. umask(0);
  31. Mage::app(1);
  32. // Mage::run('', 'store');
  33. $product = \Mage::getModel('catalog/product');
  34. $product->load((int) $productId);
  35.  
  36. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement