Viewing 21 to 30 of 86 items
Archive | Experience RSS feed for this section

Magento – Set default value to custom attribute for all products

I have created the custom attribute (test) for products as a text field with default value('test') from admin panel And assign that attribute to default attribute set. Now I can able to see the new custom attribute in product edit page. When I try to filter with the product collection Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('test', array('like' => 'test'))->getData(); It returns the  Full Article…

0

Magento – Filter product collection by special price

To create a new page with products have special price only, you need to create a new block that filters discounted products.  Let’s create this file, Special.php in local/Mage/Catalog/Product/Block/ directory. You will have to create this directory path if it’s not already there. Using below code to create new block  <?php class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List  Full Article…

0

ErrorException: proc_open(): fork failed – Cannot allocate memory in phar

If you see the errors like that ErrorException: proc_open(): fork failed – Cannot allocate memory in phar:///var/www/workspace/MyProject/build/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php on line 943 Call Stack: 0.0523 765208 1. {main}() /var/www/workspace/MyProject/build/composer/composer.phar:0 0.0528 763216 2.  It means your server doesn't have enough memory for composer executes their commands. You can solve it by upgrading your server or you can create  Full Article…

1

Magento – Get the last added product and cart items

This code will show you how to get the product id of the last product that was added to the shopping cart, and all the products currently in the shopping cart. $productID=Mage::getSingleton('checkout/session')->getLastAddedProductId(true); echo $productID."<br>"; $_product=Mage::getModel('catalog/product')->load($productID); echo $_product->getName()."<br>";   $session= Mage::getSingleton('checkout/session'); foreach($session->getQuote()->getAllItems() as $item) {     $productID = $item->getProductId();     $productSku = $item->getSku();     $productName = $item->getName();     $productQty = $item->getQty();  Full Article…

3

Ubuntu – Assign static name for partitions

If you are running Linux system and you have an additional disk in your computer, you can see that the partion name will change after you reboot your operating system. That's issue is not good for users who want to have a static link of those partitions. Here is the solution to resolve your problem.  Full Article…

0

Magento – Abandoned carts report doesn’t work

Solutions: Yes this is known bug caused by the middle name attribute in recent versions of Magento. Here is the solution for this issue, we need to insert records for middle name attribute for old customers, here is the script to update database table   require 'app/Mage.php'; Mage::app('default'); $db_read = Mage::getSingleton('core/resource')->getConnection('core_read'); $tablePrefix = (string) Mage::getConfig()->getTablePrefix();  Full Article…

0

Centos – Install latest GIT version

I found this nice and easy-to-follow guide on how to download the GIT source and compile it yourself (and install it). If the accepted answer does not give you the version you want, try the following instructions: http://tecadmin.net/install-git-2-0-on-centos-rhel-fedora/ (And pasted/reformatted from above source in case it is removed later) Step 1: Install Required Packages Firstly we  Full Article…

0

Apache and httpd running but I cant see my website

If you have installed apache on my server however you can not browse your website through your server's IP. Here is some reasons: firewall, iptables configuration apache listen address / port More information is needed about your configuration. What distro are you using? Can you connect via 127.0.0.1? If the issue is with the firewall/iptables, you  Full Article…

0