@@ -28,7 +28,6 @@ func (this *Basket) Info(host, session_id string, db *sqlw.DB, currency_id int)
defer this.Unlock()
if h, ok := this.hosts[host]; ok == true {
if s, ok := h.sessions[session_id]; ok == true {
- s.Info(db, currency_id)
return s.String()
} else {
return (&dResponse{IsError: false, Msg: "basket_is_empty", Message: ""}).String()
@@ -1,9 +1,5 @@
package basket
-// import (
-// "encoding/json"
-// )
-
type currency struct {
Id int `json:"id"`
Name string `json:"name"`
type product struct {
@@ -23,11 +23,6 @@ func (this *session) String() string {
return string(json)
}
-func (this *session) Info(db *sqlw.DB, currency_id int) {
- // Update prices
- // Update total
-}
func (this *session) Plus(db *sqlw.DB, product_id int) {
if p, ok := this.Products[product_id]; ok == true {
p.Quantity++