top of page
To test this feature, visit your live site.
The Wix Wiz Community Forum
Welcome! Have a look around and join the discussions.
Velo (Wix Code)
Engage in discussions about Wix Velo on our Q&A forum. Ask tutorial-related queries, seek advice, and share your project
124Wix Classic Editor
Dive into Wix Classic Editor discussions on our Q&A forum. Ask questions, seek advice, and share your website projects.
29Editor X
Dive into Wix Editor X discussions on our Q&A forum. Ask questions, seek advice, and share your website projects.
7Wix Studio
Dive into the new Wix Studio discussions on our Q&A forum. Ask questions, seek advice, and share your website projects.
19Courses
Have questions about Wix Wiz courses? Ask away in our forum! Get the answers you need to enhance your learning.
3Apps & Templates
This is a channel dedicated to questions about apps and templates developed by the Wix Wiz Team.
8
New Posts
- Velo (Wix Code)Hi Eitan, I was able to look at your WhatsApp Verify Twilio tutorial and implement a WhatsApp Verification for users who are registering to an online course. I am using the same principals to send WhatsApp message as a one way communication tool to send the a message on approval. The message will contain a generic message "Dear applicant your application has been approved." But when I try to use the client.messages.create there is no response when I run the code from the back end twilio.jsw. My code is below: 👇 export const sendWhatsAppMessage = async()=>{ const twilio = require("twilio"); const accountSid = await getSecret("twilioAccountSid"); const authToken = await getSecret("twilioAuthToken"); const serviceID = "VA40b8535ce62d05f7035e5bb5ccb83a01"; const twilioPhoneNumber = await getSecret ("twilioPhoneNumber") const client = twilio(accountSid, authToken) const sendMessage = await client.messages.create({ body: "Dear student, your application for admission into CCD, Batch 40 has been approved . Please wait for payment link to complete the admission.", from: twilioPhoneNumber, to: "+8801712185328", }); console.log(sendMessage.body) return sendMessage; } I am also attaching a video which shows what happens when I run the code in backend. The WhatsApp number I am using is being used for the verification. Do I need to use a different number or is there something wrong with the code?
- Apps & TemplatesHi, I've been developing the app for my company and I stuck with the issues I can't go ahead with. Quick overview: the app is self-hosted, it has installation and data exchange API. It also has embedded script extension (which installs to the site on app installation) and widget that is actually a regular button, but it should be processed with our embedded script once detected on a page. Also this widget has settings that use data from our API (drop down options), so API request is required to connect the widget settings with the API. So the issues are: 1) The button that is inside our widget is fully accessible in the Editor and sometimes it's confusing that it's settings appear instead of the widget settings. Is it possible to block widget content (buttons, other elements) from modification? 2) Http query from Velo code to our API is not perfect in my opinion. Is there an example of how to make this calls properly? 3) Image (it's url) is required for out button settings, so I wanted to add an image selector as an input to the widget' settings somehow to add an ability for the user to select an image from the media library. But the only way to do so is to add thumbnails element and hardcode an image url there. Is there a way to have a proper media library selector in a Custom panel? Thanks in advance
- Velo (Wix Code)Question: How to Display Average Rating from Wix Comments app, on Dynamic pages Requirement Background: I’m using Wix Comments as a workaround to Wix Reviews, as the latter can only be integrated with Wix Stores & not other listing types like services, properties etc Below is a Wix Comments Widget showing the exact component I need. However I want to show that info elsewhere; on the same page or another, via a text box or ideally a Ratings Display element.  [I’m not a coder but have built many features with online resources. I’ve been trying this for months but hitting walls, if y’all can find the way that would be mean a lot.] Specific requirement & attempts: The main challenge of querying & displaying the average rating was finally achieved & confirmed possible. But it only works for 1 comments widget. This is the working code: // Working code for ***backend web module import { Permissions, webMethod } from "wix-web-module"; import { comments } from "wix-comments.v2"; import { elevate } from "wix-auth"; const COMMENTS_APP_ID = "91c9d6a7-6667-41fb-b0b4-7d3b3ff0b02e" export const getAverageRating = webMethod( Permissions.Anyone, () => { return queryComments() } ); async function queryComments() { const elevatedQueryComments = elevate(comments.queryComments) const { items } = await elevatedQueryComments(COMMENTS_APP_ID).find(); console.log("items", items); const totalRatings = items.reduce((a, b) => a + b.rating, 0); const averageRatings = totalRatings / items.length; return averageRatings; } // Working code for frontend import { getAverageRating } from 'backend/comments.web' $w.onReady(async function () { const averageRating = await getAverageRating(); $w("#textbox").text = `Average Rating: ${averageRating}`; }); ⚠️However, the requirement is not yet solved. Now I'm stuck at the following point; as I need this on dynamic pages, all that's needed, is to show the average rating **based on each dynamic page** (using resource Id?) For a coder this should be a very basic modification of a few lines. **1) How can this bit be modified properly? *2) Also, if you can make a substitution to use a Ratings Display instead of a text box that'd be great❤️ GPT's attempt at modifying the basic working code, doesn't work: // specialized GPT's reply to 'Modify the previous code to query comments based on resourceId by querying resourceId' import { Permissions, webMethod } from "wix-web-module"; import { comments } from "wix-comments.v2"; import { elevate } from "wix-auth"; const COMMENTS_APP_ID = "91c9d6a7-6667-41fb-b0b4-7d3b3ff0b02e"; export const getAverageRating = webMethod( Permissions.Anyone, (resourceId) => { return queryComments(resourceId); } ); async function queryComments(resourceId) { const elevatedQueryComments = elevate(comments.queryComments); // Query comments filtered by resourceId const { items } = await elevatedQueryComments(COMMENTS_APP_ID) .eq("resourceId", resourceId) // Querying based on resourceId .find(); if (!items || items.length === 0) { return { averageRating: 0, totalComments: 0 }; // Handle case when no comments are found } console.log("Filtered Comments:", items); const totalRatings = items.reduce((sum, comment) => sum + (comment.rating || 0), 0); const averageRatings = totalRatings / items.length; return { averageRating: averageRatings, totalComments: items.length }; } **Additional info:** API ref: [Velo Deps Wix Comments V 2 Comments Introduction | Velo](https://dev.wix.com/docs/velo/apis/wix-comments-v2/comments/introduction) All this can be tested on your end. All that's needed is the Wix Comments app with Ratings on. Querying is all done from the API directly, & has no connection to CMS collections. Wix Comments doesn't natively have a 'CMS collection', but only a simple page under apps. When leaving comments, better login & do, rather than entering username which can mess up if not proper
bottom of page