diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-16 09:41:12 +0800 | 
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-16 09:41:12 +0800 | 
| commit | 228c93e5d02359a7a8f6d08da7a99bfbd79ce0d3 (patch) | |
| tree | 189ee0b8e1a36908e62fa6a17a6ed0e577199a86 | |
| parent | bc3a49fb9a722e224973898ced5b8d1fe0a82ecd (diff) | |
Product cross-sell list of strings member
| -rw-r--r-- | catalog.cxx | 3 | ||||
| m--------- | libicclient | 0 | ||||
| -rw-r--r-- | qicclient/product.hxx | 9 | 
3 files changed, 11 insertions, 1 deletions
| diff --git a/catalog.cxx b/catalog.cxx index 549c7b3..6bb9499 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -35,6 +35,8 @@ namespace ICClient {  				return product.weight;  			case Product::AuthorRole:  				return product.author; +			case Product::CrossSellRole: +				return product.crossSell;  			default:  				return QVariant();  		} @@ -51,6 +53,7 @@ namespace ICClient {  			, {Product::ProdGroupRole, "prodGroup"}  			, {Product::WeightRole, "weight"}  			, {Product::AuthorRole, "author"} +			, {Product::CrossSellRole, "crossSell"}  		};  	} diff --git a/libicclient b/libicclient -Subproject fbad60cda7587ccb8acd53e8bbef12a485f6286 +Subproject 2ed1fce21c24a54bf09da8b39efd7d889a0b74e diff --git a/qicclient/product.hxx b/qicclient/product.hxx index 3b47241..b2abdeb 100644 --- a/qicclient/product.hxx +++ b/qicclient/product.hxx @@ -15,7 +15,8 @@ namespace ICClient {  			PriceRole,  			ProdGroupRole,  			WeightRole, -			AuthorRole +			AuthorRole, +			CrossSellRole  		};  		Product(icclient_product* product) : @@ -34,6 +35,11 @@ namespace ICClient {  				prodGroup = QString{product->prod_group};  			if (product->author)  				author = QString{product->author}; +			if (product->cross_sell) { +				auto cross_sell = product->cross_sell; +				for (size_t i = 0; i < cross_sell->length; i++) +					crossSell << QString{cross_sell->skus[i]}; +			}  		}  		QString sku; @@ -44,6 +50,7 @@ namespace ICClient {  		QString prodGroup;  		double weight;  		QString author; +		QStringList crossSell;  	};  } |