Jump to content

product is not showing in BO


toanloau

Recommended Posts

I'am using prestashop 1.5. I write module and use actionProductAdd

function hookActionProductAdd($params){
	 	Indexer::test($params);
}

In Indexer.php

class IndexerCore extends ObjectModel{
	public function __construct(){
		$this->ParseJsonData(true);
	}
	public function test ($params){
		 if(!isset($params['product']->id))
			return false; 
		$id_product = $params['product'];
		
		$file = fopen('D:\tt.txt','a+');
		fwrite($file, print_r($id_product,true));
		fclose($file);
	}
}

It printed data, but product which has added not showing in BO (

Catalog separator_breadcrumb.png Products). But i checked in Database, ps_product table, i see it.

If, i remove function hookActionProductAdd(), i see it in BO. i don't know what happen with it.

Sorry my english! Thank advance.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...