Tag: Magento

How to Add CSS & JavaScript to a Magento CMS Page

Magento is an insanely flexible system that has a lot of potential, but of course with this flexibility comes a lot of learning.

Adding a JavaScript file and a CSS file to a specific CMS page isn’t very difficult. We should always consider adding the JavaScript file or CSS file to the theme if we’re going to use it on more than one specific page. Continue reading

Magento – Stuck in Maintenance Mode

After upgrade magento to, my client’s website was stuck in magento maintenance mode. I wasn’t able to easily find a way to fix it by looking in the normal database tables, but did locate a file called “maintenance.flag” in the magento root.

So, to fix maintenance mode look for the maintenance flag and remove it and your shop will be back online!

How do I upgrade magento?

Before you upgrade magento you should be sure to make a complete back up of your files and your database. (It also isn’t wise to test the upgrade on a production store!)

To upgrade the easiest way is to make use of downloader, using a user with permissions, sign in, and then use the following extension key:

For more information and alternative methods visit the wiki article.

Magento – Adding Feaured Products to Front Page

The owner of Nature Bumz wanted to be able to add featured products to the home page of their magento store each day without having to modify to edit the content.

Inchoo has created a great extension, called Featured Products, that features a great backend allowing the admins to choose featured products from a simple grid. (Catalog -> Featured Products.)For the front end, it’s very easy to add the required code to the content:
{{block type="featuredproducts/listing" template="inchoo/block_featured_products.phtml"}}

Don’t forget to refresh the cache after you install through downloader or you might get some errors. 😉

Magento – Setting Paypal to Redirect Back

Quick steps on how to redirect back to your magento store upon a successful purchase. Unfortunately, you can only redirect to one page.

      Sign into Paypal account
      Click directly on Profile -> Website Payment Preferences
      Change Auto Return to on.
      Fill Return URL to http://www.mymagentositregoeshere.com/checkout/onepage/success/
      Save and then go test it!

After a successful paypal payment the customer will be redirected back to the magento order success page. Hope this helps!

Magento – How to Enable Logging

Magento is an excellent project that so far hasn’t been too difficult to program for. Initially learning how to use magento has been fairly tough: there are a lot of settings and fields that should be set before the site becomes visible to visitors and of course indexed. I won’t touch on magento seo right now, but I will say that so far my impression is that magento was designed with seo in mind.

By default, logging is turned off in magento. Logging for magento should be turned off by default because the logs can rapidly increase; when programming on magento I turn the logging on to try and catch those occasional bugs or errors that occur. I always shut the logging off after I have completed any programming tasks.

We should always make sure that we do not make the logs visible to the normal user either because of the potential for database names or credentials to be spewed out in the log.

Steps to turn on logging:

      Go to your admin area usually: http://www.yourdomainhere.com/admin
      Go To Configuration
      Scroll to the bottom of the screen, look on the left for Advanced and click Developer
      Expand Log Settings and change Enabled drop down list to Yes
      Click Save config.

Note that magento stores log files by default in: var/log/system.log and var/log/exception.log.

Hope this helps!