Hi David,
Hope all is well.
#1) Was wondering if it would be possible to have a message on admin/index.php that there are vouchers to be approved from the voucher_feeds_list.php "Add" button?
#2) Is there a way to prevent duplicate vouchers?
Thanks in advance.
Bob L.
Bob L.
Thank you David for the great support & great PT program.
Hello Bob,
Re 1;
I'll have a think about this further since the process of establishing whether there are new voucher codes to be added / approved from the registered feeds is a several step process - further complicated by the fact that several codes - ones that cannot be codified into their product / discount applicability - may not be in use.
Re 2;
Sure - a UNIQUE index could be created on pt_vouchers against (merchant,code) to prevent duplicates. The following dbmod.php script will apply this (run from top level). I have enabled database debug mode within the script as in order to create the index the table would need to be duplicate free so if any do exist these would need to be deleted manually.
<?php
set_time_limit(0);
require("includes/common.php");
$config_databaseDebugMode = TRUE;
$sql = "CREATE UNIQUE INDEX dupe_filter ON `".$config_databaseTablePrefix."vouchers` (merchant,code)";
database_queryModify($sql,$result);
print "Done.";
?>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com