Skip to content

Conversation

@gabrielysimette
Copy link
Contributor

@gabrielysimette gabrielysimette commented Mar 22, 2017

Closes #307

@gpressutto5 gpressutto5 changed the base branch from master to develop March 22, 2017 21:41
@gabrielysimette gabrielysimette force-pushed the feature/checkout-options-by-country branch from b84d369 to 466832b Compare March 23, 2017 13:16

var updateFields = function(){
var modes = modesField.val();
var brazil_val = countryPayments.brazil.val();

Choose a reason for hiding this comment

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

In JS, we are using camelCase to variables and methods names.

for (var i in modes) {
enableFields(fields.filter('.' + modes[i]));
}
if (modes.length == 2) {

Choose a reason for hiding this comment

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

Why 2? Is there a automatically way to do this? It's dangerous put this in hard code haha

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's two because when CPF and CNPJ are both selected the field "Entity Type Selector" is added.

'title' => __('RUT', 'woocommerce-gateway-ebanx'),
'type' => 'text',
'class' => 'ebanx-advanced-option ebanx-checkout-manager-field always-visible',
'class' => 'ebanx-advanced-option ebanx-checkout-manager-field chile',

Choose a reason for hiding this comment

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

Can we change the class to something like ebanx-chile-document? Because chile is so generic and can cause troubles with another plugins, etc.

'title' => __('Brazil', 'woocommerce-gateway-ebanx'),
'type' => 'multiselect',
'class' => 'ebanx-select',
'class' => 'ebanx-select payment-method',

Choose a reason for hiding this comment

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

Can we change the class to ebanx-payment-method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We realize that it was not being used so we just removed it.

@gpressutto5
Copy link
Contributor

Should we wait for #371 to be merged before merging this one? #371 adds a new field for Colombia, we could resolve it all at once.

@cezarsmpio
Copy link

cezarsmpio commented Mar 23, 2017

@gpressutto5 Yes, I agree. Because we may need to add the Colombia fields, because Colombia has the DNI and the flow will be the same. @gabrielysimette hold this PR.

@cezarsmpio
Copy link

@gabrielysimette we merged the feature/baloto. You can go back to this task and finish the Baloto implementation :)

@cezarsmpio
Copy link

@gpressutto5 will test your branch and if all is ok, you can merge, just wait his approval.

@gpressutto5
Copy link
Contributor

I think we should also hide the checkout manager option when it is empty. Check this out:
image
Mexico and Peru needs no custom field. I think we can hide this:
image

@cezarsmpio
Copy link

@gabrielysimette can you solve the @gpressutto5 request?

…ll checkout manager fields would disappear
@cezarsmpio cezarsmpio merged commit 8fbb29d into develop Mar 24, 2017
@gpressutto5 gpressutto5 deleted the feature/checkout-options-by-country branch July 20, 2017 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants