You are here:  » voucerfeed dont list


voucerfeed dont list

Submitted by Mrmaxi99 on Sat, 2014-02-15 14:44 in

Hi David,
i tried to import voucer feed ... it seems all well, autodetect works well, all field match in the sample data, but when i click reg and list, the feed don't compare ...
what can i do??
Best.
Massimo

Submitted by support on Sat, 2014-02-15 15:58

Hello Massimo,

Please could you let me know the URL of your installation and the filename of the voucher codes feed you are trying to register (I'll remove the details before publishing your reply) and I will download it from your /voucherfeeds/ folder to my test server and check it out for you!

Thanks,
David.
--
PriceTapestry.com

Submitted by Mrmaxi99 on Sat, 2014-02-15 17:07

ok ...

{link saved}

the file name is {code saved}

i made it myself ...

Submitted by support on Sat, 2014-02-15 18:13

Thanks Massimo,

I downloaded the feed to my test server, created a merchant with the same name as the "ProgramName" in your feed, and the Voucher Code process worked OK all the way through to listing the codes where you can click to "Add" them to the system.

I noticed that the Program Name field doesn't auto-detect. In your feed, it is "ProgramName" which isn't in the auto-detect list, so this needs to be selected manually before clicking Next on Voucher Codes Register Step 2.

That might be all it is, so for your feed the mapping is as follows:

Merchant Name: ProgramName
Voucher Code: code
Valid From: start_date
Valid To: end_date
Description: description

If that does the trick - you can make it auto-detect the Merchant Name field by editing your config.advanced.php file. Look for the following code beginning at line 67:

  $config_voucherCodesCommonFields["merchant"] =
    array("merchant","program_name");

...and REPLACE with:

  $config_voucherCodesCommonFields["merchant"] =
    array("merchant","program_name","ProgramName");

(or of course you could change your field and use merchant or program_name instead - it's up to you!)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Mrmaxi99 on Sat, 2014-02-15 20:15

nothing ... i renamed the field in the db ... but dont list

Submitted by support on Sun, 2014-02-16 09:24

Hello Massimo,

I checked on your site and it looks like there may be a problem with the `voucherfeeds` table. If you could create the following script, save as, for example dbrepair.php in the top level (home page) of your site:

<?php
  
require("includes/common.php");
  
header("Content-Type: text/plain");
  
$table "voucherfeeds";
  
$sql "DROP TABLE IF EXISTS `".$config_databaseTablePrefix.$table."`";
  
database_queryModify($sql,$result);
  
$sql str_replace(array("\n","\r")," ",file_get_contents("setup.sql"));
  
preg_match("/CREATE TABLE ".$table."(.*)MyISAM/",$sql,$matches);
  
$sql str_replace($table,$config_databaseTablePrefix.$table,$matches[0]);
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

...and then browse to dbrepair.php once, this will drop (if exists) and recreate the `voucherfeeds` table on your database.

Then try registering your feed again, and that should do the trick (and then delete dbrepair.php!)

If problems persist however, please could you enabled database debug mode by changing line 6 in config.advanced.php as follows:

  $config_databaseDebugMode = TRUE;

...and then try registering your voucher feed again, and let me know the database error information that is displayed which should point to the problem...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Mrmaxi99 on Sun, 2014-02-16 12:01

Perfect ... problem solved, now works fine ...
Many thanks for your help at sunday morning!!
Best.
Massimo

Submitted by Mrmaxi99 on Sun, 2014-02-16 12:54

Sorry ... now the voucer are listed but i cant add them ...

Submitted by support on Mon, 2014-02-17 11:38

Hi Massimo,

That may indicate a similar problem with the `vouchers` table - please run the same process with the following version of dbrepair.php and that should do the trick:

<?php
  
require("includes/common.php");
  
header("Content-Type: text/plain");
  
$table "vouchers";
  
$sql "DROP TABLE IF EXISTS `".$config_databaseTablePrefix.$table."`";
  
database_queryModify($sql,$result);
  
$sql str_replace(array("\n","\r")," ",file_get_contents("setup.sql"));
  
preg_match("/CREATE TABLE ".$table."(.*)MyISAM/",$sql,$matches);
  
$sql str_replace($table,$config_databaseTablePrefix.$table,$matches[0]);
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Cheers,
David.
--
PriceTapestry.com

Submitted by Mrmaxi99 on Mon, 2014-02-17 18:23

I did the dbrepair but the sistem dont add the voucer anymore ...

Submitted by support on Mon, 2014-02-17 21:08

Hello Massimo,

It sounds like something may have gone wrong in a previous upgrade or patch applied to your site - I'd like to check this out on your server if that's OK - I know you've been a user for some time so incase your email address is not up to date, please could you email me a link to your installation and any password required for /admin/ and I'll check out your site online and follow up by email for you...

Thanks,
David.
--
PriceTapestry.com