openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

[Shopfront] Link to hub with "hide all references" setup is still displayed in producers profiles

Open audez opened this issue 2 years ago • 3 comments

Description

Even if a hub selects the "hide all references" settings to make its shopfront completely invisible, the reference is still displayed in its producers profiles.

This impacts hubs that want their shops to remain private, for example hubs that have a pro and public shop, because they don't want customers to see that they apply different prices to their products.

Expected Behavior

Reference to the shop must be hidden everywhere (see issue #8896).

Actual Behaviour

Reference is invisible in Producers tab but remains displayed in the producers profiles (popup of producers details), that can be accessed through:

  • the supplier shop page > Producers tab > click on the supplier shop link > a popup will open, displaying the reference below "SHOP FOR XXX PRODUCTS AT:"
  • another hub provided by the supplier > Producers tab > click on the supplier shop link > a popup will open, displaying the reference below "SHOP FOR XXX PRODUCTS AT:"

Steps to Reproduce

  1. Connect as admin or superadmin to a hub
  2. In admin dashboard > Enterprises settings, set "Visible in search?" to "Hide all references"
  3. Go to one of the hub producer's shopfront (alternatively, go to another hub provided by the supplier)
  4. Click on the "Producers" tab to display the producers list.
  5. Click on the supplier's link, this opens a popup with producers' details
  6. You can see a link to the hub (below the label "SHOP FOR XXX PRODUCTS AT:")

Animated Gif/Screenshot

This is a hub set up to "Hide all references" : Screen Shot 2022-07-27 at 14 50 06

Connecting to another hub that shares the same supplier, the reference can be found in the "Producers" tab, by clicking on the supplier's link: Screen Shot 2022-07-27 at 14 50 46

Severity

bug-s2: a non-critical feature is broken, no workaround

Possible Fix

In the shop page, in Producers list, in the view that opens when clicking on a producer, hide references to shops that chose the "Hide all references" setting.

audez avatar Jul 27 '22 13:07 audez

Bite me. I forgot the producer profiles in https://github.com/openfoodfoundation/openfoodnetwork/issues/8896

Good news: we have users who actually visit producer profiles! Moving to papercut.

RachL avatar Jul 27 '22 14:07 RachL

Hey, can I please give this one a go?

leopengilley avatar Aug 04 '22 06:08 leopengilley

Sure @leopengilley! Thanks for working on this! Looking forward to this contribution! 🤗

drummer83 avatar Aug 04 '22 08:08 drummer83

hey @leopengilley as we don't have news from you I'm unassigning you. Feel free to come back any time if you wish to work again on this!

RachL avatar Sep 26 '22 08:09 RachL

Hi @RachL Can I work on this issue?

vsmay98 avatar Sep 27 '22 05:09 vsmay98

Hi @vsmay98 👋

Sure, will assign to you. Please feel free to comment here if you're stuck!

jibees avatar Sep 27 '22 08:09 jibees