Jump to content

Receive offers from partners locking process


rnervi

Recommended Posts

PS 1.7.6.8

if "receive offers from out partner" is switch off from backoffice, customer record process goes in crash with annexed code. If this feature is ON it works fine.

questions:
- how to fix this ? (no feature, no  stops)

- or how to remove it from frontend and of course has it self checked....

 

 

[PrestaShopException]

Property  Customer->optin is empty.
at line 1003 in file classes/ObjectModel.php

998.             }
999. 
1000.             $message = $this->validateField($field, $this->$field);
1001.             if ($message !== true) {
1002.                 if ($die) {
1003.                     throw new PrestaShopException($message);
1004.                 }
1005. 
1006.                 return $error_return ? $message : false;
1007.             }
1008.         }

    ObjectModelCore->validateFields - [line 292 - classes/ObjectModel.php]
    ObjectModelCore->getFields - [line 559 - classes/ObjectModel.php]
    ObjectModelCore->add - [line 262 - classes/Customer.php] - [2 Arguments]
    CustomerCore->add - [line 516 - classes/ObjectModel.php] - [2 Arguments]
    ObjectModelCore->save - [line 195 - classes/form/CustomerPersister.php]
    CustomerPersisterCore->create - [line 60 - classes/form/CustomerPersister.php] - [2 Arguments]
    CustomerPersisterCore->save - [line 192 - classes/form/CustomerForm.php] - [4 Arguments]
    CustomerFormCore->submit - [line 62 - classes/checkout/CheckoutPersonalInformationStep.php]
    CheckoutPersonalInformationStepCore->handleRequest - [line 59 - classes/checkout/CheckoutProcess.php] - [1 Arguments]
    CheckoutProcessCore->handleRequest - [line 264 - controllers/front/OrderController.php] - [1 Arguments]
    OrderControllerCore->initContent - [line 292 - classes/controller/Controller.php]
    ControllerCore->run - [line 515 - classes/Dispatcher.php]
    DispatcherCore->dispatch - [line 28 - index.php]

 

Link to comment
Share on other sites

  • 3 months later...

I've too was hit with that. I'm rather newbie in Presta customization/fixing but what I've do:

1) Edited /public_html/classes/form/customerFormatter.php and set corresponding optin function to always set 'ask for' variable to false - note that this is probably not needed after step 2 - you might want to start there.
2) Deleted entry in database table _required_field - I've had only one entry that was corresponding to optin field being required! This is actually the cause for exception in ObjectModelCore->validateFields function.

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...