【问题标题】:Where can I found add to cart button code on Spree github page?我在哪里可以找到 Spree github 页面上的添加到购物车按钮代码?
【发布时间】:2019-01-28 11:14:43
【问题描述】:

有人能告诉我 Spree 中的哪个代码专门指的是“添加到购物车”按钮(在视图和控制器中)吗?

【问题讨论】:

    标签: ruby-on-rails ruby cart spree


    【解决方案1】:

    购物车路线(例如添加商品或查看当前购物车)指向 Orders 控制器。

    routes.rb

    get '/cart', to: 'orders#edit', as: :cart
    patch '/cart', to: 'orders#update', as: :update_cart
    put '/cart/empty', to: 'orders#empty', as: :empty_cart
    

    这里是controller 和views

    【讨论】:

      猜你喜欢
      • 2014-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-30
      • 2014-08-30
      • 2018-03-05
      • 1970-01-01
      相关资源
      最近更新 更多