Skip to content

Commit

Permalink
added product tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Tomaraei committed May 21, 2020
1 parent 07f47e9 commit 789a453
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/catalog/controller/vsbridge/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ public function populateProducts($input){
}
}

$tags = array();
if(!empty($product['tag'])) {
foreach(explode(',', $product['tag']) as $tag) {
array_push($tags, trim($tag));
}
}

$slug = $this->createSlug($product['product_id'], $product['name']);

$original_price_incl_tax = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')), $this->config->get('config_currency'), NULL, FALSE);
Expand Down Expand Up @@ -270,6 +277,7 @@ public function populateProducts($input){
'minimum' => !empty($product['minimum']) ? (int) $product['minimum'] : 1,
'status' => (int) $product['status'],
'slug' => $slug,
'tags' => $tags,
'url_path' => $slug,
'created_at' => $product['date_added'],
'updated_at' => $product['date_modified']
Expand Down

0 comments on commit 789a453

Please sign in to comment.