Skip Navigation

[Resolved] Prosuct submitted with Cred now filtering price till product updated in backend

This thread is resolved. Here is a description of the problem and solution.

Problem:
views_woo_price is empty - how to calculate it

Solution:
views_woo_price is calculated from: Toolset => Woocommerce Views => Static Product Fields for Parametric Searches

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/prosuct-submitted-with-cred-now-filtering-price-till-product-updated-in-backend/#post-917427

Relevant Documentation:
https://toolset.com/documentation/user-guides/woocommerce-views-calculated-fields-and-batch-update/#wcv-update-calculated

This support ticket is created 6 years, 7 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#917380

I have created a post form for Product with _regular_price AND _sale_price.
after submitting a new product, the product show up in shop page that i have created but price filter views_woo_price dont show the product if changing price filter value. Although the price range is correct!

Solution i found for now:
i click quick edit the product in the wordpress backend and update it without changing anything just UPDATE. and then the product works with the price filter views_woo_price.

how to solve this? is it possible to create a filter with _sale_price? maybe this could solve the issue!

you can submit new product here : hidden link Regular/Sale Price are marked red
you can try to filter the new product here : hidden link

#917412

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I need admin access details to check why the filter is not working. Could you please pass me the admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#917427

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - views_woo_price is calculated from: Toolset => Woocommerce Views => Static Product Fields for Parametric Searches

So - if you change the setting from " Using the WordPress cron" and to every 5 minutes, it will be updated every 5 minutes. Does that help?

#917430

i will test it out. please give me couple of minutes!

#917435

Ok it looks like "Using the WordPress cron" solved the problem within 5 minutes. i wonder if its possible to achieve this different way without waiting 5 minutes!

one more question
on this views search it filter the minimum price right but when i add the max price it show no results which is weird.

try this
1 - go here : hidden link
2- in "min" choose 50.000 for example
3- in "max" choose 100.00
4- Results = No items found

actually it should show me results!

Views Search : hidden link

#917438

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm glad to know that your original issue with views_woo_price is resolved with the Wocommerce settings I guided.

i wonder if its possible to achieve this different way without waiting 5 minutes!
==> I do not see a other way until you update your postmeta for the product you submit with cred_save_data hook. You may try to give a try if that works for you.
For example:

update_post_meta($post_id,'views_woo_price',5000);

Where:
- Replace 5000 with your proper variable value that stores the price.

one more question
==> Could you please kindly open a new ticket with your each new question. This will help other users searching on the forum as well as help us to write correct support summery to which issue belongs to.

#917617

I have tried this code bellow. unfortunately idnt manage this. with less than 5 minutes

function save_event_meta( $post_id, $post ) {
      
     update_post_meta($post_id,'views_woo_price',1000);
}
add_action( 'save_post', 'save_event_meta', 20,2 );
#917833

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

well - as I understand you expect to run the save_post action with every 5 minutes? If yes - its not going to happen, you need to update the post.