Magento
First Impressions
The first impression of Magento is of a very clean very modern website. The first few versions (1.0,1.1 and 1.2) were quite slow in their page load times, but this is something that has been addressed with the 1.3 release. The functionally is absolutely superb, its easily customizable, FREE, SEO friendly and looks great.
There is quite a following on the internet for Magento, the Magento website has lots of useful information on it and some great extensions. If you cant find anything on the site then Google it!!
Introduction
Magento is an Open Source e-commerce platform that i found about 8 months ago. I have been very impressed with what i have seen on the website http://www.magentocommerce.com and the features that Magento has to offer. Before going live i have run Magento on both our test server 'in house' and also on our test Vhost at Positive Internet.
Requirements
* Supported Operating Systems: o Linux x86, x86-64 * Supported Web Servers: o Apache 1.3.x o Apache 2.0.x o Apache 2.2.x * Supported Browsers: o Microsoft Internet Explorer 6 and above o Mozilla Firefox 2.0 and above o Apple Safari 2.x o Google Chrome o Adobe Flash browser plug-in should be installed * PHP Compatibility: o 5.2.0 and above o Required extensions: + PDO_MySQL + simplexml + mcrypt + hash + GD + DOM + iconv + SOAP (if Webservices API is to be used) o Safe_mode off o Memory_limit 32M or more * MySQL: o 4.1.20 or newer o InnoDB storage engine * SSL: o If HTTPS is used to work in the admin, SSL certificate should be valid. Self-signed SSL certificates are not supported * Server - hosting - setup: o Ability to run scheduled jobs (crontab) with PHP 5 o Ability to override options in .htaccess files
Install
HOWTO: Bulk Import Export Categories
http://www.magentocommerce.com/magento-connect/ds-categories-export-import.html
Extension Key
http://connect20.magentocommerce.com/community/Dotsquares_Categories_Exp_Imp
Manual Install
$ ./mage install connect20.magentocommerce.com/community Dotsquares_Categories_Exp_Imp
Make sure you have the following directories fully writeable...
var/import/category var/export/category
HOWTO: Reset User Passwords
All users...
mysql> UPDATE admin_user SET password=CONCAT(MD5('qXMyPassword'),':qX');
Just one user...
mysql> UPDATE admin_user SET password=CONCAT(MD5('qXMyPassword'),':qX') WHERE username='username';
HOWTO: FIX: Index process is working now. Please try run this process later
cd /path/to/var/locks chmod 0666 *
Or...
- Empty the /var/locks/ folder on your magento installation directory and set 777 permission to that folder
- If the above doesn't work, try to run the script /shell/indexer.php
HOWTO: View And Clean Logs
php -f ./shell/log.php help php -f ./shell/log.php status php -f ./shell/log.php clean --days 15 php -f ./shell/log.php clean
HOWTO: Mass update your Magento SKUs
http://www.tripleginteractive.com/blog/magento/how-to-update-magento-skus
Admin > System > Configuration > Catalog > Catalog > SEO > Autogenerated Site Map > No
http://blueclawecommerce.co.uk/blog/fix-category-url-filter-in-magento-layered-navigation/
HOWTO: Fix Search results product URL and multiple categories
Admin > System > Configuration > Catalog > Catalog > Search Engine Optimizations > Use Categories Path for Product URLs > No
http://www.magentocommerce.com/boards/viewthread/41386/#t317746
HOWTO: Allow Backorders / Back Ordering
Admin > Catalog > Manage Products > Product > Inventory > Stock Availability > In Stock (ALL = is_in_stock = 1) Admin > System > Configuration > Catalog > Inventory > Product Stock Options > Backorders > Allow Qty Below 0 And Notify Customer Admin > System > Index Management > Stock Status > Reindex
HOWTO: See Live Customers / Visitors
Admin Panel > Customers > Online Customers
HOWTO: Remove Advanced Search Links
Edit the following files...
app/design/frontend/packagename/default/layout/catalogsearch.xml app/design/frontend/packagename/default/template/catalogsearch/form.mini.phtml
app/design/frontend/packagename/default/template/catalog/layer/filter.phtml
HOWTO: How To Remove The "Position" Sort Option
http://prattski.com/2009/11/30/magento-how-to-remove-the-position-sort-option/
HOWTO: Fix: Missing HTML Title On Advanced Search Page Result
File: app/design/frontend/package/theme/layout/catalogsearch.xml
In the section...
<!-- Advanced search results -->
Just before...
<reference name="content">
Add the following block of code...
<reference name="head"> <action method="setTitle" translate="title" module="catalogsearch"><title>Advanced Search Results</title></action> </reference>
To think this is such a fundamental thing which has been gloseed over is just so typical of the genius of Magento :)
HOWTO: Fix: Weird Tax Pricing Prices
The shipping origin country (System > Configuration > Sales > Shipping Settings > Origin) affects the the way the price is displayed in the cart.
HOWTO: Fix: Index process is working now. Please try run this process later
rm -rf /path/to/magento/var/locks/index*.lock
HOWTO: Move The Configuration Menu Item Up To The Top
nano /path/to/magento/app/code/core/Mage/Adminhtml/etc/adminhtml.xml
<config translate="title"> <title>Configuration</title> <action>adminhtml/system_config</action> <sort_order>5</sort_order> </config>
HOWTO: Install Extensions Via The Command Line
cd /path/to/magento chmod +x mage ./mage ./mage mage-setup ./mage channel-add connect20.magentocommerce.com/community ./mage sync ./mage list-channels ./mage list-available ./mage install http://connect20.magentocommerce.com/community/ Ebizmarts_SagePaySuite ./mage list-installed ./mage list-files community Ebizmarts_SagePaySuite chmod -x mage
Thanks - http://www.pixlpitch.com/install-magento-extensions-from-command-line/
HOWTO: Change The Admin URL
https://www.properhost.com/members/knowledgebase/15/How-to-change-the-Magento-Admin-URL-or-Path.html
HOWTO: Remove The Coupon Code Box From The Shopping Basket
Edit your default/layout/local.xml and add the following...
<checkout_cart_index> <reference name="content"> <remove name="checkout.cart.coupon"/> </reference> </checkout_cart_index>
HOWTO: Add Stock Quantity Level To Category Pages
Edit template/catalog/product/list.phtml and add the following...
<?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>
HOWTO: Fix: Destination folder is not writable or does not exists
find /path/to/media -type d -exec chmod g+w {} \;
HOWTO: Fix: An error occurred while saving the URL rewrite
Truncate table core_url_rewrite and re-run the indexing for Catalog URL Rwrites in the Admin Panel.
HOWTO: Fix Incorrect Pages Or Not Loading When Moving Server IP Address
Update the magento.core_config_data rows...
update magento.core_config_data set value = 'http://192.168.0.103/magento/' where config_id = '4'; update magento.core_config_data set value = 'http://192.168.0.103/magento/' where config_id = '5';
Delete the Magento Cache files...
sudo rm -rf /var/www/magento/var/cache/*
HOWTO: Move To Another Server
http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
HOWTO: Fix Error: pdo_mysql missing
sudo aptitude install -y php5-mysql
HOWTO: Fix Possible Error: pdo + mysql
To anyone having problems with this ensure that the following library is installed:
libmysqlclient15-dev
via:
sudo apt-get install libmysqlclient15-dev
Then use:
sudo apt-get install pdo_mysql
Without the 'libmysqlclient15-dev' library you'll have problems with pdo.
Found these pages to be quite helpful:
http://pecl.php.net/bugs/bug.php?id=12141 http://ubuntuforums.org/showthread.php?t=474152
HOWTO: Fix: Cannot initialize the indexer process
http://dltr.org/blog/magento/114/magento-index-management-Cannot-initialize-the-indexer-process
HOWTO: Fix: Warning: Your Magento folder does not have sufficient write permissions
chown -R ftpuser:www-data www/
root@server:/var/www# ll drwxrwxr-x 5 ftpuser www-data 4.0K Sep 12 12:54 . drwxr-xr-x 15 root root 4.0K Sep 12 12:07 .. drwxrwxr-x 13 ftpuser www-data 4.0K Aug 12 10:33 magento -rw-r--r-- 1 ftpuser www-data 23 Jul 19 12:24 phpinfo.php
root@server:/var/www# grep 'www-data' /etc/apache2/envvars export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data
Web Site Links
http://ubuntuforums.org/showthread.php?t=1973005
http://davidtsadler.com/archives/2012/06/03/how-to-install-magento-on-ubuntu/
NEW: Installation Via PEAR
Version 1.8.0
October 2013
Final Security / File and Folder Permissions
NEW
https://blog.nexcess.net/2010/12/06/securing-magento-file-directory-permissions/
http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html
OLD
The PEAR Installer makes all folders 777 which is nuts.
Change this to make certain folders GROUP only writeable to the group APACHE runs as.
In this example, we have magento installed in our 'public_html' folder and Apache runs as group nobody.
cd /home/username/public_html find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 775 {} \; chown -R user * chgrp -R user * chgrp -R nobody media/ var/ chmod g+w app/etc media var var/.htaccess chmod -R g+w var/cache chmod 550 mage
Pre Installation
Magento requires quite a few things from the server that it is loaded onto. To check that the server that you are going to us has the correct features installed follow this link (http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento), download the file to your desktop, then upload it to your webserver and navigate to the file. It will then return a page that shows what you have and what you need.
Once you have all of the correct features installed then move on....
Installation Via SSH
I used a program called Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/) to log into my sever via SSH
There is a very good installation guide on the Magento website that is updated every time they make a new release (http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_ssh)
- Create MySQL Database and add Database User
- Download files (core and sample data)
- Unzip to Web Server folder
- Change permissions to Apache
- Load install page in browser and finish
Installation Via FTP / Web Interface
Here is the official guide to setting Magento up via FTP. Has worked for me when i have used it )http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide) When prompted to put in the BASE URL make sure you put http://www.yourdomain.com where yourdomain is your domain name
Configuration
The first thing to do is to do into the backend and get your settings correct. These setting will be for your default config ( shown in the top left) as and when you add more sites on this installation you can make changes to the settings in individual sites rather than all sites. It also means that new sites will take the default config settings until you change them to new settings.
So click on System | Configuration. Below you will see what values i suggest using.
General
User Guide
Community Edition 1.7 - http://info.magento.com/rs/magentocommerce/images/Magento_Community_1-7_User_Guide.pdf
General
- Countries Options
Default Country - Select the country that you business is in Allow Countries - Here select all of the countries that you will ship to. To select more than one click and hold CTRL
- Locale Options
Timezone - Select your timezone Locale - Select your Language First Day of the Week - Select your first day of the week. Normally Monday Weekend Days - Sunday and Saturday should already be selected
Web
I have changed nothing in this section to date.
Design
- Package
Current Package Name - Here i have just left default
- Themes
These are all blank for now but as you will ready further down this is where you can change the look of the site.
- HTML Head
Change all the details to fit your company.
- Header
Logo - Leave this as is for now, we can change this to your logo later. Logo Image Alt - Change to your company name Welcome Text - This will appear above the links to My Account | My Wishlist | My Cart | Checkout | Login on your hompage.
- Footer
Copyright - Change for your own websites copyright infomation Miscellaneous HTML - Im yet to use this so do not know what it is.
- Product Image Watermark
Again this all looks pretty straight forward but is not something that i have wanted to use yet.
Currency Set Up
- Currency Options
Base Currency - Chose your local currency Default Display Currency - Choose what you would like to show on your site, should be same as above Allowed Currencies - Not something that i have used yet.
- Webservicex
This relates to the section below - Scheduled Import Settings
- Scheduled Import Settings
This is if you are going to be using multiple currencies. It will automatically update the prices on your website based on the exchange rate. Not something i have used yet but very interesting.
Store E-mail Addresses
This is all pretty self explanatory.
Contacts
- Contact Us
I have set this to yes
- E-mail Options
Send E-mail To - Input here where you would like the e-mail to go when people fill in the contact us form on the website E-mail Sender - Your customer will also receive a copy of the e-mail, input here where you would like it to show as coming from E-mail Template - Leave as Default
Catalog
HOWTO: Import Products
http://www.siteground.com/tutorials/magento/import-products.htm
http://www.magentocommerce.com/knowledge-base/entry/tutorial-using-magentos-import-export-profiles
http://www.magentocommerce.com/wiki/3_-_store_setup_and_management/import_export/export_tool
HOWTO: Change Label for SKU Variable
admin > catalogue > attributes > manage attributes
http://www.magentocommerce.com/boards/viewthread/5779/
HOWTO: Show Stock Level Quantity
http://www.woolleydesign.net/wp-content/uploads/downloads/2012/06/default.txt
http://www.woolleydesign.net/2012/06/magento-show-inventory-levels-on-product-pages/
Catalog
- Product Reviews
I have not changed anything in this section to date as it all seems sensible so far.
Inventory
Again these are all self explanatory options so i have not changed any of them. Some you might like to change if you accept back order or if you do not want the stock to decrease if somebody places and order.
Google Sitemap
These options will affect how your google sitemap is generated later in the piece, i have left them all as is for now.
RSS Feeds
Not something that we have used yet, but something that i will get into sometime.
E-mail to a Friend
The only setting i have changed here is the Allow for Guests Setting which i have changed to Yes so that guests can sent e-mails to friends as well.
Customers
Newsletter
The only value i have changed it the e-mail address where the unsubscribe e-mail goes to. This is the top drop down box.
Customer Config
Nothing to change here for me
Wishlist
Leave all as is
Sales
Sales
- Checkout Total Sort Order
Here you can select which values will appear higher up on the bottom of your invoices. The small the number in the boxes shown here the higher it will appear.
- Invoice and Packing Slip Design
Here upload your logo using the specified sizes to appear on your invoices. Also input your address for the invoices.
Sales E-mails
This section details where different pieces of paper work will be e-mailed to. I have left them all as they are apart from the Order section where i have added a BCC to my Imap account that is synced to my iPhone so i know when we received orders.
PDF Printouts
I have left all 3 as yes as it seems a bit silly to change them to no.
Tax
- Calculation
Catalog Prices include tax - here i have changed to yes as our prices on the site will be VAT inclusive.
- Default Tax Origin
Country - Change to your country Post Code - Enter your postcode
- Display
Display Cart / Order Prices - I have selected invluding tax otherwise it gets complicated for the consumers Dispaly full tax summary - This i have not tested yet. Display Shipping Prices - Again including tax to save confusing Display Product Prices - Again including tax to save confusing Display Zero Tax Subtotal - No
Checkout
- Checkout Options
Disable Onepage Checkout - I have left at no for now Allow Guest Checkouts - If people do not need to register to buy things from you then leave this as yes Enable Terms and Conditions - Left as no, need to experiment with this one.
- Shopping Cart
Left all as is
- My Cart Link
Left all as is
- Shopping Cart Sidebar
If you want the shopping cart to show in the sidebar so that customers can see what they have bought then leave as yet. I have set it to they see the last 5 products placed in the basket.
- Payment Failed E-mails
Left all as is
Shipping Settings
- Origin
Change details to your own
- Options
If you can ship to multiple address's then select yes, if not then no
Shipping Methods
- Flat Rate
Use this if you offer a flat rate shipping charge on all orders.
Enabled - Yes Title - You can change this if you want to something like standard shipping Method Name - fixed Type - Select if it is per order or per item. Price - enter the cost for shipping Calculate Handling fee - if you have a handling fee enter here how it is worked out handling fee - relates to the above drop down box. Display error Message - Change error message to your own Ship to applicable coutries - select which countries this option should be allowed to. Sort Order - If you are using more than one shipping method then put a number here. The lowest will appear at the top, largest at the bottom
- Free Shipping
Enabled - Yes, only if you offer free shipping Title - Free shipping Method - Free Min Order Amount - Enter the minimum order amount that a customer has to order to get free shipping Countries - Select the countries that this applies to.
We do not use any of the other couriers so we have not played with this.
Google API
- Google Analytics
Enable - Select yes if you have got an account with google. If not then http://www.google.com/analytics Account No. - here enter your google analytics code.
- Google Base
Account login - google account login account password - google account password target country - your country update google base items when product is updated- yes
I have not yet tried any of the other Google bits, but checkout is something that i need to try.
PayPal Accounts
If you are going to be using paypal for payments then this is where you need to enter your details. Again we are not using this yet, but will try it soon.
Payment Methods
- Saved CC
You can fill this lot in if you are happy with saving peoples data on your server. I have opted not to do this.
- Zero Subtotal Checkout
Enabled - no
No need for this option in our business
- Check / Money Order
Enabled - yes Title - Cheque New order status - left as pending so that we can change when we received the cheque. Payment allowed - all countries Make cheque payable to - your business name Address - your business address minimum order total - if you wont accept cheques below a certain value then change this.
If you want to use any of the other payment options then fill the details in for the relevant option.
You can also install other payment extensions. I will install SagePay later.
Services
Magento Core API
left alone
Advanced
Admin
Left all as is. If you want to show a different page than the dashboard when you log into Magento then you can select it here.
System
- Currency - Select the currencies that you want to use.
Advanced
Left as is
Developer
Left all as is.
Right....now that the main settings are all done in the back end we can look at the more interesting bits.
Home Page
If you navigate to your home page as it is at the moment you will see that you have 4 boxes on the right, My Cart, Compare Products, back to School Image and a Poll.
Default Message
How to get rid of the default message above the links My Cart ect on the home page.
Navigate to System | Configuration then to General | Design and then to Hears. Here you can change the Welcom Text which is what shows up in your header. I have chosen just to delete this text.
Polls
The poll is not something that i want on my site so i need to remove it, easy.
Go into the backend and click on CMS | Poll manager here you will see the poll that is showing up on the website. Simply double click on the poll and then click delete in the top right and it will disappear. On the flip side if you would like to add a poll then here is where you can add a customized poll.
Home Page Look
It might be that you want these boxes on the right on your front page. I don't so i am going to get rid of them and then create my own front page in Dreamweaver. So in the backend select CMS | Manage Pages then select Home Page. Here we can do what we like with the home page between the header and the footer.
General Info
- Page Title
Change this to whatever you want it to be for your site, this will show in the very top bar of your browser.
- SEF URL Identifier
I have left this as home as this seems quite sensible
- Status
Here you can enable and disable pages, for the home page i would not need this but as you will see later on we will use it for other pages.
- Contact
here you can add whatever html you want to make the page look the way you want it to. Take a look around the web to see what other people have done to get some ideas on what to do here.
Custom Design
- Custom Theme
Left this as please select. Later on this could be used to change the home page look but no other page look if you were looking for a christmasy theme or so on.
- Custom Theme From and To
You can automatically set the custom theme to work between certain dates which is very handy. It means you can plan for special season events months in advance and not forget to implement them. It also means you can test new pages online and then change back to default if there is a problem.
- Layout
Now this is where we get rid of the boxes on the right of the home page.
2 columns with right bar - this means your html will appear on the left and the boxes stay on the right
2 columns with left bar - this means your html will appear on the right and on the left you will get a picture link box and a newsletter subscription box
3 columns - your html appears in the middle and then you get all the boxes either side.
1 column - your html takes up the full width of the site - THIS IS THE OPTION I HAVE GONE WITH SO I CAN FULLY CUSTOMIZE MY HOME PAGE.
You can of course control what appears in the right and left boxes if you want to, you will find the files you need to change in app/design/frontend/default/default/template/page
Meta Data
Self explanatory. Fill in keywords that you would use for your site and also a description.
Page View Optimization
Not something i have yet played with
About Us
To edit the about us page click CMS | Manage Pages and then it is the same as the home page above to configure.
If you do change the identifier for the about us page then you will need to go into CMS | Static Blocks and change the link in the footer so that it works rather than sending you to a 404 Not Found Page.
404
Here you can alter the look of your 404 page the same as about us and home page.
Customer Service
Here you can alter the look of your customer service page the same as about us and home page.
Finding the right file to edit im magento can be a bit of an ass with so may folders and so many files to go through, but there is a nifty little button to help....
Backend
System | Confirguration
In the top left select Default Store View then clock developer at the bottom of the page then debug then untick the boxes that say template hints and add block names to hints and change to say yes. Then save. Now look at your front page and it will show you were every file is!!.
Magento Connect
Personally this is one of the things that i think makes Magento so much better than any other E commerce platform out there at the moment that i have seen. There is so much functionality with Magento before you even look at extensions.
I did have some trouble getting the Downloader working to start with because of a permissions issue. If you are going to use the web based Magento Connect then all folders need to have write permissions. These 2 links will tell you all you need to know about installing extensions:
http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide
http://www.magentocommerce.com/wiki/magento_filesystem_permissions
Recommended Extensions
There are a few extensions that i find very very useful, i have not as yet bought any extensions so these are all FREE extensions. Please follow the links below for full descriptions and download keys.
Delete Orders
http://www.magentocommerce.com/extension/873/delete-orders
This is fantastic because it means you can make all the test orders you like and then just get rid of them when you are finished ready for a fresh start.
SagePay
http://www.magentocommerce.com/extension/163/protx-direct-payment-module
SagePay used to be called Protx and are the payment solution that we have chosen (along with PayPal and hopefully google checkout) I believe there is some config work to do to get this working but i will update this wiki with how i get on when the time comes.
Blue Skin
http://www.magentocommerce.com/extension/519/blue-skin
A lovely looking Skin. I have tinkered with our a lot to make it look different, but still a very good base to work from.
Auto Cross Sell
http://www.magentocommerce.com/extension/524/auto-crosssell-products
I have just install this on our test server. This could save hours!!!!
Company Details
Tax
Term and Conditions
Telephone Numbers
Your address
Setting Up Products
It took rather a while to figure our how this all worked to be quite honest. It was rather frustrating, but when i had found the right wiki to look at it all made sense.
First of all lets go into System | Confirguration and then manage stores.
Here we need to change a few things.
Under website name click on the link and change the name of your site.
Under Store Name do the same thing. You can leave the default category as is if you want but i have had some problems with this. So it is best to follow the steps below to create a Root Category and then change the drop down in the box to YOUR NEW ROOT CATEGORY.
Categories
Click Catalog in the backend and then Manage Categories.
Root Categories
Click on New Root Category in the top left and then fill in all of the details on the right. Once you have done this i would go back into System | Managed Store and click on the middle link and change the drop down box to your new ROOT CATEGORY.
Product Category
To great a product category under your root category simply click on your root category and then click new sub category in the top left, again fill in the details. Change enable to yes and then look at your home page and you will see your first product category appear at the top. Now add more and you will see them appear. You can also add sub categories to these to break down the products in that section.
Products
So setting up a product can take ages to start with because you need to make sure that you have all the right information in your first product and then from this we can import products via a spreadsheet.
Tax
This is quite tricky to get set up right. To be honest im not sure how i have managed it but i have. The following links might give you some help.
I will work out how i did it and then put pen to paper so to speak.
http://www.magentocommerce.com/knowledge-base/entry/what-are-tax-rules-and-how-do-i-use-them http://www.magentocommerce.com/knowledge-base/entry/how-do-i-define-tax-rates-per-product-tax-rules/
Right just found one thing which had me baffled for a while. I had set up the tax rules and then tried a test order but when i put the product in and then a shipping adress inside the UK it did not like it, it would take the tax off. The reason why....in the tax rule i had filled in the Postcode box which meant that only delivers to that postcode would be taxed. make sure you leave this as a * so that it works for all postcodes in your chosen country!
Exporting Products
Importing Products
Special Offers
Cart Based Special Offers
Code Based Special Offers
Dealing with Orders
Invoicing
Changing the Text on Inovices, Credit Notes and E-mails
Taking the Dosh
Dispatching
Newsletters
SEO
Google Analytics
Google Sitemap
Meta Data
Keywords
Page Titles
Google Base
Reports
Backing Up
Users
Creating a New User
To create a new user you click System | Permissions | Users
here you can add the details about new users, on the left the second tab says User Roles. This is addressed below
User Permissions
To set the user permissions you now need to click System | Permissions | Roles
Here you can create new role classes. So somebody you only want to allow to input order all you would lick would be the sales boxes so that they cannot do anything else. This way they cannot corrupt the data in other parts of the system.
Once you have selected the roles that you want go back to System | Permissions | Users and set each users permissions profile.
Forgot Passwords
http://www.magentocommerce.com/boards/viewthread/40405/
Log In Issues
After creating permissions and users I managed to get rid of the admin role, which meant that i could log in with the limited accounts but not as an admin so I couldn't do any config work. So to get round this your have to log into your MySql database and change some files.
The first you need to change is the admin_user file. Here you need to add a new user.
These are the details that you need:
The fist number is automatically assigned. Then First Name, Surname, E-mail ,Username, Password, Date of Creating of Account.
4 Paul Smith paul@yourdomain.co.uk paully password 2009-05-12 09:52:50 2009-05-12 09:52:50 2009-05-12 08:56:00 1 0 1 NULL
Now you need to access the table admin_role
Insert a new line with the following details.
The first number is role_id, this is automatically generated. Parent ID is reference to the group that you want that user to be a member of. So in this case the role_ide for Administrator is 1. So the parent_id for Paul will need to be 1. Tree level i have found that 2 works. Sort order leave as 0. role_type is set to U = user ( G = group ) then the role_name is the first name of the person in the admin_user file above, in this case Paul.
role_id parent_id tree_level sort_order role_type user_id role_name
1 0 1 1 G 0 Administrators
4 1 2 0 U 4 Paul
SagePay
http://www.magentocommerce.com/magento-connect/ebizmarts-sage-pay-suite-ce-sage-pay-approved.html
Installer Key
http://connect20.magentocommerce.com/community/Ebizmarts_SagePaySuite
or
connect20.magentocommerce.com/community/ Ebizmarts_SagePaySuite
Customer Order Comments
http://www.magentocommerce.com/magento-connect/magemaven-ordercomment.html
Installer Key
http://connect20.magentocommerce.com/community/Magemaven_OrderComment
or
connect20.magentocommerce.com/community Magemaven_OrderComment
Templates
http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes
http://www.magentocommerce.com/design_guide/articles/how-magento-builds-content
Magento Community Edition 1.8 Custom Package Template NEW 2013-10-15
Downloadable Products
HOWTO: Reset Admin User Password
mysql -uusername -p dbname mysql> SELECT * FROM admin_user; mysql> UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin'; mysql> quit;
http://www.magentocommerce.com/wiki/recover/resetting-admin-password
HOWTO: Find Out Where Magento Is Installed
find /home/ -type f -name 'Mage.php'
HOWTO: See Which Magento Version
Change to your web site's root folder, and run the following command...
find . -type f -name 'Mage.php' -print -exec egrep '\<'major'\>.*=>|\<'minor'\>.*=>|\<'revision'\>.*=>|\<'patch'\>.*=>' {} \;
INFO: Magento Security Updates
http://www.magentocommerce.com/blog/category/security-updates/
HOWTO: Magento Update Via Command Line
Take a Code backup as well as DB backup before upgrade. Use SSH to upgrade. Follow below steps to upgrade.
I ran into server timeout issues when performing this upgrade. To fix it, I had to temporarily set the max_execution_time = 600 in my php.ini file and restarted the web server.
sudo -i cd /var/www/yourmagento/ chmod -R 777 lib/PEAR chmod 550 pear ./pear mage-setup ./pear channel-update connect.magentocommerce.com/core perl -pi -e 's/\r\n/\n/g' pear ./pear upgrade -f magento-core/Mage_All_Latest-stable chmod 550 ./mage ./mage mage-setup . (* notice the dot after mage-setup command) ./mage sync ./mage config-set preferred_state stable ./mage list-upgrades ./mage upgrade-all --force
Once this is done, I highly recommend restricting access to your site to your own IP address. This is because that the first hit to your page will trigger the database upgrade. You want this process to go uninterrupted. You can do this in the .htaccess file by commenting out the default Access rules and putting in some temporary ones (don’t forget to change this back once you’re done):
#Order allow,deny
#Allow from all
Order deny,allow
Deny from all
Allow from x.x.x.x #CHANGE THIS TO YOUR IP ADDRESS
Open config.xml and change the statement SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;
Empty your cache and sessions.
Fix ownership and permissions.
Visit your site. It will take some time to loading depends on your data. Normally for 2 GB it will take 2 hours.
https://blog.nexcess.net/2011/03/11/upgrading-to-magento-1-5-0-1/
http://magento.stackexchange.com/questions/10651/magento-upgrade-from-1-7-to-1-8
http://stackoverflow.com/questions/11662347/how-to-upgrade-magento-1-4-1-1-to-1-7-0-2
HOWTO: Fix: Slow Home Page Load
Admin > System > Cache Management > Flush Magento Cache Storage
HOWTO: Fix: Magento install error - Exception printing is disabled
There has been an error processing your request. Exception printing is disabled by default for security reasons. Error log record number: XXXXXXXXXXXXXXX.
It's permissions on the var/cache folder.
HOWTO: Fix: Product Not Showing
Make sure...
- You have inventory option ticked
- You have a stock quantity number added
- You have 'item in stock' ticked
... :-)
HOWTO: Fix: ”XXX Index process is working now. Please try run this process later.”
sudo chmod o+w var/locks sudo rm -rf var/locks/*
Log in to Admin and restart the process, or in the shell...
php -f indexer.php reindexall
Then you should see...
-rw-rw-rw- 1 nobody nobody 31 Oct 17 13:18 index_process_4.lock -rw-rw-rw- 1 nobody nobody 31 Oct 17 13:18 index_process_5.lock
HOWTO: Repair a Magento Database
http://www.learnmagento.org/magento-bug-fixes/repair-magento-database/
HOWTO: Importing Product Images via CSV in Magento
http://www.meteorify.com/2012/05/importing-product-images-via-csv-in-magento-1-7-0-0/
HOWTO: Remove Community Poll
System > Configuration > Advanced > Disable Modules Output > Mage_Poll > Disable > Save Config
HOWTO: FIX: Magento Upgrade 1.7 to 1.8 Blank Pages
Check your logs...
tail /var/log/apache2/error.log "PHP Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found"
tail /path/to/magento/var/log/system.log Warning: include(): Failed opening 'Magento/Db/Adapter/Pdo/Mysql.php' for inclusion
Fix...
cd /path/to/magento/ sudo ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force sudo chgrp -R www-data * sudo chown -R youruser *
HOWTO: FIX: Error When Deleting Sample Data
If you get this error...
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`magento`.`tag_summary`.`products` - 1)'
Then fire up your MySQL or PHPMyAdmin and run this SQL...
DELETE FROM sales_flat_quote WHERE customer_is_guest = 0;
- Delete Customers
- Delete Products (20 at a time)
- Delete Categories
Why hasn't someone written a nice bit of SQL code to do this...?
HOWTO: Change Turning On and Off Magento's Default Blocks
- Common Elements You Can Turn Off Via the Admin Panel
- Common Elements You Can Turn Off via the Layout Files
- How to Disable Modules and Blocks in the Layout (xml) Files
- How to tell Magento to use your custom theme
http://www.magentocommerce.com/knowledge-base/entry/turning-on-off-magentos-content-blocks
<!-- file: app/design/frontend/your_package/your_theme/layout/local.xml --> <?xml version="1.0" ?> <layout version="0.1.0"> <default> <reference name="header"> <reference name="top.links"> <!-- <remove name="checkout_cart_link" /> --> <block type="wishlist/links" name="wishlist_link"/> <action method="removeLinkBlock"><blockName>wishlist_link</blockName></action> </reference> <block type="directory/currency" name="custom_currency_selector" template="currency/currency.phtml"/> <remove name="top.menu"/> </reference> <reference name="left"> <remove name="left.permanent.callout"/> <!-- <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-"/> --> <action method="unsetChild"><name>left.newsletter</name></action> </reference> <reference name="right"> <!-- <remove name="catalog.compare.sidebar"/> --> <!-- <remove name="right.permanent.callout"/> --> <!-- <action method="unsetChild"><name>cart_sidebar</name></action> --> <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/> </reference> </default> </layout>
List of available blocks to remove...
<default> <remove name="left.permanent.callout" /> <!--the dog--> <remove name="right.permanent.callout" /> <!--back to school--> <remove name="catalog.compare.sidebar" /> <!--product compare--> <remove name="paypal.partner.right.logo" /> <!--paypal logo--> <remove name="cart_sidebar" /> <!--cart sidebar--> <remove name="left.reports.product.viewed" /> <!--recently viewed prod--> <remove name="right.reports.product.viewed" /> <!--recently viewed prod--> <remove name="right.reports.product.compared" /> <!--recently compared prod--> <remove name="catalog.compare.sidebar" /> <remove name="right.permanent.callout" /> <remove name="left.permanent.callout" /> <remove name="left.newsletter" /> <remove name="right.reports.product.viewed" /> <remove name="paypal.partner.right.logo" /> <remove name="right.poll" /> <remove name="cart_sidebar" /> <remove name="checkout_cart_link" /> <remove name="catalog.compare.list" /> </default>
HOWTO: Change Default "Add to Cart" Quantity from 0 to 1
System > Configuration > Inventory > Product Stock Options > Minimum Qty Allowed in Shopping Cart > Click “Add Minimum Qty” > Select “ALL GROUPS” and enter “1” in “Minimum Qty” > Click “Save Config“.
http://www.magentogoreview.com/change-default-add-to-cart-quantity-from-0-to-1-in-magento~169
HOWTO: Add An Icon To The 'My Cart' Header Top Link
<!-- file: skin/frontend/languageseller/default/css/styles.css --> .header .links a.top-link-cart { padding-left:20px; background:url(../images/my_basket.png) left center no-repeat; width:10px; height:10px; }
HOWTO: Fix URL Rewrites For SEO
<!-- file: .htaccess --> RewriteBase /
Delete the maintenance.flag file.
rm /path/to/your/magento/root/maintenance.flag
HOWTO: Change The Base URL
Either log directly into the MySQL Shell and change the tables there...
mysql --user=user_name --password=your_password db_name mysql> update core_config_data set value = 'http://url.i.want/' where path = 'web/secure/base_url'; mysql> update core_config_data set value = 'http://url.i.want/' where path = 'web/unsecure/base_url';
...or, run these commands without entering the shell...
mysql --user=user_name --password=your_password db_name --execute="update core_config_data set value = 'http://url.i.want/' where path = 'web/secure/base_url';" mysql --user=user_name --password=your_password db_name --execute="update core_config_data set value = 'http://url.i.want/' where path = 'web/unsecure/base_url';"
HOWTO: Hide Empty Attributes
Edit magento/app/design/frontend/packagename/default/template/catalog/product/view/attributes.phtml
Replace...
<?php foreach ($_additional as $_data): ?>
<?php echo $this->htmlEscape($this->__($_data['label'])) ?> <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?> <?php endforeach; ?> With... <?php foreach ($_additional as $_data): ?> <?php $_attribute = $_product->getResource()->getAttribute($_data['code']); if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != )) { ?> <?php echo $this->htmlEscape($this->__($_data['label'])) ?> <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?> <?php } ?> <?php endforeach; ?>
HOWTO: Fix client denied by server configuration: /var/www/magento/app/etc/local.xml
This is a standard Magento security check on the permissions of the important file app/etc/local/xml, but it can lead to your server logs filling up unnecessarily.
If you are sure the security is up to par on your server, then you can disable it by editing app/design/adminhtml/default/default/layout/local.xml
<layout> <default> <remove name="notification_security" /> <remove name="notification_survey" /> </default> </layout>
HOWTO: XML Blocks
Popular Tags
<reference name="left"> <block type="tag/popular" name="tags_popular" template="tag/popular.phtml" /> </reference>
HOWTO: Stop Search Engines
System > Configuration -> Design -> HTML Head > Default Robots > NOINDEX,NOFOLLOW
HOWTO: Make Community Edition Like Enterprise Edition
http://www.mcnab.co/blog/e-commerce/magento/magento-community-vs-enterprise-editions/
HOWTO: Speed Up / Optimise Your Magento Web Site
http://www.gxjansen.com/101-ways-to-speed-up-your-magento-e-commerce-website/
- magento: admin: turn on cache, flush and reindex
- mysql: tables: mysqlcheck --analyse and --optimize
- php: apc cache
- apache: tweaks: disable modules, pagespeed module
- varnish: cache accelerator
HOWTO: Disable Magento PHP Compilation Compiler Cache Via SSH
cd /path/to/public_html rm -rfv var/cache/* var/session/* var/log/* var/locks/* php -f shell/compiler.php -- disable php -f shell/compiler.php -- clear
HOWTO: Disable All Modules
nano ~/public_html/app/etc/local.xml <disable_local_modules>true</disable_local_modules>
HOWTO: Fix Error: Flex Library Not Loaded
Give full permissions to the following folder...
js/lib
...but then put back the security when you've finished editing.
HOWTO: Fix Error: Missing Drop Down Menus On Admin Panel
Find out which group your web server software runs as, then...
cd /path/to/magento/root/folder chgrp -R nobody media/ chgrp -R nobody var/ rm -rfv var/cache/*
Log out of Admin Panel, then back in again, and then go to Frontend to check.
Thanks - http://www.learnmagento.org/magento-tips-tricks/admin-panel-drop-down-menu-missing-in-magento/
HOWTO: Fix Error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct()
If you get this error...
Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in /home/wtc/public_html/lib/Zend/Pdf/FileParserDataSource/File.php on line 41
This error has something to do with inheritance in latest versions of PHP 5.4+
METHOD A
Just edit the following file, and comment out the lines shown in bold...
nano /path/to/magento/folder/lib/Zend/Pdf/FileParserDataSource.php //abstract public function __construct(); /** * Object destructor. Closes the data source. * * May also perform cleanup tasks such as deleting temporary files. */ //abstract public function __destruct();
Save and exit, then test the orders invoices printing function again.
Thanks - https://www.goivvy.com/blog/magento-zend-pdf-php-5.4
METHOD B
Update your Zend PHP Library.
HOWTO: Test For Shoplift Bug
HOWTO: Setup For Lighttpd
# Deny access to hidden files $HTTP["url"] =~ "/\." { url.access-deny = ("") } # Deny access to these directories $HTTP["url"] =~ "^/(app)/" { url.access-deny = ("") }
HOWTO: FIX: No Space Left On Device And Clear Magento Session Cache
#!/bin/bash find /var/www/domain.com/html/var/cache/ -type f -mmin +120 -exec rm {} \; find /var/www/domain.com/html/var/session/ -type f -mmin +120 -exec rm {} \; find /var/www/domain.com/html/var/report/ -mtime +7 -exec rm -f {} \; find /var/www/domain.com/html/var/tmp/ -mtime +1 -exec rm -f {} \;
Thanks - http://haydenjames.io/pruning-magento-cache-sessions-using-cron/