Advertisement:

Author Topic: XML category import/export problem  (Read 4326 times)

data99

  • Full Member
  • ***
  • Posts: 180
(Solved) - Re: XML category import/export problem
« Reply #15 on: April 23, 2015, 11:49:40 pm »
you said and i did


1.- Enter your source database and click on Export at the top.

2.- On the next page, you need to check "Custom - display all possible options", you'll see a lot of options:

     2a.- Table(s): Select only t_category and t_category_description

     2b.- Format-specific options:

          Disable foreign key checks -> Checked (This to avoid error messages regarding foreign keys constraints.)

          Check "Add DROP TABLE statement"

     2c.- Go and save to disk.

3.- Enter your destination database and click on Import.

I did that i can import only t_category_description but when I imported only t_category  it gave me a error and it got deleted
and I again install the whole website and this time I deleted all category from admin panel and again I imported t_category  again it gave me a error and got deleted :(



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Solved

Thanks to teseo

Steps

1 download the plugin and install it
2 now we need to make changes in the plugins
In xml_import_export_category/functions.php look for all lines containing this segment:

Quote
Code: [Select]
    file=xml_import_export_category/functions.php?func=


and replace it with:

Quote

Code: [Select]
    file=xml_import_export_category/functions.php&func=

That should be all.
plugin will exports resultant XML to /oc-admin/outCategory.xml, not directly to your computer. Download from there to your computer, go to your destination installation Admin Dashboard and Import.

you must make changes to plug-in on both the website
« Last Edit: April 25, 2015, 03:21:16 pm by data99 »

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #16 on: April 24, 2015, 12:07:17 am »
error 1
SQL query:

CREATE TABLE IF NOT EXISTS `oc_t_category` (
  `pk_i_id` int(10) unsigned NOT NULL,
  `fk_i_parent_id` int(10) unsigned DEFAULT NULL,
  `i_expiration_days` int(3) unsigned NOT NULL DEFAULT '0',
  `i_position` int(2) unsigned NOT NULL DEFAULT '0',
  `b_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `b_price_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `s_icon` varchar(250) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=284 DEFAULT CHARSET=utf8;

MySQL said: Documentation
#1005 - Can't create table 'oddclass_oddclas.oc_t_category' (errno: 150) (Details…)


error 2


Storage Engines
InnoDB Documentation

Percona-XtraDB, Supports transactions, row-level locking, and foreign keys

[ Variables | Buffer Pool | InnoDB Status ]


Open new phpMyAdmin window

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: XML category import/export problem
« Reply #17 on: April 24, 2015, 12:23:36 am »
@data99:

That's weird, there are no indexes in your category table, it should be something more like this:

CREATE TABLE IF NOT EXISTS `oc_t_category` (
  `pk_i_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fk_i_parent_id` int(10) unsigned DEFAULT NULL,
  `i_expiration_days` int(3) unsigned NOT NULL DEFAULT '0',
  `i_position` int(2) unsigned NOT NULL DEFAULT '0',
  `b_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `b_price_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `s_icon` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`pk_i_id`),
  KEY `fk_i_parent_id` (`fk_i_parent_id`),
  KEY `i_position` (`i_position`),
  KEY `fk_i_parent_id_2` (`fk_i_parent_id`),
  KEY `i_position_2` (`i_position`),
  KEY `fk_i_parent_id_3` (`fk_i_parent_id`),
  KEY `i_position_3` (`i_position`)

) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=104 ;

Both of you, could you attach here the entire .sql generated by export?

Regards

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #18 on: April 24, 2015, 12:32:03 am »
is there any way to fix the  XML category import/export problem plugin

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: XML category import/export problem
« Reply #19 on: April 24, 2015, 12:51:51 am »
I have no idea, as already told you I don't know that plugin, better ask to its developer.

This procedure I put here it's fully working for me, and that's all I can do with no further information. ???

Regards

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #20 on: April 24, 2015, 01:54:36 am »
I will do it manually

is there any way add 100 NEW CATEGORY, EDIT ME! at one so I can edit and rename them

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: XML category import/export problem
« Reply #21 on: April 24, 2015, 09:14:24 pm »
Today I was taking a look at that plugin. It's a bit old and somewhat unpolished, but I managed to get it working doing this modification:

In xml_import_export_category/functions.php look for all lines containing this segment:

Quote
file=xml_import_export_category/functions.php?func=

and replace it with:

Quote
file=xml_import_export_category/functions.php&func=

That should be all. The rest is just a bit hard because the plugin exports resultant XML to /oc-admin/outCategory.xml, not directly to your computer. Download from there to your computer, go to your destination installation Admin Dashboard and Import.

Please tell me if this is working for you so I could post in the official thread of the plugin.

Regards

ashish1241

  • Jr. Member
  • **
  • Posts: 59
Re: XML category import/export problem
« Reply #22 on: April 24, 2015, 10:43:35 pm »
Hey the export worked fine, I have the xml file, but the import did not.
1 point to mention here, I checked "Deleting all category before import." which did work.

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #23 on: April 25, 2015, 03:50:47 am »
ashish1241 is correct the I can only export but I cant import

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #24 on: April 25, 2015, 03:54:06 am »
Solved it works now Thanks

ashish1241

  • Jr. Member
  • **
  • Posts: 59
Re: XML category import/export problem
« Reply #25 on: April 25, 2015, 08:24:24 am »
Hey data99,
Please share how did you solve it?

data99

  • Full Member
  • ***
  • Posts: 180
Re: XML category import/export problem
« Reply #26 on: April 25, 2015, 03:22:53 pm »
Solved

Thanks to teseo

Steps

1 download the plugin and install it
2 now we need to make changes in the plugins
In xml_import_export_category/functions.php look for all lines containing this segment:

Quote
Code: [Select]

    file=xml_import_export_category/functions.php?func=




and replace it with:

Quote

Code: [Select]

    file=xml_import_export_category/functions.php&func=



That should be all.
plugin will exports resultant XML to /oc-admin/outCategory.xml, not directly to your computer. Download from there to your computer, go to your destination installation Admin Dashboard and Import.

you must make changes to plug-in on both the website

ashish1241

  • Jr. Member
  • **
  • Posts: 59
Re: XML category import/export problem
« Reply #27 on: April 25, 2015, 07:28:28 pm »
I missed on this step...

You must make changes to plug-in on both the website

Please mark this as resolved

I have attached the corrected .zip file for anyone who needs it