Get an array of billing addresses and shipping addresses in Magento

January 21st, 2013 by laeeq | No comments

Sometimes we need an array of all shipping or billing addresses of those users who’s logged in the past. But Magento has no built in function to get an array of all shipping or billing addresses. However, you can do this by creating such an array by grabbing the address collection. Something likes this:

Read Full Post »

Magento, PHP Tutorial

Duplicate Data Issue with Custom Magento Collection

January 21st, 2013 by laeeq | No comments

We often face problem of duplicate data while working accessing custom Magento collection. For example the collection gets duplicated multiple times with the same result after adding an item such as $dataCollection->addItem($dataObject). Actually the issue arises when we add the same object to the collection each time. We need to create a unique Varien_Object for each file and also create our $dataObject inside the foreach loop, like this below:

Read Full Post »

Magento, PHP Tutorial

Tips To Improve Your Ecommerce Site’s Security

September 2nd, 2012 by laeeq | 3 comments

Today security is the main concern for all eCommerce website because these website’s have very important transactions data. However, we can limit the security holes by adopting few easy steps. Here in this post I have explained few basic points that causes security risk in your eCommerce website. So you should make sure that you are on top of them.

1. Setup SSL(Secure Socket Layer) certificate

This is the first steps secure your website’s data. SSL ensures that data transferred to and from your website’s pages is encrypted. This SSL encryption keeps hackers from being able to read the shopper’s credit card information while it is being transmitted to the website. You just need to get SSL enable in your hosting which is quite easy. Then needs to enable SSL for checkout and account page’s. if you are using Magento eCommerce solution then its very easy to enable SSL support for your custom page’s or entire website. Read Full Post »

Articles, Magento

Magento: Display New Products from Specific Category On Home Page

August 31st, 2012 by laeeq | No comments

In my previous post, I have posted the code to add new products on your Magento home page or any page. Sometimes we have a requirement to display products category wise. Magento has built in functionality to display products from specific category. It is very simple , just set products “as new” in your catalog, only those products that belong to that category. And finally add below code in your CMS page:

{{block type="catalog/product_list" category_id="10" name="home.catalog.product.new"
alias="product_homepage" template="catalog/product/new.phtml"}}

Read Full Post »

Magento

Dealing with Magento Model or Collections

August 30th, 2012 by laeeq | 1 comment

As We know that the implementation of a “Models Tier” is a important part of any MVC framework. It represents the data of your application, and most applications are useless without data. Magento Models play an even important role, as they contain the “Business Logic” that’s often relegated to the Controller or Helper methods in other PHP MVC frameworks.

Actually in case of collections in Magento. Collection is a Model type containing other Models, it is basically used in Magento to handle product lists from a category or a bundle option, but not only.

Below is a simple example of loading some product collection from a category and ordering them on their product name using Magento’s API.

$collection = Mage::getModel('catalog/category')->load($categoryId)
    ->getProductCollection()
    ->addAttributeToSort('name', 'ASC');

Read Full Post »

Magento

Magento: Display New Products On Home Page

August 29th, 2012 by laeeq | 2 comments

Sometimes you have a requirement to display new products on home page or any page in your Magento site. For this Magento has a built-in feature to dispaly new products on any page. You just need to paste the below code in your CMS page to show new products.

  1. {{block type=“catalog/product_new” name=“home.catalog.product.new”
  2. alias=“product_homepage” template=“catalog/product/new.phtml”}}

Read Full Post »

Magento

Magento: Display More Than 5 New Products

August 27th, 2012 by laeeq | 1 comment

Sometimes we have to display more new products than default number. The default count of new products in Magento  is fixed only 5. But you can display more than 5 new products without modifying Magento core files. You can use below code for setting new product count according to your requirement.

  1. {{block type=“catalog/product_new” name=“home.catalog.product.new”
  2. alias=“product_homepage” template=“catalog/product/new.phtml”
  3. _productsCount=“20″}}

The “_productsCount” determine how many new products will be displayed. Here I have set 20 product but you can change this according to your requirement.

Read Full Post »

Magento

Override Controllers in Magento

August 14th, 2012 by laeeq | 1 comment

magento_ecommerce

While working om Magento project, somtimes we need to edit Magemto’s core module files. But it is not right way to play with Magento’s core module file as it can create issues while version update. Magento provides very easy way to overide core modules functionality. you have learned about Override Magento Admin Controller. Here in this post you will learn how to override Magento controller. But controller overriding require some basic knowledge of Cusotm Magento Module development. So before you start override controller, learn how to create custom Magento module.

Here we will override checkout module controller.

Read Full Post »

Magento

Web services in Magneto

August 10th, 2012 by laeeq | No comments

magento_ecommerce_web services

In my previous post, you have  learned how to Magento – Models, resource models, and collections and about Display Related products on product details page in Magento .  Here in this post you will know about MagnetoWeb services.

Magento is a award winning e-commerce solution which provides extensive module-based functionality, including online shop management, catalogue and product management, marketing and promotional tools, eCommerce SEO, secure and easy to use shopping carts, mobile eCommerce, web service api and product browsing.

Magento web services api provides you with the ability to manage your eCommerce stores by providing calls for working with resources such as customers, categories, products, and sales orders. It also allows you to manage shopping carts and inventory.

Read Full Post »

Magento

Improve the performance of your Magento store

July 20th, 2012 by jitendra | No comments

As we know, improving Magento performance is always at the top of the list for most professional Magento developers. actually website loading speed is a major factor when it comes to search engine rankings, retaining viewer interest and turning viewers into customers. Although Magento is a fast loading Ecommerce website out of the box but there are many ways to tweak it for more speed. Increased speed can easily translate into more sales and better rankings in the search engine result pages. Below are few steps that will surely improve performance of your Magento store.

Read Full Post »

Magento