Nov
19
2009
Pre-Requisite
- Get UPS Account – either online or contact your local UPS (as case in UK)
- Get UPS Login – http://www.ups.com
- Get Developer Key – Look under Support->Technology Support->UPS Online Tools
- Get access key – need developer key and Account number for this
And then on Magento
If using SSL omit step 1
- In Ups .php add lines just before this – $xmlResponse = curl_exec ($ch);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- Switch on UPS shipping method
- Add in user_id, access key, pwd
- Test
It’s that easy! I found that changing URLs and anything else was not required.
51 comments | tags: shipping, UPS | posted in Administering Magento
Sep
23
2009
I needed to setup SagePay Direct for my new magento extension website www.webshopapps.com. This website uses multiple currencies to show the customer the rates in GBP(base), Euro, USD, AUD. Because of the problems with getting authorisation to receive in multiple currencies I decided to go for a single store approach.
Getting SagePay to work was a challenge – here is what I did:
- Installed SagePay via Magento Connect
- Copied default/default/layout/protxDirect.xml to theme layout folder
- Copied default/default/template/checkout/* payment/* and protxdirect/* files (where relevant) to theme template folder
- Refreshed cache
- In System->Payment Methodds enabled and put in vendorname, verification=Yes, and selected the currencies I wanted to support
- In System->Manage Currency Rates I made sure the conversions were in place for currencies (otherwise extension throws a wobbler)
- Modified template/checkout/total/b4before_default.html – around line 42 I changed getBaseCurrency call to be getCurrentCurrency()->getCode()
Without the final change the customer was seeing a USD total, but not the converted GBP total that they were actually being charged.
64 comments | tags: sagepay | posted in Administering Magento
Aug
17
2009
Manually adding products in Magento can be very time consuming. Here I’m going to talk about how to add products using a csv file.
I’d suggest you add one product manually first. This will give you an initial configuration.
To export:
- Navigate to System->Import/Export->Profiles
- Click “Export all Products”
- Click Run Profile -> Run Profile in Popup
You will now have an export file in /var/export.
Open this file. You can see it has a list of attributes across the top. These are taken directly from the attributes as defined in Catalog->Attributes.
Note the category_id attribute, this is set to the id of the category the product resides in. To find out the id’s available look either in the Catalog->Category as it is displayed there. If you don’t select the correct category the products will not display on import.
Modify/add rows as appropriate.
To import:
- Navigate to System->Import/Export->Profiles
- Click “Import all Products”
- Click “Upload File”
- Select csv file to import
- Click “Save and Continue Editing”
- Click “Run Profile”
- Select file and press “Run Profile in Popup” – this can take some time
35 comments | tags: export | posted in Getting Started with Magento
Aug
15
2009
I’ve never really like the idea of having to do a chmod 777 on all directories to install community extensions from Magento.
So here is how to do via SSH. Obviously this only works if you have SSH access to your website.
- Navigate to base magento directory
- ./pear mage-setup
- ./pear -V
- ./pear list-channels
- ./pear install connect.magentocommerce.com/community/<extname>
e.g. ./pear install connect.magentocommerce.com/community/Yoast_Blank_Seo_Theme
Finally do a chown -R on your directories to whatever your’s is, otherwise they will have root:root
Superb!
57 comments | posted in VPS
Aug
2
2009
You wouldn’t think it would be hard – I have Plesk 9 recently installed. I need PHP5, and it’s not there.
Here are the commands I used to update:
wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
yum clean all
yum remove sitebuilder
yum remove sb-publish
rpm -e php-sqlite2
yum update
mv /etc/php.ini.rpmnew /etc/php.ini
service httpd restart
mysqlcheck –check-upgrade –all-databases –auto-repair -uadmin -p<password>
mysql_fix_privilege_tables
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql –no-defaults –force –user=admin –password=<password> –host=localhost –database=mysql
yum install php-mcrypt
service httpd restart
The stuff in red is only needed if you get problems with PHP 4.4.0 dependencies, and problems when you try to go into Plesk panel and it shows lots of errors!
25 comments | posted in VPS
Jun
30
2009
I hate the Magento Connect upgrade option for Magento. From what I’ve seen in my own experience, and that of those on the forums, it seems an utter mess, and very hit and miss as to what it updates and what it doesnt.
Here is my preferred approach, you really have to think about this from day 1 of your first installation to save yourself pain (something I didn’t do!):
Initial Installation
- Setup Tortoise SVN
- Take a copy of default theme, change to your theme name and put in svn
- Make edits to theme, commit to svn
- Any other edits to base installation commit to svn
Upgrade Installation:
- Take a copy of the database on live server
- Create local database and import data from live server
- Create new Magento directory on webserver, put on new Magento package (e.g. 1.3.2.1)
- Run installation – use database copy when asked for db details
- Re-install all extensions (this is a good thing to do as ensures you have latest versions)
- Use SVN files you have saved from previous install and SVN diff capability to re-apply theme /changes (or just gamble and copy the theme across – note this is very very dangerous and requires lots of testing)
I’m not promising this approach will work 100%, but in my experience it’s a better idea than trying to do an upgrade, it failing, then trying to unpick what went on for the next month!
23 comments | posted in Magento Installation
Jun
29
2009
Magento Databases can get pretty big. Here are some commands to help with import/export.
Exporting:
mysqldump -h localhost -u <username> -p <dbname> > <exportname>.sql
Importing:
mysql -h localhost -u <username> -p <dbname> < <importname>.sql
e.g. mysql -h localhost -u karen -p auctionmaid < auctionmaid.sql
Transferring files via from remote shell:
pscp <username>@<remoteip>:<fullpath_to_sql_file>.sql <local_sql_file>.sql
e.g.
pscp root@1.1.1.1:/var/www/vhosts/auctionmaid.co.uk/auctionmaid.sql > auctionmaid.sql
36 comments | posted in MySQL
Apr
15
2009
I wrote this extension back in Sept/Oct 08 for a web design company that was developing a site in Magento. It went on Magento Connect in Dec08. Since then I’ve had over 1600 downloads, so I guess people must like it!
The beauty of this extension is that you can manage all your shipping and delivery via a csv file.
You can give a customer a choice of shipping options (e.g. do you want it now or next week), which suprisingly isn’t available with the default Magento installation unless you combine shipping methods.
What else? Well, what about filtering by country, or region/state, or city, or postcode, or partial postcode – yep this is all covered.
It has some bells and whistles, like allowing numerical postcode ranges which is great for the Australian market. And allowing postcode pattern matching, which is a must for complex UK requirements (like wanting to charge differently for postcodes that start with PO20).
Want to see a demo: http://www.auctionmaid.com/mag13a
See the documentation.
90 comments | posted in AuctionMaid Matrixrate
Mar
12
2009
Custom attributes are associated with products, and are suitable for a wide range of uses. Here is how to configure:
- Goto Catalog->Attributes->Manage Attributes->Add new Attribute
- Enter code e.g. volume_weight, and change other relevant fields
- Click on Manage Label option – add a label into Admin box e.g. Volume Weight
- Save Attribute
- Goto Catalog->Attributes->Manage Attributes->Manage Attribute Sets
- Click Default
- Drag new attribute from unassigned area to where you wish it to display in product
- Save Attribute Set
If you now open a product you will see the new attribute present, ready for editing.
3 comments | tags: attributes | posted in Administering Magento
Mar
7
2009
1. Allow Gift Messages under System–>Configuration–>Sales–>Gift Messages.
2. Under System–>Configuration–>Advanced, make sure that the Mage_GiftMessage module says “Enable”. Mine was disabled for some reason.
3. Under each Product allow/deny gift message
50 comments | tags: gift_message | posted in Administering Magento