I am trying to:
Show diferent view based on a conditional value
Link to a page where the issue can be seen:
hidden link
I expected to see:
The related artworks defined in this view hidden link
The results of the condition works fine and show a debug value "in stock" or "out of stock" but dont show the embeded vie. The embededs views are showing correctly if no condition is applied.
Hello and thank you for contacting the Toolset support.
Can you try something simple and short to put inside the conditional inside of the view and check? This will let us know if you are not encountering this known issue https://toolset.com/errata/shortcodes-in-conditionally-displayed-content-may-not-be-executed-on-the-front-end/
If the condition does not work, I'll need to take a closer look at your admin area. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Unfortunately, some firewall is blocking me, check this screenshot hidden link
Can you deactivate this for a while until I login and check?
Hi Jamal,
It's my hosting provider that blocks foreigns IPs. Please, can you provide your IP in oder to allow access it.
Thanks,
Miquel
I am afraid, my IP address will change in time. Let me check with our system team about a fixed IP using the company's VPN.
I'll get back to you as soon as I get it set up.
Hello,
I just have talked with my hosting provider and he's said that you have to install Spanish language in your browser in order to access the web. Is not necessary that the Spanish language be the main language, it's just enough that the language exists in your browser
Something new about my issue?
I added Spanish to the languages of my browser and I was no longer blocked. I could go through the basic http authentication. Then I was able to login to the website. But, unfortunately, I faced two more blocking situations:
- I am unable to visit the page in Frontend, it asks for more http authentication, and it seems related to a different domain. Check this screenshot hidden link
- I am unable to access the WordPress admin. I get redirected to /my-account/ page. If I try to go the view in the backend, I get a restriction error hidden link
So, I thought about creating a new administrator user, programmatically. But the provided FTP access is not working for me too hidden link
Hello, can you take a look to my issue?
Have a nice New Year!
Thank you, I am now able to access the backend as an administrator. I did not test the FTP access though.
So, products are displayed using an Elementor single page template hidden link
This template uses the view "Other Artworks in Artwork PageEnter title hereSave the View
" hidden link
And inside of this view's loop, it uses the view "Other Available Artworks in Artwork Page 2". That does not display anything on the frontend hidden link
From what I gathered so far, it is expected that nothing appears. Because the view's Output Editor Section is wrapped inside a condition on the results count.
[wpv-conditional if="( '[wpv-items-count]' ne '0' )"]
<div class="elementor-element" id="available"><h3 class="H3FullTitle">More Available Works</h3></div>
[wpv-filter-meta-html]
[wpv-layout-meta-html]
[/wpv-conditional]
The results count is always 0 because of how the query filters are built. Check this hidden link
Also this hidden link
Both views are configured to query Products, so, I am a bit confused. Can you explain what would you like these views to display?
Hi Jamal.
There are two types of artworks. One of them are the artworks in sale and the other ones are the sold artworks. When you are visiting a artwork page in sale you can see the other artworks in sale, by the other side, if you are visiting a page from an sold artwork you can see the other sold artworks. This is the main purpose of the conditionals and the two embeded views.
If you don'u use the conditional this embeded view ([wpv-view name="available-artworks-in-artwork-page-2" cached="off"]) returns some values, but when you use the embeded view in a conditional there is no result
Sorry but I still do not see what should be displayed.
Let's take this product/artwork hidden link
If we edit it hidden link
I can only see one relationship to the Artist "Andrew McIntosh", but the view is configured to query posts from a relationship which is confusing hidden link
It also confuses me that the view is querying both products and artists hidden link
Should this view queries artists that are related to the current product?
Then the nested view is querying products that are related to any relationship. hidden link
What relationship should it query from?
I want to do this:
In an artwork page, the view should show all the artworks for sale related to the Artist of the Artwork in the page (in this case Andrew McIntosh) in case that the artwork are in sale, OR show the sold artworks in case that the artwork in the page is sold.
If there is no conditional, the related artworks appear correctly. The problem when I use the conditional. See the attached image.
The conditions in the content template of the view "Other Artworks in Artwork Page" won't work, because the content template is meant to display the parent Artist. Artist posts do not have the fields "wpcf-enquire" or "_stock_status".
The conditions should go in the content template of the view "Other Available Artworks in Artwork Page 2" as it is the one that will display products from the same parent Artist. It is this content template that should include the conditions to display "FOR SALE" and "OUT OF STOCK". Does it make sense?
Yes, I think it's a good solution. Do you know if it works?