Giter VIP home page Giter VIP logo

sg_ec's People

Contributors

tsurugeek avatar

Watchers

 avatar  avatar

sg_ec's Issues

商品はやっぱり削除したらダメ?

現在商品が持っている情報は、名前、金額、表示順、非表示フラグで、購入する上で大事なのは名前と金額のみ。これらはショッピングカートにコピーしてある。では、商品レコードを消してもOK?

ショッピングカートの中にある場合は、ショッピングカートから削除すれば良い。ユーザにはそれを通知する。

その後、倉庫からピックアップして、配送するまでの間はどうなる? 購入履歴の中に商品IDを残しておけば、対象はわかるのかな? 一応、わかりそうだな。でも購入履歴の中にコピーしていること以外はあからない。今は全部コピーしているけど。

やはり、消さないのが無難だな。非表示機能があるのに、どうしても消したい場合があるのか? とりあえず、消せないようにしておこう。

商品の購入数を変更するときにAjaxを使用すべきか

Ajaxで商品数を変更した場合、そのレスポンスで、次のページに進むためのform内のlock_versionも変更する必要がある。

それをしたとしても、以下のような場合は、次のページにいけるべきではない。

  1. セッションA
    • 数量変更
  2. セッションB
    • 商品追加
  3. セッションA
    • 数量変更
  4. セッションA
    • 次の画面へ -> セッションBの画面には追加された商品が表示されていないから、確認したことにならない。だから、セッションBで商品が追加されたらセッションAにも表示されなければならない。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.