summaryrefslogtreecommitdiff
path: root/interchange
diff options
context:
space:
mode:
Diffstat (limited to 'interchange')
-rw-r--r--interchange/product.hxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/interchange/product.hxx b/interchange/product.hxx
index eda700a..b8e6714 100644
--- a/interchange/product.hxx
+++ b/interchange/product.hxx
@@ -23,30 +23,30 @@ namespace QInterchange {
};
Product() {}
- Product(struct interchange_product* product) :
- price{product->price},
- weight{product->weight}
+ Product(struct interchange_product product) :
+ price{product.price},
+ weight{product.weight}
{
- if (product->sku)
- sku = QString{product->sku};
- if (product->description)
- description = QString{product->description};
- if (product->title)
- title = QString{product->title};
- if (product->comment)
- comment = QString{product->comment};
- if (product->thumb)
- thumb = QString{product->thumb};
- if (product->image)
- image = QString{product->image};
- if (product->prod_group)
- prodGroup = QString{product->prod_group};
- if (product->category)
- category = QString{product->category};
- if (product->author)
- author = QString{product->author};
- if (product->crosssell) {
- auto crosssell = product->crosssell;
+ if (product.sku)
+ sku = QString{product.sku};
+ if (product.description)
+ description = QString{product.description};
+ if (product.title)
+ title = QString{product.title};
+ if (product.comment)
+ comment = QString{product.comment};
+ if (product.thumb)
+ thumb = QString{product.thumb};
+ if (product.image)
+ image = QString{product.image};
+ if (product.prod_group)
+ prodGroup = QString{product.prod_group};
+ if (product.category)
+ category = QString{product.category};
+ if (product.author)
+ author = QString{product.author};
+ if (product.crosssell) {
+ auto crosssell = product.crosssell;
for (size_t i = 0; i < crosssell->length; i++)
crossSell << QString{crosssell->skus[i]};
}