Magento Themes and Magento Extensions

Magento : Get Attribute value, name and other info

Posted on April 30th, 2013 | Posted by admin

Magento : Get Attribute value, name and other info

You can simply show the attributes on catalog/product/view.phtml by using the following code statement. Basically it’s calling the attribute collection then from there, you can simply call other data such as attribute label, default value, etc.

* get attribute collection
$attribute = $_product->getResource()->getAttribute(‘attribute_code’);

* get attribute type

* get attribute Label

Magento – Get Category Id from Product

Posted on April 29th, 2013 | Posted by admin

Magento - Get Category Id from Product

$items = Mage::getSingleton(‘checkout/session’)->getQuote()->getAllItems();

foreach($items as $item)
$categoryIds = $item->getProduct()->getCategoryIds(); // returns category ids from product

addAttributeToFilter Conditionals In Magento

Posted on April 28th, 2013 | Posted by admin

addAttributeToFilter is a function that can be called on a product collection in Magento. In short, it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database.

$_products = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect(array('name', 'product_url', 'small_image'))
->addAttributeToFilter('sku', array('like' => 'UX%'))

The above code would get a product collection, with each product having it’s name, url, price and small image loaded in it’s data array. The product collection would be filtered and contain only products that have an SKU starting with UX.

addAttributeToFilter Conditionals

Notice above, I used the LIKE operator? There are many more operators in SQL and addAttributeToFilter will accept them all. I include them below as well as a reference for you. Hopefully this will save you some time.

Advantages Of Beginning An Online Business Using Magento

Posted on April 26th, 2013 | Posted by admin

Advantages Of Beginning An Online Business Using Magento

Likely to start an online business? You have to be searching at multiple options and weighing the benefits and drawbacks of every, before determining. Exactly what the experts suggest after searching at several choices may be the Magento eCommerce Platform. I have recently been certified by Magento on the Magento Developer Plus Certification

Magento uses breakthrough and very flexible and have-wealthy technology to help you setup your whole eCommerce store and procedures rapidly thus allowing you to achieve your Return on investment faster.

Using Magento can help you save lots of money. Since its a totally free-to-use free solution, you don’t need to pay for any type of monthly or yearly costs, when using the community version. Its very well designed and comprehensive it includes every feature that the great eStore would ever require a condition-of-the-art shopping cart software, easy catalog management, search, checkout, mix selling and lots of features within the after sales admin panel. Magento also provides marketing and marketing tools which help you accrue business.

Understanding and Detecting Magento Extension Clashes or Conflicts

Posted on April 25th, 2013 | Posted by admin

This article will give an overview of  Magento extension clashes (sometimes called conflicts) and then run through a few ways you can find them in your installation.

I get asked at least once a week a question like ‘What is a Magento Extension Clash‘ or ‘How Do I Find Extensions that Conflict‘. So, if you’re reading this, you probably just asked me, and I probably just sent you a link to here. That was a bit meta-blog, sorry about that. On with the article.

What is a Clash?

Magento extensions can override core functionality using what’s called a class rewrite. That’s when your extensions configuration file tells the core of Magento to use your custom PHP class, instead of the core one. Typically the custom class will sub-class the core one, and only override the methods that need to be changed. Here’s an example of that, firstly showing a snippet of rewrite xml for a core model:

Page 1 of 612345»...Last »