Puntorosso
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
| Status | Topic | Supporter | Voices | Posts | Freshness |
|---|---|---|---|---|---|
|
Refresh view
Started by: Puntorosso
in: Toolset Professional Support
Problem: If no items are found in a View of WooCommerce Orders, I would like to automatically refresh the View results after a set amount of time. Solution: There is no automatic feature for refreshing View results, nor is there a true JavaScript API for Views, but you could achieve something similar by reloading the current page in a setTimeout function added to a script tag in the wpv-no-items-found block of the View, for example:
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
<script type="text/javascript">setTimeout(function(){location.reload();}, 5000);</script>
[/wpv-no-items-found]
This will reload the current page after 5 seconds if no results are found in the View. That loop of refreshing every 5 seconds would continue until results exist. Relevant Documentation: |
|
2 | 3 | 4 years, 10 months ago | |
|
User form won't show in Firefox
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 3 | 4 years, 10 months ago | |
|
Filter Woocommerce orders
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 7 | 4 years, 10 months ago | |
|
Query select field
Started by: Puntorosso
in: Toolset Professional Support
Problem: Use WP_Query to extract all order posts containing a specific value on the select field. Solution: The WP_Query will query posts in "Published" status by default: But Woocommerce order posts do not use WP default status, so you need to define the post status parameter in WP_Query. For example: https://toolset.com/forums/topic/query-select-field/#post-2101145 Relevant Documentation: |
|
2 | 3 | 4 years, 10 months ago | |
|
Views incompatibility with Indeed Ultimate Affiliate Pro
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 10 | 4 years, 10 months ago | |
|
WooCommerce Orders with specific products
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 2 | 4 years, 11 months ago | |
|
Cannot update plugins
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 2 | 4 years, 11 months ago | |
|
Dropdown with WPML
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 2 | 4 years, 11 months ago | |
|
Refresh data with Ajax form
Started by: Puntorosso in: Toolset Professional Support |
|
2 | 3 | 4 years, 11 months ago | |
|
Communication error
Started by: Puntorosso
in: Toolset Professional Support
Problem: The issue here is that the user is getting the message "Plugin cannot connect to toolset.com" on their backend screen 1. Go to your wordpress dashboard. Once you've done this the issue should no longer appear. |
|
2 | 3 | 4 years, 11 months ago | |
|
Scroll to edited item in a View with Edit Post Form and redirect
Started by: Puntorosso
in: Toolset Professional Support
Problem: I have a View that shows posts and includes an Edit Post Link in each result. I have set up the Edit Post Form in a separate Content Template, and this seems to be working as expected. After editing a post by clicking the Edit Post Link and submitting the Edit Post Form, I would like to redirect back to the page containing the View of posts and scroll to the item that was just edited so it is visible in the browser. Solution: You can add an anchor tag to each item in the View's loop, then use the Forms redirection API to redirect to that page and scroll to the anchor using a URL hash with the anchor name. This could only work in a View that does not use infinite scrolling, because the results must all be present on the page when the page loads in order to scroll to the correct location. If the View uses pagination, you'll also need to calculate the correct page number to jump to the correct set of results. Anchor syntax using post ID to create unique anchor id: <a name="result-[wpv-post-id]"></a> or <a id="result-[wpv-post-id]"></a> If you add an anchor in the View loop, using the syntax shown above, you can redirect and scroll to that specific element by including the corresponding name in a URL hash like so: Example redirection API implementing this deep-linking syntax:
// Redirect and scroll to the edited post in View results
// Toolset support: https://toolset.com/forums/topic/scroll-to-last-used-item-in-a-view/
add_filter('cred_success_redirect', 'tssupp_deep_link_after_edit',10,3);
function tssupp_deep_link_after_edit($url, $post_id, $form_data)
{
if ($form_data['id']==12345)
return 'https://yoursite.com/page-with-view/#result-' . $post_id;
return $url;
}
You would replace 12345 with the numeric ID of the edit post Form, and replace https://yoursite.com/page-with-view/ with the full path to the page containing the View. If there are multiple pages containing the same View, you'll need something more complex here to determine the proper redirection location. Relevant Documentation: |
|
2 | 3 | 4 years, 12 months ago |