Tuesday, 10 March 2009
Adding a new Manufacturer Field to Magento store
http://www.littleripples.com/helpdesk/knowledgebase.php
Manufacturer is an attribute setting, so the following procedure is the same for adding any extra fields to other attributes.
>> In the Admin panel
>> hover over the 'catalog' button on the menu bar.
>> go to 'attributes' >> 'Manage Attributes'
>> find 'Manafcturers' and click on the attribute name
>> on the left hand side click on the 'Manage Label/Options' tab
>> underneather Manage Options on the main part of the screen click on 'Add option'
>> enter the text of the new manufacturer you want to add.
Thursday, 5 March 2009
Help Desk Software
- Version Control Programme ( Subversion )
- Documentation (PHPDocumentor)
- Bugzilla
and finally no matter what the size of the project a ticketing system is well worth the investment.
Especially when the investment is only a hour or so of your time. This is how long it took to set up the excellent Help Desk Software that can be found at PHP Junkyard. The programme itself is completly free
Here are some of the main features
* unlimited personalized accounts for staff
* unlimited categories
* canned responses
* file attachments
* fully-featured knowledge base (articles, categories, search,...)
* custom fields in the "Submit a ticket" form
* anti-SPAM checks when submitting a ticket
* powerful ticket search functions
* e-mail notifications of new tickets and replies
* rating of staff replies and knowledge base articles
* auto close tickets after X days
* easy-to-use web interface
* easy to translate to any language
* and many more!
On the way to finding this program I'd also tried osticket.com and troubleticketexpress.com.
osticket.com - seems like a project at a very early stage. Installing this would mean getting your hands dirty and doing lots of code writing to get it to all the things it should do.
troubleticketexpress.com - has a basic version and then seems to want to channel you to purchase addons to get to the programme to do every thing you want it to.
I'd found this programme through www.hotscripts.com.
Thursday, 26 February 2009
Installing Subversion on Heart Internet Shared Server
Just to find out that it is not possible
"It is not possible to install or run subversion on our servers as doing so would put you in breach of our terms and conditions.
15.1.2 you do not use the Hosting Service as a backup of, or repository for, your Material;"
This is unfortunate as they're are many reasons why having a version control program is paramount to solid base for web development. If you are installing on shared host though and it's not with Heart Internet then this post
http://joemaller.com/2008/01/29/how-to-install-subversion-on-a-shared-host/
explains the process much clearer than anything else that I came across.
Sunday, 22 February 2009
Adding Translation to your website to increase keywords and hits
www.hillsideglastonbury.co.uk
As we are currently in the middle of the 'credit crunch' and due to the fact that the British Pound is doing so badly against the Euro at the moment that bookings from abroad may well be a opportunist market at the present time.
To tap into this market we have decided to provide a translation of the website, albeit with Yahoo's translation tool Babel Fish. The problem with this of course is that some words may be undesired and the grammar will also be incorrect in places. On the plus side though it's cheap and free - you can target a few keywords that will at least get the hits in from abroad. Hopefully once we receive a few bookings through this new channel we will then invest in a proffessional translations.
On out home page we have placed links to an introduction pages for 6 languages - German (GlastonburyAnpassung), French (GlastonburyLogement), Dutch (GlastonburyAanpassing), Spanish (GlastonburyComodidad), Italian (GlastonburySistemazione) and Portuguese (GlastonburyAcomodacao).
This page has a brief introduction and apologieses for any grammatical errors and then targets three key phrases for each language. Each link from this page to others on our website transfer the user to the BabelFish website. So all the links are this format
http://babelfish.yahoo.com/translate_url?doit=done&fr=bf-badge&trurl=http://www.YOURWEBSITELINKHERE.co.uk/&lp=en_pt
At the end the code -> 'en_pt'
The changes the language from English to Portuguese - Here is a list of the other language changes used.
'en_de' = English to German
'en_fr'= English to French
'en_nl'= English to Dutch
'en_es'= English to Spanish
'en_it'= English to Italian
Since these changes we have noticed a 50% increase in hits in the first month. The bottom line though will be to see if these increases in hits translate in to B&B and Self Catering bookings. We will have to see.
Monday, 8 December 2008
upgrading to php 5 with Heart Internet
SetEnv DEFAULT_PHP_VERSION 5
Tuesday, 2 September 2008
Deleting unwanted images of the server.
So first of all I wanted to get a list of files in the folder - for this we need to use readdir - see http://uk3.php.net/manual/en/function.readdir.php
function list_folder($folder){
$dh = opendir($folder);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
rsort($files);
return $files;
}
////////////////////////////////////
//Then i needed to make an array of a list of images that I do want to keep.
//my list looks a bit like this
$images_wanted_array[0] = $row['img1'];
$images_wanted_array[1] = 'thum'.$row['img1'];
/* once have these two list then I run a foreach inside a foreach statement.
So each file gets checked against the list of wanted files. If theres a match I get the result '$success'. After checking the whole wanted list I do a check for any succesful matches and only delete if there aren't any.
Here's the function I wrote.
*/
function deleting_unwanted_images($images_array, $wanted_array, $path){ // this function takes an array of images and they aren't on the wanted_array list they will be deleted.
foreach ($images_array as $f) {
unset($success);
foreach ($wanted_array as $i){
if ($f == $i){
$success = TRUE;
}
}
if (!$success){
$file_to_delete = $path.$f;
unlink($file_to_delete);
echo '
The file'.$f.' - has been deleted
';
}else {
echo '
There has been a match so we are going to keep the file '.$f.'
';
}
}
Monday, 1 September 2008
importing a database .csv to mysql
The mission -> I have databases given to me in .csv format created in Microsoft Excel and I would like to import them into my mysql database so I can manipulate them from there.
The Solution -> the key to writing the solution for this can be found by using http://uk3.php.net/fgetcsv .
here's the code I wrote from this page. You will need to create your table first that we write to.
#############################################################################
$row = 1;
$handle = fopen ("database.csv","r");
// ip-to-country.csv must be in the same directory with this php file
// customer number here will represent the row it's on database given.
while ($data = fgetcsv ($handle, 1000, ",")) {
$query = "INSERT INTO database_table(`id`, `field1`, `field2`, `field3`)
VALUES('', '".$data[0]."', '".$data[1]."', '".$data[2]."')";
$result = mysql_query($query) or die("Invalid query: " . mysql_error().__LINE__.__FILE__);
$row++;
}
fclose ($handle);
############################################################################
The only error I came across was
Invalid query: Duplicate entry '127'
and this was down to database table I had created as I had the 'id' field set to TINYINT(3) - the resolution was to change this to INT(6)