Nosto/nosto-magento2

Default tags overriding custom Tag 1 values

Kivike opened this issue · 1 comments

Magento 2 version(s) used: 2.3.2-p2
Extension version(s) affected: 5.0.1

Description
If custom attributes are added for Tag 1, they are overridden by default tags.

// Update customised Tag1, Tag2 and Tag3
$this->amendAttributeTags($product, $nostoProduct, $store);

is called before

if (($tags = $this->buildDefaultTags($product, $store)) !== []) {
    $nostoProduct->setTag1($tags);
}

in Nosto\Tagging\Model\Product\Builder

How to reproduce

  1. Add attribute as custom Tag 1 in Nosto admin config
  2. Sync a simple product (so that it will end up with non-empty default tags)
  3. Only the default tags are included, not the one from step 1

Magento 2 mode

  • Developer
  • Production

Full page cache

  • Enabled
  • Disabled

Nosto indexer mode

  • Update On Save
  • Update By Schedule

Possible Solution
Set default tags to Tag 1 before amending custom tags

Additional context

Hi @Kivike,
Thanks for reporting this! I've made a quick fix and it's released here: https://github.com/Nosto/nosto-magento2/releases/tag/5.0.2