by Shashi Dhar Kumar | Sep 3, 2017 | CakePHP, PHP, Programming
How to redirect from non-www to www in CakePHP? Put the following code into .htaccess in main directory RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} !^www\..+$ [NC] RewriteCond %{HTTP_HOST} !=localhost [NC] RewriteCond %{HTTP_HOST} !=127.0.0.1 RewriteRule ^...
by Shashi Dhar Kumar | Aug 3, 2017 | Magento, Open-Source, Programming
As a working consultant on Magento Project I come across that different product type to have different product attributes. This means that every product will have more than 20 options and sometimes all option don’t apply to certain products. For instance a projector...
by Shashi Dhar Kumar | Jul 3, 2017 | Magento
By default Magento shows products in category pages by ascending order. That’s why latest added product show at last in the Category. If we need to show latest added product at first in Category for this we should change default product order from ascending to...
by Shashi Dhar Kumar | Aug 10, 2015 | Magento, Open-Source, PHP, Programming
Here is the example code by which you can get last order details into mangento of using email id. $_customer = Mage::getModel(‘customer/customer’); $_customer->loadByEmail(‘demo@demo.com’); $orders =...
by Shashi Dhar Kumar | Aug 1, 2015 | Open-Source, Programming, Woo-commerce, WordPress
To use WooCommerce’s price in your custom theme template open the template file and use the following code and see the magic. Example <?php global $post, $product; ?> <span itemprop=”price” class=”price”><?php echo...