You are here:  » Products are not imported


Products are not imported

Submitted by IG on Thu, 2016-04-28 13:02 in

Hi David

I am having a fairly urgent problem. I installed the lastest version and setup everything has desired.. Now I took the website live at {link saved}, but I am not able to import any products. The feeds are all imported, but I cant import the products.

I realised that when I use the database tool to backup the tables on my local installation, the extra ean field that I created is not picked up (according to some other postings in the forum extra fields should be picked up automatically). Might this be the problem?

Any quick advice is highly appreciated.

Kind regards,
IG

Submitted by support on Thu, 2016-04-28 13:20

Hi,

The most likely reason for products not importing in this scenario is that the custom fields have not yet been created on the new database. Custom fields would ordinarily be added by modifying config.advanced.php and then running the dbmod.php script individually for a new custom field from this thread. However to save time, the following dbmodall.php script will run the queries to create the new fields for all custom fields specified in config.advanced.php:

<?php
  
require("includes/common.php");
  
$config_databaseDebugMode FALSE;
  
$ignore = array("name","description","image_url","buy_url","price","category","brand");
  foreach(
$config_fieldSet as $field => $v)
  {
    if (
in_array($field,$ignore)) continue;
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."feeds`
              ADD `field_"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
              ADD `"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
  }
  print 
"Done.";
?>

Regarding the custom field EAN not exporting from your old installation, this has been included since 12/10B however I know you have been using the script for several years so for earlier distributions, modify admin/database.php as follows - look for the following code beginning at line 25:

  $fields["feeds"][] = "field_name";
  $fields["feeds"][] = "field_description";
  $fields["feeds"][] = "field_image_url";
  $fields["feeds"][] = "field_buy_url";
  $fields["feeds"][] = "field_price";
  $fields["feeds"][] = "field_category";

...and REPLACE with:

  foreach($config_fieldSet as $field => $v)
  {
    $fields["feeds"][] = "field_".$field;
  }

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by IG on Thu, 2016-04-28 13:47

Hi David

I have backed up the local database structure (without data) and successfully restored this structure (without data) on my live server. The database structure should be absolutely identical.

Then I restored on the live server with the database tool the tables that I previously backed up with the database tool from my local database. I successfully re-imported all feeds. However, I still can't import any products.

Please have a look yourself using admin pw: {code saved}

Thanks and best regards,
IG

Submitted by support on Thu, 2016-04-28 13:55

Hi,

Just in case I don't have your latest email please could you email me a link to the site and also attached config.advanced.php and I'll check it out further with you...

Thanks,
David.
--
PriceTapestry.com