Module: Locomotive::Ecommerce::EcommerceFilters
- Defined in:
- lib/locomotive/ecommerce/plugin/ecommerce_filters.rb
Instance Method Summary collapse
- #add_to_cart_path(product_sku) ⇒ Object
- #cart_update_path(cart) ⇒ Object
- #checkout_path(purchase) ⇒ Object
- #checkout_update_path(purchase) ⇒ Object
- #find_purchase(id) ⇒ Object
- #remove_from_cart_path(product_sku) ⇒ Object
Instance Method Details
#add_to_cart_path(product_sku) ⇒ Object
10 11 12 13 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 10 def add_to_cart_path(product_sku) stem = @context.registers[:plugin_object].path "#{stem}add_to_cart/#{product_sku}" end |
#cart_update_path(cart) ⇒ Object
5 6 7 8 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 5 def cart_update_path(cart) stem = @context.registers[:plugin_object].path "#{stem}cart/#{cart.id}" end |
#checkout_path(purchase) ⇒ Object
20 21 22 23 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 20 def checkout_path(purchase) stem = @context.registers[:plugin_object].path "#{stem}checkout" end |
#checkout_update_path(purchase) ⇒ Object
25 26 27 28 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 25 def checkout_update_path(purchase) stem = @context.registers[:plugin_object].path "#{stem}checkout/#{purchase.id}" end |
#find_purchase(id) ⇒ Object
30 31 32 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 30 def find_purchase(id) Purchase.find(id.to_s) end |
#remove_from_cart_path(product_sku) ⇒ Object
15 16 17 18 |
# File 'lib/locomotive/ecommerce/plugin/ecommerce_filters.rb', line 15 def remove_from_cart_path(product_sku) stem = @context.registers[:plugin_object].path "#{stem}remove_from_cart/#{product_sku}" end |