spree_backend icon indicating copy to clipboard operation
spree_backend copied to clipboard

Shipping Method display keeps defaults to "both" and always visible on checkout delivery page

Open SylarRuby opened this issue 1 year ago • 1 comments

Using Rails 7.0.4.2 and ruby 3.1.2 and spree v4.5.1 I've noticed when creating or updating a shipping method and setting it to be displayed to backed, the admin backend dropdown is selecting "All".

Screenshot 2023-03-19 at 13 45 55

I expect when I create or update a shipping method and set "Display" to Admin Panel, I expect the Admin Panel selection to be selected.

I'm using spree_frontend and though, in database, I can see my selection was correct display_on: backend, on the checkout/delivery page, all delivery options are visible.

SylarRuby avatar Mar 19 '23 13:03 SylarRuby

For the frontend, I've managed to "patch" this issue on line 17:


<% ship_form.object.shipping_rates.select {|r| ['both', 'front_end'].include?(r.shipping_method.display_on)}.each do |rate| %>

SylarRuby avatar Mar 19 '23 13:03 SylarRuby