weight fix
This commit is contained in:
parent
cb2ae6a856
commit
a95e549358
|
|
@ -690,7 +690,7 @@ func prepearAttributesWithFlat(data *models.Product) ([]gm.ProductAttributeValue
|
|||
{AttributeID: attributesMap["sku"].ID, TextValue: data.ProductGroupID},
|
||||
{AttributeID: attributesMap["product_number"].ID, TextValue: data.ProductNumber},
|
||||
{AttributeID: attributesMap["name"].ID, TextValue: data.Name, Channel: "default", Locale: "tm"},
|
||||
{AttributeID: attributesMap["weight"].ID, FloatValue: weight},
|
||||
{AttributeID: attributesMap["weight"].ID, TextValue: data.Weight},
|
||||
{AttributeID: attributesMap["status"].ID, BooleanValue: true},
|
||||
{AttributeID: attributesMap["visible_individually"].ID, BooleanValue: true},
|
||||
{AttributeID: attributesMap["url_key"].ID, TextValue: data.ProductGroupID},
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -84,13 +83,13 @@ func SendRequest(method string, endpoint string, values []byte, authKey string)
|
|||
func NewHttpClient() (http.Client, context.Context) {
|
||||
const ConnectMaxWaitTime = 30 * time.Second
|
||||
const RequestMaxWaitTime = 60 * time.Second
|
||||
proxyUrl, _ := url.Parse("http://79.98.129.183:3128")
|
||||
//proxyUrl, _ := url.Parse("http://79.98.129.183:3128")
|
||||
client := http.Client{
|
||||
Transport: &http.Transport{
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: ConnectMaxWaitTime,
|
||||
}).DialContext,
|
||||
Proxy: http.ProxyURL(proxyUrl),
|
||||
//Proxy: http.ProxyURL(proxyUrl),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue