0
votes

I have a typical condition in my magento Grouped product. Is it possible to show Custom attribute (color dropdown) of associated product under Grouped products in the fronted.. as shown below

Consider the sample blanket product

Consider the sample

Let me know if i am not clear. Thanks

2

2 Answers

1
votes

It's not clear your question but I would give you a small example to get text field, multiple select or drop-down listbox value.

First, we should load the product collection :

<?php
   // load the product that id 125, then show attributes of the product
   $product = Mage::getModel('catalog/product')->load($this->getProduct()->getId(125));
   echo $product->getCustomAttribute();

   // lets say your custom attributes name is "size" and type is text field
   echo $product->getSize();

   // lets assume your custom attributes name is "product_size then
   echo $product->getProductSize();

   // lets assume your attribute type is drop-down, this will get array of attribute options instead of value that you selected
   echo $product->getAttributeText(product_size);

   // to get drop-down value that you selected
   $attribute = $product->getAttributes();
   $productSize = $attribute['product_size']->getFrontend()->getValue($product);

let me know if it's not meet your request.

0
votes

I have found a solution for this, 3 edited files. But these files are edited for a previous version of Magento, I don't know which version. I have uploaded this 3 files on my Magento 1.7 and it works but when add the product to the cart it give's a error with app/code/core/Mage/Sales/Model/Quote.php

This file: Quote.php is one of the edited files, when i upload the original Quote.php it works.

Look at this pic: http://s8.postimage.org/g8bvbth0z/Naamloos.png

But maybe i get more errors in the future, i don't have any ideas..

I am a noob with this, if someone can look at the edited files and chek how they have do this and compare this with the newest files for Magento 1.7 maybe we can help to many peoples with this problem.