(Solution): MDN CrmTicket Bug when searching for a name and go back to Grid View

23. August 2016 at 18:18

firebug

In function „getCondition“ in der class
app/code/community/MDN/CrmTicket/Block/Admin/Widget/Grid/Column/Filter/CustomerName.php

change this buggy part

        if ($customerIdsSelected && sizeof($customerIdsSelected)>0) {
            if((count($customerIdsSelected) == 1) && count($customerIdsSelected[0] > 0)) {
                return array('in' => $customerIdsSelected);
            } else {
                return null;
            }
        }
        else
          return null;
      }

to

        if ($customerIdsSelected && sizeof($customerIdsSelected)>0) {
            if(count($customerIdsSelected) == 1 && count($customerIdsSelected[0]) > 0) {
                return array('in' => $customerIdsSelected);
            } else {
                return null;
            }
        }
        else
          return null;
      }

BTW: The programmer from MDN-CrmTicket unfortunately disregard both Zend and Magento Coding Style Guide! 🙁

 

Please share this article von facebook & google plus or where you want, thank you!

GD Star Rating
loading...
GD Star Rating
loading...

Magento: Access Denied errors after installing SUPEE-6285 or since Magento 1.9.2.1 – ACL Error – Solution

13. August 2015 at 15:06

If you use restricted admin accounts, some menus of third party extensions might not work anymore for them. The reason is that the default return value of Mage_Adminhtml_Controller_Action::_isAllowed() has been changed from true to Mage::getSingleton(‚admin/session‘)->isAllowed(‚admin‘). Extensions that do not override this method in their admin controllers because they don’t use the ACL, now need the „ALL“ privilege.

The only solution is to patch the extensions and add this method to all their admin controllers:

protected function _isAllowed()
{
  return true;
}

Or if they actually have an ACL resource defined in etc/adminhtml.xml:

protected function _isAllowed()
{
  return Mage::getSingleton('admin/session')->isAllowed('ENTER RESOURCE IDENTIFIER HERE'); //e.g. 'admin/sales/productreturn'</pre>
} 

 

Please share this article von facebook & google plus or where you want, thank you!

GD Star Rating
loading...
GD Star Rating
loading...

Magento: kleine nützliche Toolbar

10. September 2010 at 12:27

Hier findet ihr eine kleine nützliche kostenfreie Magento-Toolbar!

Product Description

Advanced developer toolbar with profiling, db queries, block nesting, requests and caching.

Features:

  • Requests: involved controller classes, modules, actions and request parameters
  • General Info: website id, website name, store id, store name, storeview id, storeview code, storeview name and configured caching method
  • Blocks: overview of block nesting
  • Config: enable/disable frontend hints, inline translation and cache clearing
  • PHP-Info: output of phpinfo()
  • Profiling: output of Varien_Profiler with function execution time, function count and memory usage
  • Additional Information: version information, page execution time and overall memory usage
  • DB-Profiler: Number of executed queries, average query length, queries per second, longest query length, longest query and detailed query listing including simple syntax highlighting of SQL.
GD Star Rating
loading...
GD Star Rating
loading...

Magento: Statischen CMS Block im Template ausgeben

10. Juli 2010 at 16:27

Ihr könnt in Magento ein statischen CMS Block wie folgt im template einbinden.

Ein Beispiel zum einbinden über die entsprechende layout.xml :

<layout>
<asdf_xy_zzz>
<reference name="content">
 <block type="cms/block" name="cms_store_check">
 <action method="setBlockId"><block_id>store_check</block_id></action>
 </block>
 </reference>
 </asdf_xy_zzz>
</layout>

Direkt einbinden im Template:

echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_id')->toHTML();?>

Einbinden im CMS:

{{block type="cms/block" block_id="your_id" template="cms/content.phtml"}}

 

GD Star Rating
loading...
GD Star Rating
loading...

Magento: Über ein url-key einer Kategorie ein Link erzeugen

8. Juli 2010 at 20:36

Im Admin-Backend ist es möglich ein url-key für z.B. Kategorien zu setzen. Möchtet ihr jetzt automatisch von Magento anhand dieser ein Link erzeugen, könnt ihr das wie im folgenden Beispiel:

<a href="<?php echo Mage::getModel('catalog/category')->load(Mage::getModel('catalog/category')->getCollection()->addAttributeToFilter('url_key', 'all-bags')->getAllIds())->getUrl(); ?>" title="All bags" ><?php echo $this->__('All bags'); ?></a>
GD Star Rating
loading...
GD Star Rating
loading...