Hello Guy,
I need sam help,
I have add a column to the coupon database, and I named customer_email.
I went when a customer use the coupon I get his email to the new column (that I named : customer_email).
Also I need tosee it on the history a coupon in a new column with customer email.
Please guy, help me;
Thank in advance,
Sam
The customer email address is already stored into the order table which the coupon history table can already fetch based on the related order ID.
For instance, you could run the following query in PHPMyAdmin to see if the order has been completed before using the email address:
This should display all completed orders with your required email addresses. Take note that: oc_ as the table prefix may be different for you in your case depending on which table prefix name you chose to have from the OpenCart installation.
If you want to see the results by languages:
Which the value '1' would be the English version from the default installation of OpenCart. You can even take out this line:
if you want to see the results for all languages related to coupons.
For instance, you could run the following query in PHPMyAdmin to see if the order has been completed before using the email address:
Code: Select all
SELECT o.`email`
FROM `oc_order` o
INNER JOIN `oc_coupon_history` ch ON (ch.`order_id` = o.`order_id`)
WHERE o.`order_status_id` = '5';
If you want to see the results by languages:
Code: Select all
SELECT o.`email`, o.`name` AS `language_name`
FROM `oc_order` o
INNER JOIN `oc_coupon_history` ch ON (ch.`order_id` = o.`order_id`)
INNER JOIN `oc_language` l ON (l.`language_id` = o.`language_id`)
WHERE o.`order_status_id` = '5'
AND o.`language_id` = '1';
Code: Select all
AND o.`language_id` = '1';
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi,
thank's for your interet;
But I only went display in the coupon history in the Admin panel, by adding a colomn before date added column.
And if possible to add a column in the coupon_history database table for the customer email.
Also I can't make the detail in you reponse.
regards
Thank's
Sam
thank's for your interet;
But I only went display in the coupon history in the Admin panel, by adding a colomn before date added column.
And if possible to add a column in the coupon_history database table for the customer email.
Also I can't make the detail in you reponse.
regards
Thank's
Sam
Who is online
Users browsing this forum: No registered users and 1 guest