Is there an easy way to make webpage content (imag...
# suitecommerce
k
Is there an easy way to make webpage content (images mostly) only visible to certain types of customers? We have B2B and B2C on one site, and want to show different content to signed in customers.
s
Not in an air-tight way. You could use the profile model / component to get whatever status the user has and then edit/override/extend/etc all the places images are rendered to stop them showing, but this would be rather hacky and it wouldn't prevent them from circumventing it (eg by looking at API response data)
👍 1
k
We don't need airtight. Maybe I'll mention this to the developer we work with... Because none of that made any sense to me. Hahaha. Thanks 😃
w
I got a related question on this - say I want these content to be searchable, most likely I’ll have to build a custom extension for the search feature correct?
s
@Katy OK, I would emphasise my point about this being hacky. I don't think that this could be done in a clean way. You would have to go through all the places the images are served and add in checks. It might be possible to conditionally add an exclude to the items API so that the item images are never returned for certain users who make a call.
@wbermudo Could you be more specific?
k
@Steve Goldberg Well, we only want to restrict viewing of promo advertising images/links, so it's going to be pretty basic anyway. Just a couple images on the main landing page. We manage access to the rest of the site content via commerce categories and customer segments.
Unless there's a way to make content only appear on one domain, when it's all under one website record.
s
Ah I see, then that's a lot easier! If you have access to the UserProfile component in the extensibility API then it's super easy, otherwise your developer can access the Profile model