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

Paypal button preference helper not found #251

Closed
MinasMazar opened this issue Feb 27, 2020 · 0 comments · Fixed by #252
Closed

Paypal button preference helper not found #251

MinasMazar opened this issue Feb 27, 2020 · 0 comments · Fixed by #252

Comments

@MinasMazar
Copy link
Contributor

Testing on a brand new solidus app, in the payments step I'm running into this error:

undefined method `paypal_button_preference' for #<Class:0x00007f2074d2e560>:0x00007f206cf96fa8>

Extracted from stacktrace:

    25  locale: '<%= paypal_button_preference(:paypal_button_locale, store: current_store) %>',
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Feb 27, 2020
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Mar 5, 2020
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Mar 6, 2020
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Mar 6, 2020
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Oct 9, 2020
Ref. solidusio#251

Using `Spree::CheckoutController.helper` and
`Spree::OrdersController.helper` in `config/initializers/braintree.rb`
to include helper modules does not work: at `checkout/payement` step an
exception is raised

```
ActionView::Template::Error (undefined method `paypal_button_preference`)
```

This commit move `paypal_button_preferences` (introduced here[1]) in the already
present `SolidusPaypalBraintree::BraintreeCheckoutHelper` module.

[1] solidusio#236
MinasMazar pushed a commit to nebulab/solidus_paypal_braintree that referenced this issue Oct 15, 2020
Ref. solidusio#251

Using `Spree::CheckoutController.helper` and
`Spree::OrdersController.helper` in `config/initializers/braintree.rb`
to include helper modules does not work: at `checkout/payement` step an
exception is raised

```
ActionView::Template::Error (undefined method `paypal_button_preference`)
```

This commit move `paypal_button_preferences` (introduced with [1]) in
the already present `SolidusPaypalBraintree::BraintreeCheckoutHelper`
module, and adds the same helper method to the
`Spree::OrdersController` (in the same way done here [2]) to enable
the button also in the cart page.

[1] solidusio#236
[2] solidusio@28d0de9
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 a pull request may close this issue.

1 participant