Magento
Dependant layered navigation filters in Magento
Mar
11th
Although not the best method, we wrote a quick and easy means to remove layered navigation filters that are dependant on other filters being enabled. This code should really be in the block and popped into an extension – with the attributes administrable via the backend, but for the purposes of this tutorial – we...
Custom attributes for categories in Magento
Feb
25th
Sometimes there is a requirement to have custom attributes for a category, but it isn’t that straightforward to add, at least not through the GUI.
The method, for a text input, is:
1
Create the new attribute via admin, or via SQL using the following:
INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_input_renderer`,...
How to disable WYSIWYG on Magento 1.4
Feb
24th
The new WYSIWYG feature is brilliant … for non-developers, but for the rest of us, Magento popping P tags left right and centre is no fun.
It can be easily disabled by going to Admin > System > Configuration > Content Management > WYSIWYG...
Magento 1.4 Install Errors
Feb
19th
We imagine there is going to be a few, but here are the ones we have come across so far:
1
Unsupported operand types … Hostname.php
Solution: Comment out line +471 in ./lib/Zend/Validate/Hostname.php
#$regexChars += include($this->_validIdns[strtoupper($this->_tld)]);
2
Invalid mode for clean
Solution: Remove ./app/code/core/Zend/Cache/
3
Invalid argument supplied for foreach … toolbar.phtml
This is due...
Even better Wordpress and Magento integration
Feb
19th
A few clients have asked for some modifications to the existing Magento and Wordpress extension to support additional features, so we are passing them on to you!
New updates include:
META tag support
No more 301 redirects for downloadable content
Improved performance
META tag support
Magento 1.4 Support
Minor bug fixes
Integrate Wordpress and Magento...
Quick script to mass enable categories in Magento
Feb
4th
Just another easy one if you are looking to enable categories by ID – we usually incorporate this script into our product insertion API, so that it enables a category automatically for a product upon insertion. But it can also be used standalone.
This script would be ideal alongside our export Magento category ID script
...
Mass update stock levels in Magento – FAST
Jan
31st
This isn’t ground-breaking code, but rather just using some core code in a rather stripped out manner. As we’re not big fans of Magento data flow here, we perform most of our stock and catalogue updates using external scripts to Mage::app. We have been trickling elements of these out to the wider world so you...
Display Attributes on Invoice or Packing Slip in Magento
Jan
22nd
Add this to Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php, replace ATTRNAME as appropriate.
public function draw()
{
...
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $this->getSku($item), array('ATTRNAME'));
if ($product) {
$lines[0][] = array(
...
Simple and effective Wordpress and Magento integration
Jan
22nd
We’re not trying to re-invent the wheel here, nor are we going into any depth of connecting the authentication modules. From a front-end standpoint, the two “elements” wordpress and magento are essentially one – but all administration is carried out via either separate admin.
Where our solution works better than the others (Lazzymonks or ActiveCodeline), it...
Cleanly delete all categories in Magento
Jan
22nd
If you have been working on a demo store – or yours is still in the early stages of construction, you will probably find it necessary to remove all the categories to start fresh at some point.
Thanks to CasualCommerce, there is a pretty straightforward MySQL “script” to clear out the tables and start fresh.
...

