我在狂欢电子商务改变了货币,现在我得到以下错误:如何覆盖spree控制器?
NoMethodError in Spree::OrdersController#populate
undefined method `+' for nil:NilClass
Extracted source (around line #116):
114 self.currency = currency
115 self.price = variant.price_in(currency).amount +
116 variant.price_modifier_amount_in(currency, opts)
117 else
118 self.price = variant.price +
variant.price_modifier_amount(opts)
所以我想重写OrdersController
我这样说的: https://guides.spreecommerce.com/developer/logic.html 但我仍然困惑 - 何处我找到了这个orderscontroller的初始代码?
无论如何,我在哪里可以得到这个控制器的代码? – user2950593
您粘贴到问题中的堆栈跟踪(在第一行)显示抛出错误的对象的路径。堆栈跟踪是你的朋友。学会喜欢它。 – jvillian