获取产品&x27;Prestashop中的s标签

获取产品&x27;Prestashop中的s标签,prestashop,Prestashop,我是新来普雷斯塔肖普的,我真的很挣扎。缺乏好的文档是一个真正的缺点,有时我想尝试Magento之类的东西 无论如何,我试图使一个产品页面显示一个信息,只有当该产品被标记了特定的标签。我在互联网上搜索了大约3个小时,但找不到任何解决这个问题的方法 我怎么做?你们谁能给我指个方向吗 顺便说一句,我用的是1.5 谢谢您可以查看产品类内部。例如:Tag::getProductTags($id\u product)函数 关于您可以查看产品类内部。例如:Tag::getProductTags($id\u p

我是新来普雷斯塔肖普的,我真的很挣扎。缺乏好的文档是一个真正的缺点,有时我想尝试Magento之类的东西

无论如何,我试图使一个产品页面显示一个信息,只有当该产品被标记了特定的标签。我在互联网上搜索了大约3个小时,但找不到任何解决这个问题的方法

我怎么做?你们谁能给我指个方向吗

顺便说一句,我用的是1.5


谢谢

您可以查看产品类内部。例如:Tag::getProductTags($id\u product)函数


关于

您可以查看产品类内部。例如:Tag::getProductTags($id\u product)函数


如果您需要使用prestashop 1.5,请注意

   //this is your prooduct id that you get it from your url
   $id_product=Tools::getValue('id_product');
   //the you use it to return all of your tags of this product with this id product
   //but this return two array for example: array(array(tags))
   $productTags =Tag::getProductTags($id_product);
   //add this code return array(tags) ;
   $productTags=$productTags[intval(Context::getContext()->cookie->id_lang)];

如果使用prestashop 1.5,则需要

   //this is your prooduct id that you get it from your url
   $id_product=Tools::getValue('id_product');
   //the you use it to return all of your tags of this product with this id product
   //but this return two array for example: array(array(tags))
   $productTags =Tag::getProductTags($id_product);
   //add this code return array(tags) ;
   $productTags=$productTags[intval(Context::getContext()->cookie->id_lang)];

我来试试,然后汇报我来试试,然后汇报