Product units

This commit is contained in:
Akolzin Dmitry 2019-02-20 11:41:24 +03:00
parent 0fd85ee8d3
commit bf096b645d
7 changed files with 5 additions and 8 deletions

2
go.mod
View file

@ -41,7 +41,7 @@ require (
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pkg/errors v0.8.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/retailcrm/api-client-go v1.0.7
github.com/retailcrm/api-client-go v1.1.2
github.com/retailcrm/mg-bot-api-client-go v1.0.16
github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect
github.com/stretchr/testify v1.2.2

4
go.sum
View file

@ -83,8 +83,8 @@ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/retailcrm/api-client-go v1.0.7 h1:j4C2PvPUDP9nAuYWDvJPnYNpkj+LDBgn71kHvxJmSPg=
github.com/retailcrm/api-client-go v1.0.7/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c=
github.com/retailcrm/api-client-go v1.1.2 h1:bgd3EpS1o3IffgO4p+QOj7Mn+eg6HRd7bIlA5IXDkhU=
github.com/retailcrm/api-client-go v1.1.2/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c=
github.com/retailcrm/mg-bot-api-client-go v1.0.16 h1:l7xzGp0IQTR+jJ//x3vDBz/jHnOG71MhNQtSGWq3rj8=
github.com/retailcrm/mg-bot-api-client-go v1.0.16/go.mod h1:lJD4+WLi9CiOk4/2GUvmJ6LG4168eoilXAbfT61yK1U=
github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 h1:4bT0pPowCpQImewr+BjzfUKcuFW+KVyB8d1OF3b6oTI=

View file

@ -9,7 +9,7 @@ import (
"gopkg.in/go-playground/validator.v9"
)
var regCommandName = regexp.MustCompile(`https://?[\da-z.-]+\.(retailcrm\.(ru|pro)|ecomlogic\.com)`)
var regCommandName = regexp.MustCompile(`https://?[\da-z.-]+\.(retailcrm\.(ru|pro|es)|ecomlogic\.com)`)
type defaultValidator struct {
once sync.Once

View file

@ -314,7 +314,7 @@ func (w *Worker) execCommand(message string) (resMes string, msgProd v1.MessageP
if vp.Quantity > 0 {
msgProd.Quantity = &v1.MessageOrderQuantity{
Value: vp.Quantity,
Unit: w.localizer.MustLocalize(&i18n.LocalizeConfig{MessageID: "pieces"}),
Unit: vo.Unit.Sym,
}
}

View file

@ -45,4 +45,3 @@ get_delivery: Get available types of deliveries
get_product: Get product by article or name
payment_options: "Payment options:"
delivery_options: "Delivery options:"
pieces: "pcs."

View file

@ -45,4 +45,3 @@ get_delivery: Obtener tipos de entrega disponibles
get_product: Recibir los productos por el artículo o el nombre
payment_options: "Opciones de pago:"
delivery_options: "Opciones de entrega:"
pieces: "piezas"

View file

@ -45,4 +45,3 @@ get_delivery: Получить доступные типы доставок
get_product: Получить товар по артикулу или наименованию
payment_options: "Варианты оплаты:"
delivery_options: "Варианты доставки:"
pieces: "шт."