Calcetines Extreme

Calcetines Extreme
Take care of you using the best socks

Thursday, October 17, 2013

[magento] Remove title from one cms page

We need to remove the title that is above the cms content for a specific page, and not for the rest.

Go to yout CMS page in backoffice and on "design" -> "custom design" -> "Custom Layout Update XML"
add the folowing code:

<remove name="page_content_heading"/>

Monday, October 7, 2013

How to activate "Maintenance Mode" in #Magento


You need to hide or block the access to your Magento web site, but that block need to be conditional for only some IP address.


Since the version 1.4 is possible to activate a Maintenance Mode just creating a file called maintenance.flag in your root directory but that is not really useful at all.

You need a workaround, to allow the access to some IP adress:
1. Open index.php in the root .
2. Look for that line:
    if (file_exists($maintenanceFile)) {
3. Replace it with that one:
    if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {
4. Paste next code just above the line before:
    $ip = $_SERVER['REMOTE_ADDR'];
    $allowed = array('','');
5. In the $allowed array you have to included the IP allowed to access to your website.