-
To retrieve data when in the Category View, /catalog/category/view.phtml, one only needs to use the getCurrentCategory() method and a specifier to the attribute wanted. getCurrentCategory() returns the registry key for the current category view and, inherently, the Category Model Object: $this->setData(‘current_category’,...
-
It’s not exactly a needed function, I would think, but it’s an exercise in data manipulation. The goal for this post is to retrieve the names of all Categories, in a specific store, outside of the Magento install directory. Logic for pulling the names of all categories first appears in the top navigation of...
-
I needed to swap out the default ‘top.links’ that are populated by ‘template/page/top.links.phtml’ and assorted ‘layout/*.xml’ files, respectively. In most installs, I create a ‘layout/local.xml’ that overrides existing xml layout files within Magento. In this particular...
-
There many ways to get existing functionality into a different block within Magento. One can call in the needed Model, Helper or Session. One can build a module that recapitulates the functionality into an extension. Or one can modify the layout files to include the needed block. In this case, using the layout xml files...
-
Magento is built using the Zend PHP Framework, which utilizes the MVC design pattern. An explanation of MVC can be found by a Google search and is beyond the scope of this snippet. For our purposes, one only needs to understand the model or M in MVC. The model manages the data of the application more »
-
I’ve seen this request on a lot of forums so it would seem to be a fairly common request. Modern eCommerce users typically look for some type of cart notification in the top-right corner. Rather than fight that training, most would seek to encourage it as it, 1) Makes usability that much better and 2) They don’t...
-
Magento is all about taking notes and standing on the shoulders of others. I frequently reuse code that others provide to make development a little faster and smoother. I hope to help out others as they learn by sharing my learning experiences. In this case, a current client needed two search bars on any given page.
-
For the shopmyzfa.com website, they needed to display their newest products on their own page. To do this I created a new CMS page entitled, go figure, “New Arrivals”. Using the ‘custom design’ options that Magento affords for each CMS page I added a block to pull all the products that are marked...
-
Recently a client needed to integrate some kind of calendar into their site that was both easily updated and could be used outside of the site itself. Immediately I thought of Google Calendar, a simple and intuitive organizer of event information.
-
One of the drawbacks of Magento is currently its speed if default configuration is used. There are certain ways of making it run faster. The best one is to enable GZip compression by changing .htaccess file a little.
12
