How to over-rule core/config model
12 months ago
in Magento
Goal:
Achieve multiple store base_url to a single store.
Everyone who uses Magento knows that every store has single base url stored in the configuration section web/secure/base_url.For any reason of your own, lets say you intend to overcome this barrier and allow multiple domain url’s to access [...]
Zanbyte Geoip – CSV Approach
13 months ago
in Magento
Download The Extension from here and follow these steps:
Wiki/Howto:
1.Download && extract files from these links and put them in /var/geoip
i).http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
ii).http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/
2.Update [...]
How to reindex Magento (without shell)
04 months ago
in Magento
Obviosly if you have access to call bash command lines from PHP, this will not be of any value as you just do $php indexer reindexall and the job is done.But in some shared hosts that wont be an option, so I had to dig up and came up with this code.
/**
* Re-index all out of the bash cli
[...]
Mysql4 concept in Magento – is it going away ?
09 months ago
in Magento
It seems like Magento in recent version a pattern of Mysql4 is being replaced by Resource (not sure from which version this started, it is backward compatible).
This shows signs of going away and even being deprecated in the future, worth for a developer to even adapt his new extension to this [...]
How to patch – CLI
010 months ago
in General
Instructions on Applying the Patch
Go to the root of your Magento root directory: cd /home/mystore/public_html
wget –O patch_name.patch
Download the patch from the provided link appropriate for your version (this line allows you to do it from the Unix command prompt)
Apply the patch: patch -p0 < [...]
How to Start && Stop VirtualBox using init script
011 months ago
in General
Assume that we have build our VPS using VirtualBox, the following scripts will tend to automate the process in starting and stoping that VPS.
Init Script:
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# [...]
“Getting over the “not invented here” mentality”
01 year ago
in General
I’ve gotta be honest: for a long, long time, I was a Do It Yourself kind of guy. Not the, like, installing a new toilet in the bathroom or putting up sheetrock kind of DIY; I was the kind of DIY where, when I built a website, every component I used had to be written by me. There were a few reasons [...]
Adding custom product attributes on Quote Item Collection
01 year ago
in Magento
Problem description:
Assuming we want to retrieve a collection of item from the quote items
i.e Mage::getModel('sales/quote')->getItemsCollection();
Lets say we have our custom product attribute called “custom_product_attribute” and we want it included in this collection.There are 2 approaches to [...]
10 things you should’nt do in Magento
01 year ago
in Magento
Quick list of the things developer should avoid where possible while developing under Magento Platform/Framework:
Hard coding table names
Hard coding include/require paths of core classes e.g require foo.php **see remark below
Try or attempting to solve problems already solved in frameworks.eg. [...]
