Author Topic: A product only visible to administrators?  (Read 585 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 359
A product only visible to administrators?
« on: July 27, 2020, 11:49:32 am »
We want to build some test products, and we want them only visible to administrators.

i.e. not visible or searchable for regular visitors and users.

Is this possible?

Thank you

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3018
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: A product only visible to administrators?
« Reply #1 on: July 27, 2020, 12:46:16 pm »
Create a customer group, Admins Only, and set this to be available to Admins Only for the products.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

  • Jr. Member
  • **
  • Posts: 359
Re: A product only visible to administrators?
« Reply #2 on: July 27, 2020, 12:50:21 pm »
Thanks. I did that. But how do I set the permissions for the shopper group?

I can only set a name, description, and whether it's published or not.

EDIT: And also the TEST product shows up in the search results for guests.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3018
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: A product only visible to administrators?
« Reply #3 on: July 27, 2020, 13:19:42 pm »
The product should be marked Admins Only shopper group.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

  • Jr. Member
  • **
  • Posts: 359
Re: A product only visible to administrators?
« Reply #4 on: July 27, 2020, 13:46:31 pm »
VirtueMart 3.8.2 10325

Created new shopper group: Admins Only
Set it to published.

Created a new basic product. Named it "test". Set it to Admins Only shopper group (only that).
No category assigned.

When I search the frontend for "test", as a guest, the product shows up as a blank entry without information (title, price etc). If I unpublish the test product, and search again, nothing shows up.
Therefore the search function fetches the product, when it shouldn't, but doesn't show any product information.

Then I log-in as an admin.
Same thing. And I can't access the single product page for that ghost product. (says restricted access)

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3018
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: A product only visible to administrators?
« Reply #5 on: July 27, 2020, 14:47:21 pm »
Super Admins, have before been able to see ALL products, I am not sure if that still is the case. What admin Do You mean ?
Uncategorized products are handled as special case, assign test with a category.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

  • Jr. Member
  • **
  • Posts: 359
Re: A product only visible to administrators?
« Reply #6 on: July 28, 2020, 09:34:53 am »
I assigned a category to the product but there wasn't much difference. Unfortunately this looks like broken behavior.

I am on VM 3.8.2, just a few commits before the latest version, but I doubt this is working in the latest version... judging from past experience in other long-standing issues.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3262
  • VirtueMart Version: 3.8.4
Re: A product only visible to administrators?
« Reply #7 on: July 28, 2020, 14:35:50 pm »
Quote
but I doubt this is working in the latest version... judging from past experience in other long-standing issues.

Hmm - I hope you dont think that adding a little snipey comment furthers your cause!

I use this in a live store for over 2.5 years and have NO issues

But just because I want to be thorough, I wasted some of my business day testing again:-

3.8.4.335 and other earlier versions

Add a "control" shoppergroup
Set this (along with any other shoppergroups) on the user account
Assign this shoppergroup to the product
Product is also assigned to a category

Product works as expected

It does not show in searches or direct url or category pages for accounts without the shoppergroup assigned
It does show in searches or direct url or category pages for accounts with the shoppergroup assigned
regards
A

Joomla 3.9.20
php 7.3

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3018
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: A product only visible to administrators?
« Reply #8 on: July 28, 2020, 20:38:49 pm »
I have now also tried this on a 3.8.2.10325 version and can not replicate the issue. I suggest that You try to test with Protostar template. Make sure no files are overridden and that there is a complete switch. I have also a customized template, but with 3.8.2.10325 I see no issues.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

  • Jr. Member
  • **
  • Posts: 359
Re: A product only visible to administrators?
« Reply #9 on: July 30, 2020, 10:02:22 am »
Thank you very much, both of you.

I did not intend to waste anyone's time, nor further 'my cause'.

I have reported other issues in the past, some of which have received no official solution.
Hence my low expectations for a solution in a minor VM version update (last version vs the one we have installed).

My mistake was that I tried to make it work on a live site, in which I could not afford to switch templates and experiment freely.

I will do further testing and see where the problem is. It may well be the template.

Thank you for spending time on this, and sorry for any trouble.


AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3262
  • VirtueMart Version: 3.8.4
Re: A product only visible to administrators?
« Reply #10 on: July 30, 2020, 10:39:18 am »
EvanGR

No problems - if you check out on a test site version first - you can see what may be causing the root problem, as you dont know if you will still have the same issue with a later version of VM until you do that testing.
regards
A

Joomla 3.9.20
php 7.3