Enabling Spellchecker in Magento WYSIWYG editor

A little bit of a puzzling one, and not appearing to be much information about this, seemingly straight-forward task. Enabling the spellchecker plugin in TinyMCE in Magento’s admin. Here’s how you do it; In js/mage/adminhtml/wysiwyg/tiny_mce/setup.js, find “theme_advanced_buttons3”, and update it as follows; theme_advanced_buttons3 : ‘tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl,|,fullscreen,|,spellchecker’, Then find “var plugins” (should be a handful of lines […]

Creating products programmatically in Magento

Let’s face it – importing is hard. Especially if it’s from some other unfamiliar product, or something that doesn’t already have a Dataflow/import plugin for Magento already. Dataflow has its limits. I’ve actually found it easier to import manually (creating models for products) as opposed to writing Dataflow routines. However, one of my biggest bug […]

Get website-level configuration in Magento

I stumbled across this one a couple of times now, and it’s caught me out every time. With Magento, you have the method Mage::getStoreConfig() to get a store-level config, but nothing obvious to get a website-level configuration (such as a default URL for the website). So I used this; Mage::app()->getWebsite($websiteId)->getConfig(‘web/unsecure/base_url’) It’s the same syntax as […]

Bug in Magento 1.6.1.0/1.6.2.0 affecting development sites using base_url

I installed a copy of Magento 1.6.1.0 on a dev site I setup to do some testing with Varnish with (more on that later). However, in the requirement to be able to get to Magento using 2 different URL’s, I stumbled across this quite annoying bug. a:5:{i:0;s:67:”Illegal scheme supplied, only alphanumeric characters are permitted”;i:1;s:729:”#0 /home/dan/workspace/magento1610/app/code/core/Mage/Core/Model/Store.php(712): […]

Getting Configurable Product from Simple Product ID in Magento 1.5+

I recently stumbled across a hurdle which stopped some of my code from working. It was code that gets the configurable product associated with a given simple product. Many solutions out there call a “loadParentProductIds()” function within the Mage_Catalog_Model_Product class. However, as of Magento 1.4.2.0, they deprecated this method, simply by setting the data element […]