Blog

All articles written here are the lists.

Home Blog

Blog

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 :...

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 ^$...

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...

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...

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();

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...

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...

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...

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...

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 and fine this line, it should be around line 34: Right below it add this: Just...