Hello,
can you help me by displaying a repeat number of a user with the same name and phone number?
Example: if user Ivan Ivanov with number +359998877, has three requests in the system, then next to his name in the list:
Ivan Ivanov (3)
Repetition counter in the database for the same name and phone number ...
You could do this with a mysql query in your database (assuming you are using mysql) Once you have designed the query and have it reporting what you want, you could in theory add it to your dashboard, but that is a bit more complicated...
A basic query that would give you contact info for people who have ordered multiple times is
A basic query that would give you contact info for people who have ordered multiple times is
Code: Select all
SELECT firstname, lastname, telephone, COUNT( telephone ) AS x
FROM `oc_order`
WHERE order_status_id >5
Group by telephone
HAVING x > 1
ORDER BY `x` DESC
Typically I would create this as a separate password protected file and put a link to it in my opencart dashboard (rather than change a page in opencart that I the have to change again each time I upgrade). Read https://www.w3schools.com/php/php_mysql_select.asp to see how to create a connection to your database and select the data to show it on your page. The query I created could be used instead of their basic select query.
Sandra
Sandra
Who is online
Users browsing this forum: No registered users and 21 guests