i have checked lot , tried many things, still not getting product multiselect selected values label on product view page.
i have product attribute called package multiselect, code create product attribute
$this->addattribute( 'catalog_product', 'package', array( 'group' => 'package', 'backend' => 'eav/entity_attribute_backend_array', 'frontend' => '', 'class' => '', 'default' => '', 'label' => 'package', 'input' => 'multiselect', 'type' => 'text', 'source' => 'npm_recurrex/package_source', 'global' => mage_catalog_model_resource_eav_attribute::scope_global, 'is_visible' => 1, 'required' => 0, 'searchable' => 0, 'filterable' => 0, 'unique' => 0, 'comparable' => 0, 'visible_on_front' => 0, 'user_defined' => 1, ) );
this works fine, saving product. in frontend product view page when say
mage::log(print_r($_product->getdata('package'), true));
its prints result 1,2 wanted display option labels of multiselect not option id's. tried code
mage::log(print_r($_product->getattributetext('package'), true));
it prints nothing, blank space :(.
i have checked link no use.
i confused this, wrong? , wrong thing?
can explain me happening in case?
if need show drop down or multiple select value of attribute product should this:
$attributes = $_product->getattributes(); $customattributevalue = $attributes['custom_attribute']->getfrontend()->getvalue($_product); mage::log($customattributevalue);
Comments
Post a Comment