I would like to add either a class to each product depending on this category or to check if this product exist in this category and add some class
ex: now I have
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_category_id ?>">
it shows me what for ex. h34
this is category class but the problem is that sometimes I ave multiple categories but product tkes only first one main category.
I need somethig like that
if product SHIRT exist in categoryID 77 add class="label"
some ideas?
使用此查询来检查产品是否属于类别
SELECT * FROM `#__virtuemart_product_categories` WHERE `virtuemart_product_id` = <product_id> AND `virtuemart_category_id` = <category_id>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.