Our client likes to leave images on media/import folder and when they import csv, if product image already existed, it was creating duplicate image.
So below is a quick workaround to fix this issue. Here we are just deleting previous images if we are going to re-import them again.
More»
This is raw copy from my notes during magento store upgrade.
======================================= Restrict access to /index.php with IP Address whitelist.
This is what I have:
if (file_exists($maintenanceFile)) {
// START IP BLOCKER
// Remove file 'maintenance.flag' when you decide to go live
$ip_whitelist = array('x.x.x.x', '127.0.0.1', 'x.x.x.x');
if(!in_array($_SERVER['REMOTE_ADDR'], $ip_whitelist)) {
$protocol = "HTTP/1.0";
if ( "HTTP/1.1" == $_SERVER["SERVER_PROTOCOL"] )
$protocol = "HTTP/1.1";
header( "$protocol 503 Service Unavailable", true, 503 );
header( "Retry-After: 3600" );
header('Location: /index_landingpage.php'); // our own custom landing page.
exit;
}
// END IP BLOCKER
include_once dirname(__FILE__) . '/errors/503.php';
exit;
}
More»
One of our Magento clients uses different customer groups to offer different price discounts on orders. When customers buy $100 worth of products within a year they become bronze member with 5% discount on future orders and Silver member if $200 or over and Gold if $300 and over and they get discount accordingly.
More»