Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

AVS-421_74 - Expand Customer Code Options #118

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

rsisco
Copy link

@rsisco rsisco commented Mar 28, 2018

- Refactor code to properly retrieve customer attribute used as customer
  code
@rsisco rsisco requested a review from erikhansen March 28, 2018 18:48
{
// Convert provided customer code to getter name
$getCustomerCode = 'get' . str_replace('_', '', ucwords($customerCode, '_'));
if (method_exists($customer, $getCustomerCode)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use $customer->getData($customerCode) here instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, a call to $customer->getData() results in a "call to undefined method" exception.

- Expand code to allow numeric type as customer code
@rsisco rsisco merged commit e5939ee into develop Apr 3, 2018
@rsisco rsisco deleted the feature/AVS-421_74-expand-customer-code-options branch April 3, 2018 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants