Module: Forge::Controllers::Ecommerce
- Defined in:
- lib/forge/lib/forge/shared_controller_methods/ecommerce.rb
Instance Method Summary collapse
Instance Method Details
#get_cart_order ⇒ Object
4 5 6 |
# File 'lib/forge/lib/forge/shared_controller_methods/ecommerce.rb', line 4 def get_cart_order @cart_order = Order.where("orders.key = ? AND (orders.state = 'pending' OR orders.state = 'failed')", [:order_key]).first if [:order_key] end |
#require_addresses_for_checkout ⇒ Object
8 9 10 11 12 13 |
# File 'lib/forge/lib/forge/shared_controller_methods/ecommerce.rb', line 8 def require_addresses_for_checkout unless @cart_order.valid_addresses? redirect_to "orders/checkout" return false end end |