View Single Post
  #3  
Old 07-20-2017, 07:12 AM
 
ajeetsingh ajeetsingh is offline
 

Member
  
Join Date: Dec 2016
Posts: 28
 

Default Re: Argument 1 passed to must be an instance of ...\..\, string given

Quote:
Originally Posted by cflsystems
As the error states you are passing string while the function expects an object

PHP Code:
$preorder_details = \XLite\Core\Database::getRepo('XLite\Module\Webkulsoftware\PreorderSales\Model\Preorders')->getPreOrder('',$product_id); 


This should works

PHP Code:
$cnd = new \XLite\Core\CommonCell;

$preorder_details = \XLite\Core\Database::getRepo('XLite\Module\Webkulsoftware\PreorderSales\Model\Preorders')->getPreOrder($cnd,$product_id); 


Thank you for a valuable reply. It's Work for me.
__________________
Ajeet Singh
Sr.Software Developer
Webkul Software Pvt. Ltd.
Reply With Quote