Transfering products from one site to another problems

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
5 years 2 months ago #303140

-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.2

Hi,

I currently have our active website with some 130 produce and am currently working on a fresh replacement site which now has some 150 products. I am trying to transfer some of the products from the old site to the new but I am running into issues.

If i select the products i want to transfer i on the old site and export it works fine, but the issue comes on the import. when i import the CSV into the new site it overwrites some of the existing products in the new site. I am assuming this is because the ID's are the same. also although the categories are the same they were inputted manually on the new site so the ID's again don't match and importing the CSV adds a load of erroneous categories which I don't want to happen

However I have very little experience of CSV files and when I alter the id's in the file so they no longer clash it no longer imports without a lot of errors, see attached. With this CSV the products don't come over at all but the categories has been messed up as shown in capture2

Can you give me any advice on how to get the products from one site to another without wrecking the structure of the new site.

Thanks in advance for your help

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
5 years 2 months ago #303160

Hi,

After you do the expor,t you want to:
- open the CSV with Excel, or even better, libreoffice calc.
- remove the product_id column
- remove the lines to generate the category tree at the beginning to only keep the first line with the column names and the product lines.
Normally, the categories are linked by their names not their ids so even if the ids are different, if the names are the same, the import system should be able to attach the products to the corresponding categories on the new website.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
5 years 2 months ago #303164

Hi Nicolas and thankyou for the reply.

By remove the product id column do you mean just delete the number so say in the CSV delete the value so instead of saying 347;0;....... it says ;0;.....

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
5 years 2 months ago #303187

Just ran into another issue. I have just upgraded one of the sites to 4.0.2 and now get the following error when you click export for products

Recoverable fatal error: Object of class stdClass could not be converted to string in /administrator/components/com_hikashop/helpers/spreadsheet.php on line 179

I have tested it on another install and it does the same thing

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
5 years 2 months ago #303246

Hi,

1. No, I mean removing the whole column. So instead of 347;0;....... it would be 0;.....
notice that the ; was removed to remove the column. Note that you also need to do that for the first line where you have the titles.
Note also that it is a whole lot easier to do via a spreadsheet application like excel or calc as you can just right click on the column and click on the delete row choice to remove the column in one fell swoop.

2. Thank you for your feedback on that error. We've added a patch for it. Please download again the install package on our website and install it again on yours to get the patch.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
5 years 2 months ago #303255

Hi,

after my last message I realised that excel was screwing up the file as I was only seeing one column with all the 347;0; in it. I changed to libreoffice with a fresh export and all is well. I have now transferred the products i needed.

Thanks for the quick fix on the error but I have just installed the new version and still get an error
Recoverable fatal error: Object of class stdClass could not be converted to string in /administrator/components/com_hikashop/helpers/spreadsheet.php on line 148

this is after clearing all the cache etc.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
5 years 2 months ago #303256

incidentally reverting to 4.0.1 and the error is gone and all works with the export

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
5 years 2 months ago #303294

HI,

I investigated further and while I wasn't able to reproduce that error thanks to the patch, I was able to reproduce a similar error on another line of code. I suppose you must have mistaken one error for the other.
Anyways, I've added a patch for the other error I found. Please try again with the new install package available on our website.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum