add seller data
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 3m23s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
matst80
2025-05-13 10:42:36 +02:00
parent 82528e35b4
commit 5ab2818e8d
3 changed files with 99 additions and 72 deletions

View File

@@ -57,6 +57,8 @@ type CartItem struct {
Category4 string `json:"category4,omitempty"`
Category5 string `json:"category5,omitempty"`
Disclaimer string `json:"disclaimer,omitempty"`
SellerId string `json:"sellerId,omitempty"`
SellerName string `json:"sellerName,omitempty"`
ArticleType string `json:"type,omitempty"`
Image string `json:"image,omitempty"`
Outlet *string `json:"outlet,omitempty"`
@@ -150,6 +152,8 @@ func getItemData(sku string, qty int) (*messages.AddItem, error) {
if ok {
outlet = &outletGrade
}
sellerId, _ := item.Fields[24].(string)
sellerName, _ := item.Fields[9].(string)
brand, _ := item.Fields[2].(string)
category, _ := item.Fields[10].(string)
@@ -174,6 +178,8 @@ func getItemData(sku string, qty int) (*messages.AddItem, error) {
Category4: category4,
Category5: category5,
Tax: 2500,
SellerId: sellerId,
SellerName: sellerName,
ArticleType: articleType,
Disclaimer: item.Disclaimer,
Outlet: outlet,