ठीक है, समाधान है।
<?php
$_isLoggedIn = $this->helper('customer')->isLoggedIn();
if($_isLoggedIn == true){
$_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
if($_myGroupId == 2){
echo '<td class="label">Attribute Name/Label</td>';
echo '<td class="label">';
if ($_product->getResource()->getAttribute('attribute_id')->getFrontend()->getValue($_product)):
echo $_product->getResource()->getAttribute('attribute_id')->getFrontend()->getValue($_product);
endif;
echo '</td>';
}
}
?>
धन्यवाद सही दिशा में प्रारंभिक सूचक के लिए @nvoyageur रहे हैं:
टेम्पलेट/सूची/उत्पाद में/दृश्य> attributes.phtml निम्नलिखित का उपयोग करें!
इसे देखने के लिए जा रहे हैं, लेकिन यह सही-आश दिखता है। – f8xmulder
दुर्भाग्यवश, काम नहीं हुआ। यहां मुझे मिला गया नवीनतम कोड है: Php \t \t $ _isLoggedIn = $ this-> सहायक ('ग्राहक') -> isLoggedIn(); अगर ($ _ isLoggedIn == सत्य) { $ _myGroupId = Mage :: getSingleton ('ग्राहक/सत्र') -> getCustomerGroupId() प्राप्त करें; अगर ($ _ myGroupId == 2) { // echo $ _helper-> productAttribute ($ _ product, $ this-> htmlEscape ($ _ product-> getNumPerBox()), 'number_per_box'); } } ?> मैंने एक समारोह को शामिल करने के लिए मैज> कैटलॉग> मॉडल> Product.php भी संपादित किया लेकिन यह एक त्रुटि देता है। – f8xmulder