This support ticket is created Il y a 4 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hey,
My woocommerce products have relationship with a cpt called "sarig-products".
I restrict access per role to each product - only users with role "partner" can see the product called "partner", and so forth.
I made a layout for non-logged users (guests) with a login form, which is redirecting them after login to the product they are matched for (using the plugin "peter's login redirect).
But - when guests go to the product, instead of getting the login form once, they get the login form 5 times: the product + the 5 "sarig products" related to it. But I haven't restricted the "sarig products" cpt. By the way - I also get to see a text paragraph I entered in the single-product template made in elementor.
If I change "What to display for single-posts when there is no read permission" from the layout to the default error, I get the error fine, e.g just once.
This looks like a bug. Is there any way around this?
thanks!
Ok - maybe someone DOES have a solution? Because I'm using a one page checkout plugin which doesn't work when I am using the woocommerce views template....
So , maybe we can either:
1) find a solution to the access/elementor problem
2) find how to make the plugin work when I'm on the woocommerce views template...
thanks!
Hey Nigel!
I can add the shortcode, no problem - the issue is that I can't use access with this page.
I login form to show only for guests, and the product to show only for logged in users. But when I put the product in a "post group" in access, It doesn't work (see images).
thx,
Ido
Ok - I think I got the problem.
Let me try to explain:
I have a product. It's created with an Elementor Single-Product template.
I want to restrict access to this product, so I created a post group in "Access" and added the product to it. For not logged-in users (guests) I created a layout with a login form. And things go wrong.
From what you're saying, I gather that the issue is the error message I chose for the post group. If I choose the regular error message, things work OK. But If i redirect to a layout, then - like you said - it mixes layouts with elementor and that's wrong.
I'll try creating a 404 page with elementor which will hopefully act as the "default error", then I might be able to avoid the layout use and let's see if that works.