Click Fraud Protection
PHP related blog, freelancer to hire!

Archive for the Drupal 6.xx Category

How to access magento search results externally (Drupal, Joomla, Zend Framework, Symfony etc)

Blast Search Lucene module enables you to get superquick results delivered to external application Options are: 1) if applications are on the same server you can simply include Magento code and use module method:   $queryText = ‘stainless’; $storeId = 1; $mageFilename = ‘../path_to_your_magento_document_root/app/Mage.php’; require_once $mageFilename; umask(0); […]

Read more

How set active item in primary links menu in Drupal

I wanted to set item to be active from my module. After research i found quite easy way to do it. I found theme_links() which are preparing menu to be displayed. Copy that into template.php in your theme folder. My function is quite simple: function YOURTHEMENAME_links($links, $attributes […]

Read more

How to modify Drupal Views SQL

I wanted to sort my views result on field which doesn’t exists in db table, so my idea was to use: SELECT … WHERE field IN (value1, value2) … ORDER BY field = value1 DESC, field = value2 DESC  etc Which orders my elements exactly as I […]

Read more