My Blog
Redirect from non-www to www in CakePHP
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 ^...
How to hide product attributes with no value in Magento
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...
Change default sort order ASC to DESC for product listing in 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...
Get last order of an customer magento
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 = Mage::getResourceModel('sales/order_collection')...
How to use WooCommerce’s default price at any custom template
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 $product->get_price_html();...
How to use hooks (actions and filters) in wordpress and woocommerce
What are hooks? Hooks are helpful in WordPress which allow you to manipulate code without editing core files. It is used extensively used throughout WordPress and WooCommerce by developers. Two types of hook: actions and filters. Action Hooks allow you to insert...
How to optimize files and images of website?
Optimizing Websites: Optimizing your website’s files is very important for better utilization of server resources. Even a high end server can fail to deliver the speed and performance that you look for, if the website is not optimized. Following are the steps to...
Steps To Follow When Updating WordPress
The WordPress upgrade system is improved itself from last version. However, there are some steps you can take care to ensure that your upgrades doesn't affect anything. First and foremost, upgrades and updates should be done during your off hours i.e for off visit...
Remove links from myaccount in magento
The easiest way to remove any link from the My Account panel in Magento is to first copy: app/design/frontend/base/default/template/customer/account/navigation.phtml to app/design/frontend/enterprise/YOURSITE/template/customer/account/navigation.phtml Open the file...
WordPress comment form validation
Copy and paste below and see the validation in working: <style type="text/css"> .error { font-size: 12px; padding: 0 0 5px 0; color: #FF0000; } input.error, textarea.error { background: #FFD2D2; color:#000000; } </style> <?php function...
Join My Newsletter
Like Us
Follow Us
Contact Me
Email: me@shashidharkumar.com
Phone: +91-943-185-6038