Hi to everyone, I have a problem and I tried a lot to find a solution.

With the code below (in my view.phtml) I get the Current Store View's Label for Specificed Attributes but I need to change it to get the Admin Label for those Specifed Attributes.
I found two similar question (I don't know if I can post the link cause they are on other sites) but I don't understand what I have to do.
My question is "How I have to change the code below to get the Admin Label instead of the Store View Label"?

Thanks to everyone.

PS: If it is better I can attach or paste the entire view.phtml file.

PHP Code:
$attrs  $_product->setStoreFilter(0)->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
foreach(
$attrs as $attr) {
    if(
(
== strcmp("finish"$attr['attribute_code']))||
(
== strcmp("structure"$attr['attribute_code']))
) {

        
$options    $attr['values'];

        foreach(
$options as $option) {
            
//var_dump($option);

            
$__ll str_replace(array('^''$'), array('<span class="ll_macroattribute">''</span>'), $option['store_label']);

            
//print "{$option['store_label']}<br />";

            
$filter $option['store_label'];

            
$macro '';

            if (
$filter[0] == '^'){

                            
$macro substr($filterstrpos($filter"^")+1strpos($filter"$")-(strpos($filter"^")+1));

            }

            
$url strtolower(str_replace(array('"'' '), ' '$macro).'_'.trim(str_replace('^'.$macro.'$'''$option['store_label']))).'.jpg';

            
$url str_replace(' '''$url);
            
$url str_replace('è''e'$url);
            
$url str_replace('é''e'$url);
            
$url str_replace('à''a'$url);
            
$url str_replace('ì''i'$url);
            
$url str_replace('ò''o'$url);
            
$url str_replace('ù''u'$url);
            
$url str_replace("'"""$url);

            
array_push($newmenu, array("url" => $url"filter" => '<span class="ll_macroattribute">'.trim(strtoupper(str_replace('^'.$macro.'$'''$option['store_label']))).'</span><br>'"macro" => '<span class="ll_macroattribute" style="color:#666;">' $macro '</span>'));

            
//echo $__ll.'<br>';

        
}

    }


View more threads in the same category: