Display prices of a particular variation in filter
- wpsolrKeymaster1 year, 8 months ago #30725
Here is the procedure:
1) Select type “Float” for “_price” on screen 2.2
2) In your code use “_price_f” (“_f” for float):$document_for_update['_price_f'] = 2000;
3) Save your product to reindex its price (or all your products if you want to see a single facet value (2000)prakashreddy.imduriParticipant1 year, 8 months ago #30726Okay, I tried first 2 steps, It didnt worked. I didn’t understood the 3rd point, Save your product to re-index its price. Do I need to edit and save product ? or just by deleting and re indexing , this will be fixed?
prakashreddy.imduriParticipant1 year, 8 months ago #30729I deleted and re-indexed all products and variation, still there is no change in price filter, its still showing all price ranges.
prakashreddy.imduriParticipant1 year, 8 months ago #30732I echoed the code, I was getting this, I have now changed that to _price_f, its a old code
Do, I need to turn on this _price in variations too ? I already enabled the _price in Products section
prakashreddy.imduriParticipant1 year, 8 months ago #30736I unchecked variations and reindexed, Still the filters are showing all ranges, Here is the code :
wpsolrKeymaster1 year, 8 months ago #30738What does the WPSOLR query tell you (if not, install the WPSOLR query monitor add-on)?
prakashreddy.imduriParticipant1 year, 8 months ago #30739I checked for the default search page :
Do you want me to check in some other page too ?wpsolrKeymaster1 year, 8 months ago #30742If the index’s “_price_f” value is not updated, while your code is called (check with the print_r), try to replace the event
WPSOLR_Events::WPSOLR_FILTER_SOLARIUM_DOCUMENT_BEFORE_UPDATE
withWPSOLR_Events::WPSOLR_FILTER_SOLARIUM_DOCUMENT_FOR_UPDATE
in your code.prakashreddy.imduriParticipant1 year, 8 months ago #30743This is working – WPSOLR_FILTER_SOLARIUM_DOCUMENT_FOR_UPDATE.
prakashreddy.imduriParticipant1 year, 8 months ago #30745Thank you.
You must be logged in to reply to this topic.