Magento : Add sorting condition
Today, I add to make my category menu reflect the category order in the backend (not ordered by name).
The only thing you have to do is to add "addAttributeToSort('attName', 'sortDirection')" in your template the next function in the loading instruction.
$collection = Mage::getResourceModel(’catalog/category_collection’)
->addAttributeToSelect(’name’)
->addAttributeToSort('position', 'asc')
->addAttributeToFilter('is_active', 1)
->load();
Hope it'll help you too.
Enjoy
Magento : Product price list sort bug
A Magento bug exists on 1.3.xx (and maybe 1.4) on the product list.
When you want to sort the products by price, it does't works.
To fix this, here's the way :
Open the file : app/code/core/mage/catalog/model/resource/eav/mysql4/product/collection.php
Go to line 1156 - 1158
It should looks like
$this->getSelect()->joinLeft(
array('_price_order_table'=>$this->getTable('catalogindex/price')),
"{$entityCondition} AND {$storeCondition} AND {$groupCondition} AND {$attributeCondition}",
Remove the "AND {$groupCondition}".
Save then test.
Now the sort works logged in and out
Magento : Run a specific store or website
If you have a single Magento installation with multiple websites/stores and you want, for exemple like me, adding ajax functionalities, you'll need to load magento framework in your ajax page.
To do this you can use this tip :
// Put the website or store code (default: 'base')
$code = 'store/website code';
// Put the type to load ('website' or 'store')
$type = 'store' or 'website';
// Load magento framework
Mage::app($code, $type);
// Load magento framework and run the website/store
Mage::run($code, $type);
Now you'r able to use magento framework functionnalities.
Typogento. Bad support, bugged extension.
Just a little post to say that typogento sucks a lot...
Typogento team doesn't upgrade TypoGento extension while Magento is upgraded, the API too....
Now (on 1.3.2.3 and 1.3.2.4), it's totally buggy. I've fixed two bugs, reported them with the fix on the tracker, but now update from a time ago.
All that to say that dont try to use TypoGento, it's a waste of time.
Good afternoon.
TYPO3 + Magento = TypoGento
Do you need to use Magento into your TYPO3 website ? TypoGento is there for you !
I discovered it some days ago and use it now.
TypoGento allow your users to log into Magento with there TYPO3 account.
TypoGento provided too an API for TYPO3
