Blog

All articles written by us are here...

Home Blog Page 2
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.

 

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] Like to share it
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 attributes like “Front Camera” in laptop is necessary to show as an product attribute, but into project it should not. Because the store uses the same attribute sets for each...
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 will able to show products as descending by its Name, Price and Position. For change order from Ascending to Descending: For this we need to update a little bit into...
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(); Like to share it
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 file up and see the code used for the same <?php global $product; ?> <?php if ( $price_html = $product->get_price_html() ) : ?> <span class=”price”><?php echo $price_html; ?></span> <?php endif;...
Read More
Like to share it