New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CustomerPreferencesFormHandler to handle specific tabs toggling for B2B mode #9181

Merged
merged 1 commit into from Jun 12, 2018

Conversation

Projects
None yet
5 participants
@matks
Contributor

matks commented Jun 12, 2018

Questions Answers
Branch? 1.7.4.x
Description? The Customer Preferences form allows to switch on and off the B2B Mode. When on, it requires the tab "Outstanding" to show. This requires an extra step that standard class FormHandler cannot do, so I extend it to add this extra processing step using former CustomerPreferencesFormHandler.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/BOOM-5700
How to test? Do not use B2B mode: "Outstanding" menu link is hidden. Switch it on, the menu link must appears.

This change is Reviewable

@prestonBot

This comment has been minimized.

Collaborator

prestonBot commented Jun 12, 2018

Hello @matks!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@PrestaShop PrestaShop deleted a comment from prestonBot Jun 12, 2018

@mickaelandrieu mickaelandrieu added this to the 1.7.4.0 milestone Jun 12, 2018

$this->handleB2bUpdate($data['general']['enable_b2b_mode']);
}
return parent::save($data);

This comment has been minimized.

@PierreRambaud

PierreRambaud Jun 12, 2018

Contributor

You maybe need to return $errors like the parent method, otherwise no need to affect the parent return into variable:

if (empty(parent::save($data))) {

(But I really think you need to return this variable 😃 )

@PierreRambaud

Missing return statement

@matks

This comment has been minimized.

Contributor

matks commented Jun 12, 2018

@PierreRambaud Changes done, commit ammended

return $errors;
@mickaelandrieu

This comment has been minimized.

Contributor

mickaelandrieu commented Jun 12, 2018

Thanks @matks!

@mickaelandrieu mickaelandrieu merged commit da6da3f into PrestaShop:1.7.4.x Jun 12, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@matks matks deleted the matks:fix_BOOM-5700_fix-outstanding-menu-not-showing-in-b2b-mode branch Jul 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment