News:

Looking for documentation? Take a look on our wiki

Main Menu

A product only visible to administrators?

Started by EvanGR, July 27, 2020, 11:49:32 AM

Previous topic - Next topic

EvanGR

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

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

#2
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

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

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

#5
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

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

Quotebut 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 4.4.5
php 8.1

Jörgen

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

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

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 4.4.5
php 8.1