Tag: Magento tip

Cannot insert images using WYSIWYG after Magento upgrade

I have just upgraded Magento 1.6 to 1.9 and everything went as smooth as baby’s bum (or silk).

But there is one issue. I am not able to insert images using WYSIWYG editor. The “Media Storage” dialog box is showing up wired. Look at the screenshot below:

magento_mediastorage_error

Solution:

There is a CSS file called magento.css inside the directory skin/adminhtml/default/default/lib/prototype/windows/themes that is missing on the upgraded version. Move in the file to the new version same location, problem solved!

How to manually upgrade Magento version properly via FTP

magento_upgrade

First of all, to all my fellow wonderful web developers out there, DO NOT modify “core” files when you are tweaking any CMS-based websites. If you want to add in new features, do it through extensions / modules / plugins / addons (or any other fancy jargons), or create “local” copies of core files and make modifications there.

Modifying core files is not only a very bad practice, but more importantly when you upgrade the CMS version, all the changes will be gone (as in Gone with the Wind – ah what a classic! I wish more such movies are made today instead of the likes of Fifty Shades of Grey. Anyways.)

For some unfortunate reason if you have Magento 1.4.1 or earlier, I suggest you to straightaway go to the great Museum of Magento and give a copy of your site. Jokes aside, for Magento 1.4.1 and earlier, you have first upgrade to 1.4.2, and then you can upgrade to any higher version.

Which means to say, for versions later than 1.4.1 you can upgrade to any higher version. Magento has its official page listing steps on how to upgrade via SSH. But on this post, I will be listing steps to upgrade Magento manually via FTP, the good ol’ way.

1. Back up

Keep a back up of both and database and website files before doing the upgrade. Very important!

2. Download the new version

Download the latest version of Magento. Remove all the files of your current site (but you have a back up somewhere) and move in the files from new version you just downloaded.

3. Merge community and local files

DO NOT replace files from old version on new version. Meaning if there is file with the same name and same location on the new version, do not replace but only move the ones that do not already exist.)

Merge these the folders from the old to new version:

  • app/code/local
  • app/code/community
  • app/etc/modules
  • app/js

Pay careful attention on /app/code/community folder and take note of extensions that are installed. When an extension is installed, it also adds files in these locations:

  • /app/design/adminhtml/default/default/template
  • /app/design/adminhtml/default/default/layout
  • /app/design/frontend/base/default/template
  • /app/design/frontend/base/default/layout

So for each extension, locate in these four folders any files belonging to the extensions and move to the new version. For example if an extension is called ABC there probably will be some files called AMC.xml inside “layout” folder and/or folder called ABC or similar inside “template”.

4. Move theme / package files

If your site uses custom theme, move it to new version from app/design/frontend/default/yourtheme.

Or if it uses package move it from app/design/frontend/yourpackage

5. Skin files

If your site uses custom theme, move skin files from skin/frontend/default/yourtheme.

Or if it uses package move skin files from skin/frontend/yourpackage.

Also extensions might have added their own skin files. So check for any skin files associated to each extension in these folders (same point as in step #3 second part)

  • skin/frontend/base/default
  • skin/frontend/default/default

6. Custom admin folder

If there is custom admin folder, move it from from adminhtml/default/yourtheme

7. Go to app/etc/local.xml and change the database setting

8. Check the site and welcome yourself to new Magento!

Magento minimum order amount before discount

We have a Magento store that makes use of “Shopping Cart Price Rules” and minimum order amount. We realised that by default, the minimum order amount is validated after the discount is applied which did not make sense because if the order about is more than the minimum amount the validation should pass, meaning the discounted value should not matter. That means, the minimum about should be validated before discount.

There is a work around:

Copy the file:

app/code/core/Mage/Sales/Model/Quote/Address.php

to

app/code/local/Mage/Sales/Model/Quote/Address.php

Inside the function validateMinimumAmount()

Replace

with

Magento Custom Options not saving

I recently had an issue with Custom Option not saving in a Magento site. A product had around 400 custom options. After editing options and hitting save button, it said “The product has been saved” but the edit was not getting saved at all.

I added these values on .htaccess file and it worked perfect:

Magento – How to add customer’s email address to PDF invoice?

If you want to add customer email to PDF invoices here is how:

Copy a local copy of file Abstract.php by copying from

app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

to

app/code/local/Mage/Sales/Model/Order/Pdf/Abstract.php

If you want to show customer email on Billing Address (Sold to), on the local copy of the above file, around line 313

If you want to show customer email on Shipping Address (Ship to), on the same file around line 331

About me

profileSangay Tenzin
Web Developer, Magento, Concrete5, Wordpress, Shopify, Ecommerce, Website all-rounder, Casual blogger…

Love… Happiness…

Category
Archive
Download

Downloads

Bhutanese Calendar
གནམ་ལོ་ མེ་མོ་བྱ་ལོ།

Fire Female Bird Year 2017

འབྲུག་ཟླ་ བཅུ་པ - བཅུ་གཅིག་པ།

December 2017

ཟླ་བ Sun
མིག་དམར Mon
ལྷག་པ Tue
ཕུར་བུ Wed
པ་སངས Thu
སྤེན་པ Fri
ཉི་མ Sat
 
 
 
 
 
༡༣ 1
༡༤ 2
༡༥ 3
༡༦ 4
༡༧ 5
༡༨ 6
༡༩ 7
༢༠ 8
༢༡ 9
༢༣ 10
༢༤ 11
༢༥ 12
༢༦ 13
༢༧ 14
༢༨ 15
༢༩ 16
༢༩ 17
༣༠ 18
19
20
21
22
23
24
25
26
27
༡༠ 28
༡༡ 29
༡༢ 30
༡༣ 31

Powered by Bhutanese Calendar