Webspeaks

Sunday, February 26, 2012

Create Custom Tab in Magento Product Add/Edit Page

If you are trying to add a custom tab to the product add/edit page in Magento admin, then you are at the right place. Today I will tell you a damn simple method to add the custom tab to product add/edit page. We will have to add few lines to the xml layout file of your custom module. Then create a phtml file that contains the html part to be shown in the tab.

Thursday, February 23, 2012

Create Album and Upload Photo to Facebook Fan Page using PHP

In this series of Facebook API tutorials, today we will continue with creating albums on Facebook Fan Page. The main meat of this tutorial is getting the right access token for your fan page. To get the right access token, follow these steps:
  1. Go to https://developers.facebook.com/tools/explorer?method=GET&path=me%2Faccounts 
  2. Enter https://graph.facebook.com/me/accounts in the second text box 
  3. Click on submit 
  4. Json data will be returned 
  5. From that select the access token of your Fan page. 

Other Facebook Tutorials:
How to upload photos to you Facebook Fan Page
Access Facebook Photo Albums using PHP - v1.0
Upload photos on Facebook using PHP
See it working

Saturday, February 4, 2012

Programmatically Add Grouped Product to Cart in Magento

Adding simple products to cart through custom PHP code is pretty straight forward. You just need to call the '$cart->addProduct()' function with the product_id and quantity as parameters. But if you want to add grouped products to cart through your code, you will need to perform few additional steps. The process is very easy - create an '$super_group' array of the associated products with the specified quantities. Then you need to pass the array to the 'addProduct()' function. See the actual code below that makes it work: