Magento
After starting Magento development in 2009. Many projects, different implementations later and a renewed interest in this robust e-commerce platform.. I aim to bring just whatever stumbling blocks and their solutions to Bogiecom.com, in hopes that it could help someone else. Additionally, as things progress any extension development, platform evaluations, and general e-com ramblings that might be of interest will eventually show up here.
Magento Top Navigation Sort Alphabetically
If you are having a little trouble getting the top navigation to ignore the sort order and use alphabetical sort, here is one option you can use… Consider the following code for a navigation menu…
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 32 33 34 |
<ul id="custom-menu"> <?php $_helper = Mage::helper('catalog/category') ?> <?php $_categories = $_helper->getStoreCategories(true, true, false) ?> <?php $currentCategory = Mage::registry('current_category') ?> <?php if (count($_categories) > 0): ?> <ul style="width:940px;"> <?php foreach($_categories as $_category): ?> <li> <b><a class="drop" href="<?php echo $_helper->getCategoryUrl($_category) ?>"> <?php echo $_category->getName() ?> </a></b> <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?> <?php $collection = $_category->getCollection(); $_subcategories = $_category->getChildrenCategories() ?> <?php if (count($_subcategories) > 0): ?> <div class="dropdown_1column" style="width:235px;"> <?php foreach($_subcategories as $_subcategory): ?> <div class="col_1"> <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>"> <?php echo $_subcategory->getName() ?> </a> </div> <?php endforeach; ?> <div class="clr" clear="all"></div> </div> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> |
The problem is when you get down to the secondary level where it you use the getChildrenCategories(). This function […]
Magento Custom Form Field Validators using Prototype (MySQL Date Format)
Here I needed to make sure that the user input was formatted correctly for a MySQL database. The javascript calendar code was set to automatically input the date into the text field in the correct format, but the user still had the option to type it in manually. This was the Prototype validator I used […]
Magento and WordPress Integration – A Couple of Options
Lately, there certainly has been a lot of buzz around the thought of combining WordPress and Magento. If you enjoy using WordPress for your CMS, but want to use Magento as your E-Commerce platform here are some options for you. Lucky for most Magento users, there is an extension that will integrate Magento and WordPress […]