Blog

All articles written here are the lists.

Home Blog
Blog of WordPress Developer,Codeigniter Developer,PHP Developer Shashi Dhar Kumar

Our blog offered in different articles on various technology areas like WordPress, e-Commerce, Web Hosting, Joomla, PHP, Domain, Drupal, Updates & Support, Analytics. If you need any kind of article on technology we will write for you.

If you want to view our portfolio than please visit us.

 

How to group Security Headers for web application using htaccess?

How to group Security Headers for web application using htaccess? X-XSS-Protection sets the configuration for the cross-site scripting filters built into most browsers. The best configuration is “X-XSS-Protection: 1; mode=block”. X-Frame-Options tells the browser whether you want to allow your site to be framed or not. By preventing a browser from framing...
Read More

Remove decimal value from price of product in magento

Price of product is : 135.00ZAR => 135ZAR How to remove decimal value from product price in magento? In order to remove decimal digits in price of product magento, we need to custom some code :Go to this file : app/code/core/Mage/Directory/Model/Currency.php Open app/code/core/Mage/Directory/Model/Currency.php Find the following code on line no...
Read More

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 ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L]
Read More

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 and laptop have different kind of product...
Read More

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 descending. By changing direction we...
Read More

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') ->addFieldToSelect('*') ->addFieldToFilter('customer_id', $_customer->getId()) ->addAttributeToSort('created_at', 'DESC') ->setPageSize(1); ID echo $orders->getFirstItem()->getId();
Read More

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(); ?></span> For default price template file of woocommerece you can look at folloiwng location yourtheme/woocommerce/loop/price.php. Open the...
Read More

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 custom code. Filter Hooks allow you to manipulate...
Read More

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 achieve this: Images: Always work and save...
Read More