Magento Themes and Magento Extensions

magento set dropdown attribute value of a product add option if not present

Posted on February 8th, 2013 | Posted by admin

Magento set dropdown attribute value of a product add option if not present
A quick little function for PHP scripts. Dropdown attributes have a limited set of allowed values. Say you have products that you wish the customer to be able to filter by Manufacturer on the front-end: the manufacturer attribute must be a drop-down in order for it to be filterable. If your products are added from an importer script, the script needs to be able to add a missing Manufacturer to the options of the attribute, if it is not already on the list. This function handles that transparently. If the value exists, it is set. If it does not exist, it is created and then set.

How to add two products to cart at once in magento

Posted on January 21st, 2013 | Posted by admin

My client wants when i add to cart a product from view page in magento there should be a select box containing product list from extended warranty category. He will be also able to select product from the select box. When he click add to cart the both the two item will be added in the cart.

Here is the solution how i fix it.

At first i added a select box naming extended_warranty_product in product view page which contain all the product from extended warranty category. Then i made the following  change in the following file :

How to add the CMS pages?

Posted on December 12th, 2012 | Posted by admin
1. open the back end(admin page) of magento
2. Go to CMS – Pages – Add New Page
3. Into Page Information Add Page title, URL key (aaa this name i entered into this field , Status(Enable) Save and Continue Editing
4. Into Content add Content Heading and main block of page, edit the page how you want then Save and Continue Editing
5. Into Design add details about Page Layout and Custome layout then Save and Continue Editing
6. Into Meta data add details then Save
7. Goto Front end and enter specific URL
like http://localhost/../magento/index.php/aaa

Add Pagination In Product Listings

Posted on October 22nd, 2012 | Posted by admin

I have noticed on a number of  Magento websites that I have been designing, don’t include the pagination or pager links within the category listings. To remedy this oversight, simplyupdate catalog.xml to include call to pager.phtml file wiht the following code:

<block type=”page/html_pager” name=”product_list_toolbar_pager”/>

You will want to locate the reference to the Product List Toolbar and updated to match the following:

<block type=”catalog/product_list_toolbar” name=”product_list_toolbar” template=”catalog/product/list/toolbar.phtml”>
<block type=”page/html_pager” name=”product_list_toolbar_pager”/>

Just place the pager reference inside the Product List Toolbar and you are set. Rememeber to refresh your cache before trying to view the live changes.

Add links in Magento

Posted on August 28th, 2012 | Posted by admin

Creating a link in magento is not that obvious if you never did before.

Today we’re going to see how to add them to a Static Block or a page (under your CMS panel).

 Add links in Magento