-
-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove shipping method display on front_end option, it is not working…
… and it's not straight forward to make it work correctly
- Loading branch information
1 parent
60470aa
commit 02b38b1
Showing
4 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
db/migrate/20200508101630_convert_frontend_shipping_method_to_both.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class ConvertFrontendShippingMethodToBoth < ActiveRecord::Migration | ||
def up | ||
# The display_on value front_end is not working | ||
# this flag is not being used in the back office to ignore shipping methods marked as front_end | ||
# So here we are converting all entries to the more generic "both" option that is representted as nil in the database | ||
# this enables us to remove the front_end option from the code | ||
execute("UPDATE spree_shipping_methods SET display_on = null WHERE display_on = 'front_end'") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters