AbanteCart Community

AbanteCart Development => API Development => Topic started by: yonghan79 on May 01, 2021, 06:19:02 AM

Title: Unknown Error: AbanteCart core v.1.3.0 Call to a member function batchAssign()
Post by: yonghan79 on May 01, 2021, 06:19:02 AM
Hi core devs,

I am using trying to add some product info in cart lib by using the onACart_ProccessData() and the method is ACart::buildProductDetails

I also hook into storefront product page by using onControllerPagesProductProduct_UpdateData

I pass the additional data by using $that->view->batchAssign( $this->data ); and using $that->processTemplate( 'pages/xxxx/xxxx.tpl' );

When i open the product page i get Unknown Error:  AbanteCart core v.1.3.0 Call to a member function batchAssign() on null and Unknown Error:  AbanteCart core v.1.3.0 Call to undefined method ACart::processTemplate()

I wonder if i missed anything in my code?

Thanks
Title: Re: Unknown Error: AbanteCart core v.1.3.0 Call to a member function batchAssign()
Post by: abolabo on May 01, 2021, 12:31:05 PM
just add condition with check

if($that->view){
$that->view->assign()....
Title: Re: Unknown Error: AbanteCart core v.1.3.0 Call to a member function batchAssign()
Post by: yonghan79 on May 02, 2021, 08:02:01 PM
Thanks abolabo. I will try it.