- Posts: 85
- Thank you received: 9
Comments and votes for categories
- pagemaster
-
Topic Author
- Offline
Less
More
6 years 6 months ago - 5 years 10 months ago #316626
by pagemaster
Comments and votes for categories was created by pagemaster
-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.2.26
Hello,
is it possible to add comments and rating for categories?
Because me I have a website where I used a category for each restaurant, and each restaurant has the products that it sells. Me I want to permit to the customers to add comments and ratings for each restaurant.
Thank yoiu for you support
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.2.26
Hello,
is it possible to add comments and rating for categories?
Because me I have a website where I used a category for each restaurant, and each restaurant has the products that it sells. Me I want to permit to the customers to add comments and ratings for each restaurant.
Thank yoiu for you support
Last edit: 5 years 10 months ago by pagemaster.
Please Log in or Create an account to join the conversation.
6 years 6 months ago #316634
by nicolas
Replied by nicolas on topic Comments and votes for categories
Hi,
There is no mechanism for that in HikaShop. You can only have comments and votes for products or for vendors, not categories.
Adding that would require coding that capability, which isn't something that can be done rapidely as the system wasn't made to support it.
There is no mechanism for that in HikaShop. You can only have comments and votes for products or for vendors, not categories.
Adding that would require coding that capability, which isn't something that can be done rapidely as the system wasn't made to support it.
Please Log in or Create an account to join the conversation.
- pagemaster
-
Topic Author
- Offline
Less
More
- Posts: 85
- Thank you received: 9
6 years 6 months ago #316697
by pagemaster
Replied by pagemaster on topic Comments and votes for categories
Ok, thank you anyway. I try to bypass the problem with some code.
Best regards
Best regards
Please Log in or Create an account to join the conversation.
- pagemaster
-
Topic Author
- Offline
Less
More
- Posts: 85
- Thank you received: 9
5 years 10 months ago - 5 years 10 months ago #325467
by pagemaster
Replied by pagemaster on topic Comments and votes for categories
I solved with custom code. I added a button for each category that has a vendor with the same name of the category.
This is the code of the view HikaShop - category / listing_img_title.php:
This is the code of the view HikaShop - category / listing_img_title.php:
Code:
<?php
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select('vendor_id');
$query->from($db->quoteName('tbuonapp_hikamarket_vendor'));
$query->where('vendor_name = ' . '"' . $this->row->category_name . '"');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$idVendor = $db->loadResult();
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select('vendor_alias');
$query->from($db->quoteName('tbuonapp_hikamarket_vendor'));
$query->where('vendor_name = ' . '"' . $this->row->category_name . '"');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$aliasVendor = $db->loadResult();
?>
<?php if($idVendor != null and $idVendor != ""){ ?>
<br><br>
<div>
<a class ='hikabtn hikawishlist' href='<?php echo "https://www.buonapp.ch/voti-ristoranti/vendor/show/" . $idVendor . "-" . $aliasVendor; ?>'><span>Vota ristorante</span></a>
</div>
<?php } ?>
Last edit: 5 years 10 months ago by pagemaster.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.210 seconds