In a terminal window:
$ export XDEBUG_CONFIG = "idekey=PHPSTORM" (hit enter)
Back to debugging!
In a terminal window:
$ export XDEBUG_CONFIG = "idekey=PHPSTORM" (hit enter)
Back to debugging!
If your not getting your Category pages to show up its probably because you have not set your Store Root Category.
System => Manage Stores => Select your store to edit and then set it there.
I wasted 4 hours today wondering why my categories were not showing up.
Here is the scenario, I was using the topMenu for my main navigation. I had some custom things being displayed in the UL that was not a catalog/category. It was hard coded into my version of page/html/topmenu.phtml
$module = Mage::app()->getRequest()->getModuleName();
// Mage_Page_Block_Template_Links
$block = Mage::getBlockSingleton('page/template_links');
$layout = $block->getLayout();
$links = $layout->getBlock('top.links');
$header = Mage::getBlockSingleton('page/html_header');
?>
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
file: app/etc/modules/Russellalbin_Catalog.xml
<?xml version="1.0"?>
<config>
<modules>
<Russellalbin_Catalog>
<active>true</active>
<codePool>local</codePool>
</Russellalbin_Catalog>
</modules>
</config>
If your trying to do a typical "Rewrite" of a Magento Abstract class, you can stop now and save yourself some headaches. Magento Abstract classes are not something you can do a rewrite on.
The only way to get it to work is to make a copy of the file in your local folder of app/code/local
Here is how I did an overload of Mage_Rule_Model_Abstract:
Step 1 Create a file app/code/local/Mage/Rule/Model/Abstract.php
Step 2 copy the contents from app/code/core/Mage/Rule/Model/Abstract.php and paste it into our new file we created on Step 1.
Step 3 test to see if its using our file instead of the core file, if you have a debugger, like the one in PHPstorm but a break point and execute the code!
You should now be all set and using our version of the abstract class instead of the core file, now you can edit it to suit your needs, like I did for allowing a negative number in the shopping cart rules.
If you have ever needed to create a shopping cart price rule but the value needed to be negative, Magento prevents this by default. You may want this to create an extra fee based on some rules like if there is a certain sku in the cart, or whatever.
To overcome Magento's check to see if that number entered is negative we have to overload one magento core file, and create a rewrite of another. Hold on to your hat, here we go.
Step 1 Create a file app/code/local/Mage/Rule/Model/Abstract.php
Step 2 copy the contents from app/code/core/Mage/Rule/Model/Abstract.php and paste it into our new file we created on Step 1.
Step 1 Create a module instantiation file app/etc/modules/Russellalbin_Adminhtml.xml
If you ever needed to create a custom Customer tab and put some information there, as well as submit a form, this should give you enough information to accomplish this task.
Create Module declaration
app/etc/modules/Russellalbin_Customertab.xml
<?xml version="1.0"?>
<config>
<modules>
<Russellalbin_Customertab>
<active>true</active>
<codePool>local</codePool>
</Russellalbin_Customertab>
</modules>
</config>
Create the module configuration file
$configuration = new Zend_Config_Ini(
APPLICATION_PATH.'/configs/application.ini',
'development'
);
$host = $configuration->resources->db->params->host;
$pass = $configuration->resources->db->params->password;
$user = $configuration->resources->db->params->username;
$dbname = $configuration->resources->db->params->dbname;
$db = Zend_Db::factory('Pdo_Mysql', array(
'host' => $host,
'username' => $user,
'password' => $pass,
'dbname' => $dbname
));
Step 1: instal postfix
sudo apt-get install postfix
Step 2: install mailutils
sudo apt-get install mailutils
Step 3: Test the email system
echo "test" | mail your@email.com
Step 4: Update the server:
sudo apt-get upgrade
Step 5: Install all the required PHP to make magento run
Step 1: SSH into both servers
Step 2: Install mysql
sudo apt-get install mysql-server -y
Step 3: Master Server update to my.cnf. If your my.cnf has
#server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log
Simply remove the # and then restart your mysql server and if not, just add them it should look like this: