Page 1 of 1

agile multiple seller ERROR:update customer transform seller

PostPosted: Wed Jun 19, 2013 6:48 pm
by oldlastman_2250
Hello,

background datas:
  • Prestashop: 1.5.2.0
  • agile multiple seller module : 2.0.1 (i have version 2.1.3 ziped actually i cant update)

Problem:
Every time i update custmer data this person transform automatically in Seller and appear in seller info
example
I try to change newsletter check to active, and magically (i'm sure i dont touch create seller account because i did this action from customer list) transform this person in seller

clues
After hours of try and error i found this function on agilemultipleseller/install/1.5x/override/controllers/admin and of course there is a copy in override/controllers/admin

Code: Select all
protected function afterUpdate($object)   {
$this->create_seller_account($object);
return true;   }


This means every time i update customer info that function convert automatically in seller?

i read code in version 2.1.3 of the module and this function is the same.

Please, could you help me? i must change this code for something similar to afterAdd function?
this is an error? or there is something more?

thanks

Re: agile multiple seller ERROR:update customer transform se

PostPosted: Wed Jun 19, 2013 11:33 pm
by shokinro
@oldlastman
Thanks for using our module.

There was a bug in an specific earlier version, you happened to have this version I I guess.
I suggest you update to latest version of the module if you could. I assume that you have not modified or customized the module.

Or please replace following function create_seller_account with below code

Code: Select all
    private function create_seller_account($object)
    {
      ///check if we need to create a seller account
      if($this->is_seller OR Tools::getValue('create_seller_account') <=0)return;
      if(!Module::isInstalled('agilemultipleseller'))return;
                include_once(_PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php");
      $id_sellerinfo = SellerInfo::getIdByCustomerId($object->id);
      if($id_sellerinfo >0)return;
      include_once(_PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php");
      AgileMultipleSeller::createSellerAccount($object);
    }

Re: agile multiple seller ERROR:update customer transform se

PostPosted: Thu Jun 20, 2013 5:16 pm
by oldlastman_2250
i'm Sorry but

I replace old function and
now i can modify customer datas but if update old user and transform in seller..

i obtain:

Code: Select all
Caught exception: Property SellerInfo->id_seller is empty




something more i could do?

Re: agile multiple seller ERROR:update customer transform se

PostPosted: Sat Jun 22, 2013 6:07 pm
by shokinro
@oldlastman
I think the best way is to upgrade your store to the latest version of the module.
It is very difficult to for me figure out what is happening with code has been changed.