Skip to content

Instantly share code, notes, and snippets.

@Shagshag
Last active December 22, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shagshag/6493785 to your computer and use it in GitHub Desktop.
Save Shagshag/6493785 to your computer and use it in GitHub Desktop.
Tags in product properties
<?php
class Product extends ProductCore{
public static function getProductProperties($id_lang, $row, Context $context = null)
{
$row = parent::getProductProperties($id_lang, $row, $context);
if (is_array($row) && isset($row['id_product'])) {
$usetax = Tax::excludeTaxeOption();
$cache_key = $row['id_product'].'-'.$row['id_product_attribute'].'-'.$id_lang.'-'.(int)$usetax;
self::$producPropertiesCache[$cache_key]['tags'] = Tag::getProductTags($row['id_product']);
$row = self::$producPropertiesCache[$cache_key];
}
return $row;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment