Finish the purchase paying with the Store Credit available to the user.
In the checkout, after delivery step, I receive from the browser:
ActionView::MissingTemplate in Spree::Checkout#edit
Missing partial spree/checkout/payment/_storecredit with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}.
I've created a blank partial file _storecredit.hmtl.erb in app/views/spree/checkout/payment/.
After refreshing the payment page, the error is gone and can see the payment step of the checkout with Store Credit as an option for payment.
If I click Save and Continue button, then a flash error appears:
1 error prohibited this record from being saved:
There were problems with the following fields:
* Payments source can't be blank
Solidus Version:
Solidus 2.6 and 2.7
Extensions in use:
New from scratch app, adding Solidus only with the seed and sample data.
I can replicate this on Solidus 2.7.0
@merlielmag @jacobherrington Store Credits are applied automatically if the user has some positive balance in their account. When you setup your payments, unchecked the option "available for users", in that way there is no code asking for the missing template. If you setup a payment with "available for users" it is because you are giving the user the option to select that payment. As I said before, store credits are applied automatically and it is visible during the checkout, so there is no need of template. Give it a go and let me know if it works.
Hi @memotoro, you are right!
I was trying to let the user choose to pay between Store Credit or other payment method, but realized that the automatic behavior works perfect!
Thank you!
Most helpful comment
@merlielmag @jacobherrington Store Credits are applied automatically if the user has some positive balance in their account. When you setup your payments, unchecked the option "available for users", in that way there is no code asking for the missing template. If you setup a payment with "available for users" it is because you are giving the user the option to select that payment. As I said before, store credits are applied automatically and it is visible during the checkout, so there is no need of template. Give it a go and let me know if it works.