Class "Phoca\PhocaCart\Container\Container" not found

Phoca Cart - complex e-commerce extension
mino182
Phoca Professional
Phoca Professional
Posts: 207
Joined: 12 Feb 2015, 13:30

Class "Phoca\PhocaCart\Container\Container" not found

Post by mino182 »

Ahoj, mám pcp plugin gopay, ktorý v konfigurácii používa funkciu:

Code: Select all

$status = PhocacartOrderStatus::getStatus((int)$id);
Tá trieda je v libraries/phocacart/order/status.php kde sa používa

Code: Select all

use Phoca\PhocaCart\Container\Container;
a to spôsobuje problém, že tú triedu nevie nájsť a potom mi v backende ani neotvorí konfiguráciu toho pluginu.

Neviete prosím niekto ako to vyriešiť? resp. používa sa ešte niekde PhocacartOrderStatus::getStatus kde to funguje, aby som zistil, či mne niečo v tom plugine nechýba?

Díky.

joomla 5 phoca cart 5
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48932
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Class "Phoca\PhocaCart\Container\Container" not found

Post by Jan »

Ahoj,

používá se na hodně místech, zkus v tom pluginu načíst loader z Phoca Cart, aby nacházel všechny třídy:

Code: Select all

require_once JPATH_ADMINISTRATOR . '/components/com_phocacart/libraries/bootstrap.php';
pro verzi 5 nebo pro starší:

Code: Select all

if (file_exists(JPATH_ADMINISTRATOR . '/components/com_phocacart/libraries/bootstrap.php')) {
	// Joomla 5 and newer
	require_once(JPATH_ADMINISTRATOR . '/components/com_phocacart/libraries/bootstrap.php');
} else {
	// Joomla 4
	JLoader::registerPrefix('Phocacart', JPATH_ADMINISTRATOR . '/components/com_phocacart/libraries/phocacart');
}
If you find Phoca extensions useful, please support the project
mino182
Phoca Professional
Phoca Professional
Posts: 207
Joined: 12 Feb 2015, 13:30

Re: Class "Phoca\PhocaCart\Container\Container" not found

Post by mino182 »

Ahoj, díky, presne to bolo treba. Je to plugin z verzie 4 a čo som vedel, čo sa v 5 menilo som upravil, ale ten JLoader ma ani nenapadol. Lebo Minijoomla, kde som to kupoval, to už asi zabalili... A pozeral som do paypal pluginu a tam je tiež JLoader, tak som myslel, že to ostalo funkčné :-) Dík ešte raz.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48932
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Class "Phoca\PhocaCart\Container\Container" not found

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
Post Reply