What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Allow customers access to some pages while disallow access to other pages

Solved

Allow customers access to some pages while disallow access to other pages

morima
Shopify Partner
12 1 1

Is it possible to allow customers to access to some specific pages?

 

For example, customers can access to landing page, and product page that is linked from landing page as well as cart and checkout pages while they see "Coming soon page" on other pages like Q&A page?

 

Thank you

Accepted Solution (1)

PaulNewton
Shopify Partner
7450 657 1565

This is an accepted solution.

This is access control, content gating, membership, wholesale ,etc type of customization often done using customer tags.

Plenty of topics in the forums available through search.

 

There are also apps like locksmith for such needs.

https://apps.shopify.com/locksmith 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Replies 9 (9)

PaulNewton
Shopify Partner
7450 657 1565

This is an accepted solution.

This is access control, content gating, membership, wholesale ,etc type of customization often done using customer tags.

Plenty of topics in the forums available through search.

 

There are also apps like locksmith for such needs.

https://apps.shopify.com/locksmith 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


morima
Shopify Partner
12 1 1

Thank you for your answer!

I searched a bit more deeply and found that for now adding some code in `theme.liquid` would be enough for my case.

I added the code like:

{% if request.path != "/path-to-prrevent-access" %}
<script>window.location.href="redirect-url"</script>
{% endif %}
PaulNewton
Shopify Partner
7450 657 1565

Note that will not work if someone has javascript disabled.

Javascript redirects should be done as a fallback for meta-refresh redirects in a html documents <head>

Additionally that still doesn't prevent the original content from being rendered and thus viewable until the javascript executes.

In theme.liquid there is a {{ content_for_layout }} that should also have similar logic adjusted for when it's not the frontpage or other situations mean to be viewable by non-logged in customers. 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


morima
Shopify Partner
12 1 1

Ah yeah true.

Maybe it would be better setting redirect to some pages like explained here.

 

PaulNewton
Shopify Partner
7450 657 1565

Those are server level redirects, 301's, meant for permanent page moves and changes in url structure.

There will be no logic you can apply to let someone see the initial urls content before the redirect.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


morima
Shopify Partner
12 1 1

Well my case is to allow all customers to buy the product.

But due to time restrictions to build an entire store, I would like just to let customers access a product page and a few others necessary to buy the product.

 

So I don't really need any complex logics like switching on customer status or something but I just want to prevent customers from accessing pages which aren't ready for them.

(I have just created a landing page for the product, where customers will access it from a QR code on a sample product they will have got by then and from there they will access to my Shopify store and buy the product if they want to.)

 

So in that case, which do you think is better meta-refresh redirects or server-level redirects?

Anj-sensperfume
Shopify Partner
5 0 0
because the thift group waiting only try to damagae others and still thats why the reasons... atleast someone got caught
PaulNewton
Shopify Partner
7450 657 1565

The main way to handle that is to not publish a resource(page, collection,blog,product,etc)  to the online-sales channel.

And only link to those pages in menus so it's not obvious if there are other pages.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Jahid-KlinKode
Excursionist
145 1 5

Hey @morima, need help setting up a Members-Only Store on Shopify? Watch this tutorial: