[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: PHP Parse error: syntax error, unexpected T_FUNCTI
Страницы: 1, 2, 3
testd85
сделал вот так
public function getAllStoresForProgramId($programId){
$config = Mage::helper('eems_affiliate/config');
global $store;
return array_filter(
Mage::app()->getStores(),
create_function('$store,$config,$programId','return $config->getProgramId($store) === $programId;')
);

}


и все заработало - спасибо за помощь. Удачи Вам. Спасибо что выделили время))
Arh
public function getAllStoresForProgramId($programId) {
global $store;
$config = Mage::helper('eems_affiliate/config');
return array_filter(
Mage::app()->getStores(),
create_function('$store,$config,$programId','return $config->getProgramId($store) === $programId;')
}
);


_____________
Промокод предоставляет скидку на заказ домена и/или хостинга reg.ru
BFCC-3895-8804-9ED2
testd85
Цитата (Arh @ 9.11.2014 - 21:03)
public function getAllStoresForProgramId($programId) {
    global $store;
    $config = Mage::helper('eems_affiliate/config');
    return array_filter(
        Mage::app()->getStores(),
            create_function('$store,$config,$programId','return $config->getProgramId($store) === $programId;')
    }
);

при вашем варианте получаю ошибку
PHP Parse error: syntax error, unexpected '}' in site.com/app/code/community/EbayEnterprise/Affiliate/Helper/Data.php on line 91
Arh
public function getAllStoresForProgramId($programId) {
global $store;
$config = Mage::helper('eems_affiliate/config');
return array_filter(
Mage::app()->getStores(),
create_function('$store,$config,$programId','return $config->getProgramId($store) === $programId;')
);

};


_____________
Промокод предоставляет скидку на заказ домена и/или хостинга reg.ru
BFCC-3895-8804-9ED2
testd85
ок теперь работает - файл Data.php полностью работает с вашей помощь, теперь получаю новую ошибку уже в другом файле

PHP Parse error: syntax error, unexpected T_STATIC in site.com/app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Attributes.php on line 44

public function toOptionArray()
{
$helper = Mage::helper('catalog');
$collection = Mage::getSingleton('eav/config')
->
getEntityType(Mage_Catalog_Model_Product::ENTITY)
->
getAttributeCollection();
$attributes = array(array('value' => '', 'label' => ''));
foreach ($collection as $attribute) {
$attributes[] = array(
'value' => $attribute->getAttributeCode(),
'label' => $helper->__($attribute->getFrontendLabel() ?
$attribute->getFrontendLabel() :
$this->_convertToTitleCase($attribute->getAttributeCode())
)
);

}
$attributes[] = array(
44 строка 'value' => static::PRODUCT_URL_VALUE,
'label' => $helper->__(static::PRODUCT_URL_LABEL)
);

// sort the attribute options by label
usort($attributes, array($this, '_compareLabels'));
return $attributes;
}


что в этом случае делать?
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.