Перейти к публикации
View in the app

A better way to browse. Learn more.

Дизайн и модификация Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Возникла проблема с компонентом магазин подарков

Опубликовано:

Здравствуйте,вот такая вот ошибка при создании темы (хук оплаты за создание темы)

Возникла ошибка :

Catchable fatal error: Argument 1 passed to app_shop_classes_shop::__construct() must be an instance of ipsRegistry, null given, called in /home/*/www/*.ru/forum/hooks/shop_t_pay_99cf33fdf76cfb5e30f8daf79541ca89.php on line 9 and defined in /home/*/www/*.ru/forum/3iuadminset/applications_addon/other/shop/sources/classes/shop.php on line 39

 

9 строка :

<?php
class shop_t_pay
{
public function handleData( $data )
   {
	if ( !ipsRegistry::isClassLoaded('shop') )
       {
           $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('shop') . '/sources/classes/shop.php', 'app_shop_classes_shop', 'shop' );

      ipsRegistry::setClass( 'shop', new $classToLoad( $this->registry ) ); ////////это 9ая строка
       }

       return $this->registry->getClass('shop')->shop_t_pay_hook( $data );
}
}

 

39 строка :

public function __construct( ipsRegistry $registry )////Это 39 строка
{
	/* Make objects */
	$this->registry = $registry;
	$this->DB	    = $this->registry->DB();
	$this->settings =& $this->registry->fetchSettings();
	$this->request  =& $this->registry->fetchRequest();
	$this->lang	    = $this->registry->getClass('class_localization');
	$this->member   = $this->registry->member();
	$this->memberData =& $this->registry->member()->fetchMemberData();
	$this->cache	= $this->registry->cache();
	$this->caches   =& $this->registry->cache()->fetchCaches();

	if( IN_ACP )
       {
           /* Load the language File */
           $registry->class_localization->loadLanguageFile( array( 'admin_shop' ), 'shop' );
       }
	else
	{
		/* Load the language File */
           $registry->class_localization->loadLanguageFile( array( 'public_shop' ), 'shop' );
	}
}

Буду очень благодарен если кто-то поможет.

Раздела с помощью не нашёл.

Рекомендованные сообщения

Опубликовано:

А компонент соответствует версии форума?

 

Перед

if ( !ipsRegistry::isClassLoaded('shop') )

 

Попробуйте добавить

$this->registry = ipsRegistry::instance();

Опубликовано:
  • Автор

А компонент соответствует версии форума?

 

Перед

if ( !ipsRegistry::isClassLoaded('shop') )

 

Попробуйте добавить

$this->registry = ipsRegistry::instance();

Огромное спасибо! помогло! Теперь не могли бы мы обсудить в лс то что я просил, конкретно интересует цена.

Создайте аккаунт или войдите в него для комментирования

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.