如何讓Prestashop通過標籤或標題展示特色產品? 我不想手動添加很多產品,我想通過標籤或標題來製作。Prestashop - 特色產品標籤
0
A
回答
0
我建議你拿起一個模塊,在PrestaShop的官方插件市場上搜索Related Products by Product’s Tags
。
要獲得具有特定標籤的產品,您可以使用Search類,例如在你的模塊中你有鉤子displayFooterProduct
:
public function hookDisplayFooterProduct($params){
$tags = $this->context->controller->product->tags;
$id_lang = $this->context->language->id;
if(is_array($tags) AND count($tags)>1){
foreach($tags as $tag)
$products_related = array_merge($products_related, Search::searchTag($id_lang, $tag);
// I guess here you have to check duplicates and also remove the product that you're viewing
} else {
$products_related = Search::searchTag($this->context->language->id, $tags[0])
}
// After you have to display results, with a tpl
$this->smarty->assign(array(
'products_related' => $products_related
));
return $this->display(__FILE__, 'views/templates/hook/footerproduct.tpl');
}
相關問題
- 1. 如何通過prestashop中的特色產品塊顯示特色產品
- 2. Prestashop - 家庭特色產品標題翻譯
- 3. WooCommerce特色產品
- 4. Prestashop - 顯示家用特色產品的數量和功能
- 5. laravel 5:產品和特色產品
- 6. Prestashop產品圖片
- 7. Prestashop產品每頁
- 8. PrestaShop產品組合
- 9. Prestashop單產品定製
- 10. Prestashop API訂單產品
- 11. Prestashop添加產品組合
- 12. Prestashop - 設定產品重量
- 13. Prestashop 1.6 url虛擬產品
- 14. Prestashop產品審查模塊
- 15. Prestashop WebService:添加產品
- 16. 產品價格Prestashop 1.7
- 17. Shopify當前產品標籤
- 18. 產品循環標籤woocommerce
- 19. 更改產品標籤Magento
- 20. 限制「特色產品」或「最近產品」中的產品說明長度
- 21. Prestashop:在產品清單/產品頁面上添加單個產品屬性
- 22. prestashop從產品列表中排除產品
- 23. Prestashop - 當產品具有屬性時無法添加產品(parsererror)
- 24. 獲得WooCommerce特色產品中的WP_Query
- 25. BigCommerce - 特色產品>描述
- 26. wordpress查詢,顯示特色產品
- 27. 在Prestashop中顯示推車摘要中的產品特徵
- 28. 排除在相關產品的具體產品標籤WooCommerce 3+
- 29. woocommerce產品如何通過產品標籤獲得訂單
- 30. 通過WooCommerce中的產品ID獲取產品標籤
哪個版本的prestashop? – sarcom
你的問題很困惑,你能更好地解釋你想要什麼?因爲你說'展示',但是在你說'手動添加很多產品'之後,這兩件事情是不同的:) – sarcom
@sarcom這是1.6.0.9版本。當您轉到「產品編輯」和「關聯」時,您會看到它下面的「默認類別」和「附件」。我想在每個產品頁面中填寫「附件」,但不是手動填寫。我想通過產品標籤或標題來填充汽車。你明白嗎? – ZAM666