Argument 1 passed to must be an instance of ...\..\, string given
Hello Anyone,
I have some issue in xcart 5.3.3.1 version to develop a module like pre order. My code in preorder.php file are as below: PHP Code:
And that function is calling in another file name AddButton.php place as below: PHP Code:
And when i run that code the found an error on front-end product details page as below: Argument 1 passed to XLite\Module\Webkulsoftware\PreorderSales\Model\Re po\Preorders::getPreOrder() must be an instance of XLite\Core\CommonCell, string given, called in /home/users/ajeetsingh/www/html/xcart5331/var/run/classes/XLite/Module/Webkulsoftware/PreorderSales/View/Product/Details/Customer/AddButton.php So, Can any one suggest me that what i do wrong.I am waiting for a valuable suggestion. |
Re: Argument 1 passed to must be an instance of ...\..\, string given
As the error states you are passing string while the function expects an object
PHP Code:
This should works PHP Code:
|
Re: Argument 1 passed to must be an instance of ...\..\, string given
Quote:
Thank you for a valuable reply. It's Work for me. |
All times are GMT -8. The time now is 10:26 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.