Link on empty category with user specific permissions

  • Posts: 14
  • Thank you received: 0
6 years 9 months ago #294720

-- HikaShop version -- : 3.4.1
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.1.14
-- Browser(s) name and version -- : Chrome 67.0.3396.99 (Official Build) (64-bit)

I have a site that sells school uniforms. Users who register are assigned to a user group based on their school. Schools are Treated as a brand that they share the product categories like Boys, Girls, shirts, pants...

I have a empty category for a specific school. on the product page for this specific school, I need to display a messge with a link. Ideally, all other empty categories should say, "sorry, nothing here, check back later." but for this SPECIFIC school on this SPECIFIC category, I need there to be a message with a link. How can I pull this off? Thank you! Your Help is Appreciated!

Please Log in or Create an account to join the conversation.

  • Posts: 83603
  • Thank you received: 13533
  • MODERATOR
6 years 9 months ago #294754

Hi,

That will require customizing the product / listing.php view file so that when there are no products found, you can add your message.
You can easily edit that view file via the menu Display>Views and you can easily check whether there are products found or not with such code:

if(empty($this->rows)) { 
echo 'no products';
}

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum