Tuesday 31 March 2009

Magento 'shipping Invalid Country' - Setting up Shipping details in Magento

The section to make changes to shipping can be found at:

Magento Admin > System > Configuration > Shipping Methods(left hand menu)


At least this is the section where you can enable the methods that you'd

like to allow for shipping.
If you want to make changes to the table rate then you need to go to the

'store view' - This is in the dropdown list on the left hand side at the

top - and is labelled 'Current Configuration Scope:' - and move to your

main store view.
>> After that navigate back to shipping methods on the left hand menu. THis

time you will see and export button and a input field you can browse for the

document you wish to upload.
>> Simple export the file - make you changes and then import here again.


On doing this I got a 'Invalid Country ' message on all my countries. To see

the values you need to enter here visit

http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3

Monday 30 March 2009

VBulletin : Front page message that only displays if logged in

On a job to update vBulletin here is a code snippet that so you can display a personalised message for your logged in users. Or display another message if their not.

This is just an example as this text is already include by default, howwever you may want to change it to something else.

<!-- welcome msg start DJ -->
<if condition="THIS_SCRIPT == 'index'">
<if condition="$bbuserinfo['userid'] == 0">
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat"> Welcome to the Forum.
</td>
</tr>
<tr align="center">
<td class="alt1"> If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. tst
</td>
</tr>
</thead>
</table>
<br>
<else />
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat">
Welcome back, $bbuserinfo[username].
</td>
</tr>
<tr align="center">
<td class="alt1"> <a href="search.php?do=getnew">Click here to view new posts</a>.</td>
</tr>
</thead>
</table>
<br>

There's a really handy list of conditional commands for vBulletin at this address
http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html


</if>
</if>

<!-- welcome msg end DJ -->

Saturday 28 March 2009

Firebug Tool - edit, debug, and monitor CSS, HTML, and JavaScript

If you work in Internet Development then I highly recommend the use of firebug (https://addons.mozilla.org/en-US/firefox/addon/1843) which is tool where you can examine all the elements of the webpage that you are viewing. Firebug is specifically for use with Firefox however there is a Internet Explorer version if you're that way inclined which is called 'Internet Explorer Developer Toolbar'. With Firebug you can ->edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
If you're involved in css changes it's a must have tool and it's completely free.
For example on the left hand side view you could select the HTML tag. This would give you a list tags that may look something like this.
+ < div class="1" >+

Clicking on the'+' sign to the left of these tags would display all the contents of that < div >. for example
+ < div class="1" > < div class="2" > + < div class="" >

It's the same principle if we were to replace the div tags with table tag etc.
On selecting the tag of your choice on the right hand of the screen we could choose to view the css for this item. And not only that we can edit the style from here and view the changes immediatley. Thus saving time consuming testing. Also on the right hand side you could move that item around the screen by selecting the layout tag. When you make changes here 'Firebug' shows you the css you need to write to make the changes.
There's even a tab so you can change Javascript DOM . Not something I've used yet though.
This is a must have tool for any other internet developer.

Wednesday 18 March 2009

Basic CodeIgnitor Notes

If you write code then you may be familiar with this situation.

You have a small project that you write in the quickest possible way to meet a deadline and maximise profit.

It then grows and grows. At this point you are seeing the error of your ways and you should be using Object Oriented Programming and a bettter 'Framework'. Now have streams of spaghetti code, made from many copy and paste moments. The main problem with this is that changes to one bit of code and many other pieces may need to be changed or the knock on effects considered.

It's time to switch to a MVC framework and using someone elses rather than you're own will save time.

For the project I'm about to start helping on soon they use code ignitor, so it'd seem like a good time to have a look at their framework.

Here's some of the Basic pointers I picked out;

>> classes will extend Controller to use all the properties of this masterclass.

>> class names should be the same page names and can be called up from URL
/CodeIgniter/index.php/blog/
-> this will load the function 'index' in the blog class
->-> we could call up the function 'do_this' with the uri /index.php/blog/do_this/

NOTE: we could get rid of index.php through the .htaccess file to make cleaner URL's

>> if we're making a constructer ( same names as it's class ) remember that it will overwrite any constructer in the parent class. so we must call the parents constructor first . ie parent::Controller();

Using IRC - Internet Relay Chat

IRC stands for ' internet relay chat '

Which is useful if you need to chat within a group over the internet. You could use SSH and command line to do this or there are many clients that will give you an easier viewing experience.

It was recommended to me that I should use something like mirc.com/ . However on checking this one is only free for a limited period.
Checking on wiki will get you a comprehensive list of IRC clients - check here http://en.wikipedia.org/wiki/List_of_IRC_clients

As I use firefox for my Internet Browser I opted for ChatZilla http://en.wikipedia.org/wiki/ChatZilla and this one seems pretty easy to use.

To start a session with a group it's as easy as

entering:

/server theserver.your.connecting.to

the enter:

/join #thegroupnameyouarejoining

Tuesday 10 March 2009

Adding a new Manufacturer Field to Magento store

you can find this article and other helpdesk items at
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

Unfortunately software bugs are part and parcel of writing code. The bigger the project the more likely it is there are going to be bugs of some sort. I have recently fallen into the mistake of starting a fairly small project recently that has grown and grown on request of the customer. If the size of the project was apparent from the start then it would have been much more obvious that a decent design environment should have been set up from the start. Here are some that I recommend
  • 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.