Friday, June 28, 2013

Magento change Multiple select to dropdown with select all option in Advanced search

How to change Multiple select to dropdown with select all option in Advanced search - Magento.


Simply change statement in ... Mage/Block/Advanced/Form.php around line 207 (Magento 1.7)
if (is_array($options) && count($options)>2)
to any number higher than the number of your attribute options:
if (is_array($options) && count($options)>10000000)
Example:
Original code:
if (is_array($options) && count($options)>2{
            $extra 
'multiple="multiple" size="4"';
            
$name.= '[]';
        
}
        
else {
            array_unshift
($options, array('value'=>'''label'=>Mage::helper('catalogsearch')->__('All')));
        
}
My code:
if (is_array($options) && count($options)>50{
            $extra 
='multiple="multiple" size="4"';
            
$name.= '[]';
        
}
        
else {
            array_unshift
($options, array('value'=>'''label'=>Mage::helper('catalogsearch')->__('Select all')));
        
}
My code, with dropdown option:
if (is_array($options) && count($options)>50{
            $extra 
= array();
            
$name.= '[]';
        
}
        
else {
            array_unshift
($options, array('value'=>'''label'=>Mage::helper('catalogsearch')->__('Select all')));
        
}

Saturday, January 12, 2013

Dodajanje jezika (prevoda) na Magento stran.

Postopek dodajanja novega jezika na magento stran na kratko.


V nekaj korakih dodate in ustvarite dodaten jezik na svoji strani.

  1. Preko Magento Connect v adminu namestite izbran jezik. 
  2. Ko je nameščeno (odjava iz admina, ponovna prijava in clear cache je standardni postopek) izberete System -> Manage Stores -> Create store view. 
  3. Izberete ustrezen Store ( Main Website store najbolj pogosto ) Dodate Name, Code in Status date Enabled.
  4. Sedaj izberete Configuration -> Current Configuration Scope (izberete Name, ki ste ga v prejšnjem koraku ustvarili) in na desni strani pod “Locale options” izberete jezik, nameščen v prvem koraku. 
 To je to. Na strani se mora pojaviti izbirnik za izbiro jezika. Ne pozabite klikniti Clear cache :)

Monday, November 26, 2012

Create xml sitemap for Magento store


Quick quide to create a sitemap.xml for Magento store


This is quite simple but necessery if you want to connect your magento store with webmaster tools.

  • Log in to Magento Admin
  • Go to Catalog > Google Sitemap in the admin
  • Click ‘Add Sitemap’
  • Enter these details:
    filename=sitemap.xml
    path=/


  • Click Save
  • To finish and actually create sitemap, you have to click Generate.

Thats it. Now you have your magento sitemap.xml which you can use in your webmaster tools.