http://www.ankitsharma.info/blog/magento-free-shipping-on-specific-category-product
Archive for the ‘Web’ Category
Magento - Setting free delivery by product or category
Friday, September 16th, 2011Putty timeout with message ”Network error: Software caused connection abort”
Saturday, August 27th, 2011If your putty ssh connection is disconnecting after some time of inactivity you can change either settings within your client or ssh server to avoid this and keep the connection aliive. For more information see http://ocaoimh.ie/2008/12/10/how-to-fix-ssh-timeout-problems/.
Firefox 7 beta download
Tuesday, August 23rd, 2011Having just recently received the automatic upgrade from Firefox 5 to Firefox 6, I decided to take a look at what the guys at Mozilla were up to and was soon glad to be reading about the memory footprint improvement claims being made about Firefox 7. Browsing seems to have become increasingly slower in recent releases and at the same time the amount of memory it is happy to hog just shocking. So much so that I have been finding myself reaching for the Chrome browser more and more frequently these days.
I was curious about what Mozilla had managed to achieve and if there was any substance to their claims so it wasn’t long before I had downloaded and installed the beta release. I have to say initial results are looking good. I saved my current tabs in FF 6, installed FF7 and reopened them to discover a memory usage reduction from ~300Mb to ~160Mb in task manager!
Furthermore, switching between multiple FF windows and tabs seems to be much more responsive. Early impressions seem to be good and bode well for the full release of Firefox 7 in October this year. I’ll be comparing it with Chrome with interest over the coming months, particularly as more and more add-ons release FF7-compatible versions.
Migrating or moving a magento site to a new server or domain
Tuesday, February 16th, 2010OK, the problem…
There’s a nice shiny, fully-working Magento site and it’s running like a dream. The only thing is it’s in the wrong place - maybe on a development server or an old server that’s fast running out of space! You need to get that site out of there and fast!!
While looking into this I found a couple of suggested solutions - and some of them, although I’ve no reason to doubt they work were a little drawn out. Here’s what worked for us and you’ll be glad to hear it’s the short and sweet option…
Create an sql script of the original site’s database that contains both the structure and data
Add the following code to the START of the sql script…
SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'; SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;
Add the following to the END of the sql script…
SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT; SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS; SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION; SET SQL_NOTES=@OLD_SQL_NOTES;
The sql script is most likely to be several megabytes in size so zip it up into a zip-file - this will mean you can later use a tool like phpMyAdmin to import the script without hitting the 2 meg file size limit for file uploads.
Create the new domain and an empty database
Copy ALL the site’s file over to the new domain and ‘chown’ files as required
Make the following directories writable by the web server user:
- app/etc/
- var/
- media/
and for MagentoConnect:
- /<magento-path>/
- /<magento-path>/downloader
- /<magento-path>/downloader/config.ini
- /<magento-path>/downloader/pearlib/config.ini
- /<magento-path>/downloader/pearlib/pear.ini
- /<magento-path>/downloader/pearlib/php
If the database details have changed, update them in app/etc/local.xml
Run the (zipped) sql script on the new empty database
In the database table ‘core_config_data’ change the two record fields ‘/web/unsecure/base_url’ and ‘/web/secure/base_url’ to the new domain name if it has changed
Finally, delete the files in the following directories to manually clear the cache:
- /<magento-path>/downloader/pearlib/cache/*
- /<magento-path>/downloader/pearlib/download/*
- /<magento-path>/var/cache/*
- /<magento-path>/var/session/*
- /<magento-path>/var/report/*
- /<magento-path>/var/tmp/*
Building ASP.NET web pages without Visual Studio.NET
Tuesday, January 26th, 2010Related to the previous post, we were tasked with adding pages to an existing third-party ASP.NET web application without having access to the site’s existing code-behind files.
Although a slightly unusual situation, after a little digging around we found that it was quite easy to create the additional pages and integrate them into the website without the usual creation of a web project in Visual Studio.NET. Instead each web page was created manually, here’s what was required:
For each web page create two files…
page.aspx.cs
Simply create a class that inherits from System.Web.UI.Page. This will be the class that represents the web page.
namespace MyNamespace {
public partial class _Default : System.Web.UI.Page
{
}
}
page.aspx
Include the following directive at the top of the aspx page (assuming the aspx file uses a C# code behind file)
<% @ Page Language=”C#” CodeFile=”page.aspx.cs” Inherits=”MyNamespace._Default” Debug=”true” %>
Using namespaces in aspx files
Monday, January 25th, 2010When developing ASP.NET web applications libraries are usually used by including them in the code behind files. On a recent project, which involved maintenance of a client’s existing web application .NET libraries were required for use on the web page but there was no access to the page’s code-behind file.
There is a way to include required namespaces directly within aspx files - in the event that namespaces need to be imported within aspx files you can use the <%Import %> directive.
Example:
<%@ Import namespace=”Enter.Namespace.Here” %>