在Spree 2.4上,我似乎找不到在我的应用中覆盖expired_reimbursement_type和/或default_reimbursement_type的好方法。
我试过这个
Spree::Reimbursement::ReimbursementTypeEngine.class_eval do
self.refund_time_constraint = 90.days
self.default_reimbursement_type = Spree::ReimbursementType::OriginalPayment
self.exchange_reimbursement_type = Spree::ReimbursementType::StoreCredit
end
还有初始化程序/ spree.rb
Spree::Reimbursement::ReimbursementTypeEngine.refund_time_constraint = 90.days
Spree::Reimbursement::ReimbursementTypeEngine.default_reimbursement_type = Spree::ReimbursementType::OriginalPayment
Spree::Reimbursement::ReimbursementTypeEngine.exchange_reimbursement_type = Spree::ReimbursementType::StoreCredit
但似乎都没有正常工作
答案 0 :(得分:1)
这可以正常使用
Spree::Reimbursement::ReimbursementTypeEngine.class_eval do
self.refund_time_constraint = 90.days
self.default_reimbursement_type = Spree::ReimbursementType::OriginalPayment
self.expired_reimbursement_type = Spree::ReimbursementType::StoreCredit
end