Tell us what you are trying to do?
I've created a reviews database using Toolset (see it here hidden link). Users submit a review about a particular smart trainer, and as part of that review they can select from a checkboxes field called "Qualities" which has values like "Easy setup","Well-built","Quiet", etc. When checked, these are stored as numbers in the database. Unchecked stores no values.
Now here's the challenge: each of the smart trainers has a detailed homepage (example hidden link) where I'm displaying the "qualities" selected for each review. But I want to show a SUMMARY of the qualities people selected in reviews, so you get a sort of "quality profile" for the trainer. It would show something like this:
I could certainly pseudocode out a formula for computing the percentage. My problem is the PHP syntax, which I'm not very good with. I can read it and understand it, but writing it from scratch is another issue, especially when I don't really know how the data is structured.
In terms of pseudocode, here's how I need it to work:
function getQualityScore(qualityID, totalReviews,productID) {
// qualityID is the ID of the checkbox I'm computing a score for. This will vary from 1-8, I believe, since I have 8 checkboxes.
// totalReviews is the total number of reviews that have been submitted for this particular product. I have an existing shortcode for this.
// productID is unique ID of product being reviewed
totalChecked=total number of productID reviews where reviewer selected this particular qualityID;
// so if 100 reviews have been submitted for this product, and 20 of those reviews had this one particular qualityID checked, then we would return .2 (that is, 20%) for this particular quality.
I will require admin access details to review your current setup and on the trainer profile page, for example:
=> hidden link
- With above trainer profile page at what section exactly you would like to display the quality percentage?
Can you please setup one trainer profile with example data and tell me what will be the quality percentage for every quality options so when I try to build the solution I will be able to match the test profile you set for me.
*** 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 have set the next reply to private which means only you and I have access to it.
Again even when I try to login with the "my-account" link you shared. When I try to login and submit the login form still I can see the same message "Jetpack has locked your site's login page." and I cant able to login.
Can you pleases remove security plugin for now and send me access details so that I can login.
I have set the next reply to private which means only you and I have access to it.