| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Class not found when creating new module | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Class not found when creating new module
Hi,
I have recently started to use X-cart. I was following this tutorial: http://devs.x-cart.com/en/basics/understanding_models.html to create new Entity class for a new Module. However, I always get the following error: An error occurred in your store. ERROR: "0" (code N/A) Class 'TestEntity' not found I tried changing the path to the class when I try to instantiate it in test.php, but it still does not work. Also, the module is visible in Modules in admin part of the store, but the database table which should be automatically created according to the tutorial, is missing. Do you have any suggestions? Thank you!
__________________
X-cart 5.3.2.9 Multivendor |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Class not found when creating new module
Most likely the path to the PHP file doesn't match your PHP class name (the one including the namespace).
Another possible reason is that your test.php script doesn't configure the automatic class loader. Please check the code that the cart.php file starts with. And why do you need "test.php" script at all? Most likely you need a custom controller/action, not a custom script.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|