Magento get products from category randomly
-
zendnwar
-
July 24, 2016
-
Magento
-
1 Comment
Just follow the below code $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort() ->addAttributeToSelect(‘small_image’) ->addCategoryFilter(Mage::getModel(‘catalog/category’)->load()); $products->getSelect()->order(new Zend_Db_Expr(‘RAND()’));
Continue Reading
Bootstrap: How to make dropdown navigation Parent links an active link?
-
zendnwar
-
July 21, 2016
-
Others
-
0 Comments
please add below js, hope it will work jQuery(function($) { $(‘.navbar .dropdown’).hover(function() { $(this).find(‘.dropdown-menu’).first().stop(true, true).delay(250).slideDown(); }, function() { $(this).find(‘.dropdown-menu’).first().stop(true, true).delay(100).slideUp(); }); $(‘.navbar .dropdown > a’).click(function(){ location.href = this.href; }); });
Continue Reading
Why Python for Data Analysis?
-
zendnwar
-
June 20, 2016
-
Python
-
0 Comments
Python has become one of the most popular dynamic,programming languages, along with Perl, Ruby, and others. Python and Ruby havebecome especially popular in recent years for building websites using their numerous web frameworks, like Rails (Ruby) and Django (Python). Such languages are often called scripting languages as they can be used to write quick-and-dirty small programs,or scripts. I don’t like the term …
Continue Reading
MySQL 5.7 3x Faster than MySQL 5.6
-
zendnwar
-
June 20, 2016
-
Magento
-
0 Comments
Magento has the biggest slice from the e-commerce cake and it’s a very cleaver but robust system. Any switch/upgrade can be painful even because these systems are customized strongly. This is why business owners and developers don’t upgrade very slowly. But might be the time is here 🙂 In the last few years we can see a very positive progress …
Continue Reading
How to remove decimal price in magento
-
zendnwar
-
May 30, 2016
-
Magento
-
254 Comments
just need to edit core file of Magento app\code\core\Mage\Directory\Model\Currency.php or you can create a file in local folder Find the following : public function format($price, $options=array(), $includeContainer = true, $addBrackets = false) { return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets); } Replace with: public function format($price, $options=array(), $includeContainer = true, $addBrackets = false) { return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets); }
Continue Reading
How to Increase PHP memory limit
-
zendnwar
-
May 19, 2016
-
PHP Basic
-
2 Comments
PHP memory limit sometimes makes it problem to upload. please check way to increase your memory limit. Way 1: Modify php.ini Search “memory_limit” in your php.ini, and change the value of it. If no “memory_limit” found, add the following line at the end of php.ini memory_limit = 2568M ; Save file. And restart Apache. Way 2: .htaccess Find the “.htaccess” …
Continue Reading
Magento: Automatic Related Products Extension free download
-
zendnwar
-
May 16, 2016
-
Magento
-
215 Comments
Automatic Related Products Extension free download
Continue Reading
Changes to login.phtml or register.phtml don’t reflect
-
zendnwar
-
May 12, 2016
-
Magento
-
9 Comments
Please to edit template/persistent/customer/form/register.phtml. Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).
Continue Reading
How big is a Petabyte, Exabyte, Zettabyte, or a Yottabyte?
-
zendnwar
-
May 8, 2016
-
Others
-
211 Comments
8 bit is equal to 1 byte 1024 byte is equal to 1 kilobytes 1024 kilobyte is equal to 1 megabytes 1024 megabyte is equal to 1 gigabytes 1,024 gigabytes is equal to 1 terabyte 1,024 terabytes is equal to 1 petabyte 1,024 petabytes is equal to 1 exabyte 1,024 exabytes is equal to 1 zettabyte. 1,024 zettabytes is equal …
Continue Reading
Python String Operations
-
zendnwar
-
May 8, 2016
-
Python
-
0 Comments
Concatenation >>>’Zend’ + ‘Anwar’ Zendanwar >>>’Zend’ *3 ZendZendZend Iterating Through String >> count = 0 >>> for str in ‘Zend Anwar’: if(str == ‘n’): count += 1 >>> print(count, “String Found”) 2 String Found
Continue Reading