WHY Please select the corresponding columns?

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228630

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8

I'm advancing fast in creating an export - import system between two cloned sites.

Both sites have the exact same categories, products, custom fields, everything as they come from the same master site.

Then, when I make an import in site B from a mass Action Export from site A I get this dialog box ONLY WHEN I pick the file from a 'Specify location path'. If the file is manually uploaded this is not happening.




Why is this? How to avoid it?

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #228675

Hi,

Indeed the "upload file" option doesn't display the "verify the file" button, but we have to improve that part, once uploaded we should save and refresh the whole mass action to display the "Specify file location" option with the new path of the uploaded file in order to allow to directly verify the file.

It is displaying these options because when exporting we export all the possible values, but for the import there is not so much data which is handled. So you have to remove some of these fields like:
x_id > generated automatically, it avoid duplicated issues
x_name > automatically generated based on the file path
etc.

You have to keep x_path which is the main information and select "images" as correspondance. Some of the other data are lost, we have to increase the export/import compatibility.

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228691

Hi Xavier,

thanks for your detailed explanation, your answers are also so clear and useful!

Look, would this "Please select the conrresponding columns" setup right to avoid conflicts?


Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #228761

Hi,

Only "files_path" and "images_path" can be used for now.

But I just improved the system, it has not been tested yet but if you want to be a "beta tester" it could be great.
The made development should allow to update all the files and images fields from csv file exported via the mass actions.

To test that, you have to replace the file "administrator/components/com_hikashop/classes/massaction.php" by this file:

File Attachment:

File Name: massaction...2-03.zip
File Size:17 KB


And install this new version of the product mass action plugin:

File Attachment:

File Name: plg_hikash...2-03.zip
File Size:9 KB

Attachments:
Last edit: 8 years 2 months ago by Xavier.

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228803

Great! You found the right betatester :-D

I will do my best to report you early tomorrow.

Best regards

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228811

Xavier,

I made the updates described in the last post.

Test 1:

I tested with an existing product form Source site. Deleted 4 images. Exported to CSV with all tables and fields active insde the Actions -> Export to CSV file.

Imported CSV to target site.

All changes in text fiels work. Images get unchanged in the target site. The four images deleted in source site remain untouched in target site.



Test 2 (applied to the same product of test 1):

Added an image uploaded from my desktop. Exported CSV

Imported CSV to target site.

The new image shows up in the images section, as a Default thumbnail for non existing images which I understand because I haven't created a system yet to transfer images between sites.

But at least the system knows a new image should be there.



–––––

So looks like some interesting improvement has happened.

The export / import system is still not aknowledging deleted images. But aknowledges added images.

By checking the exported CSV I can confirm that teh export has aknowledged the real images for the product. So is the import function that is only adding new images but not updating the removed ones.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #228842

Hi,

Yes indeed the added code allow to add new images or update existing ones and still present in the csv.
But it does not handle the suppression of the images if they are not in the csv.

This seems to be a mess, what could be done is delete all the images of the product in first time, and then add them from the csv.

Please test these versions:

File Attachment:

File Name: massaction...2-04.zip
File Size:17 KB

File Attachment:

File Name: plg_hikash...2-04.zip
File Size:17 KB

Attachments:
Last edit: 8 years 2 months ago by Xavier.

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228904

Hi Xavier,

About the image suppression maybe in a future (for me is not a must now) some checkbox like "preserve only coincidental images) would be a good feature in which only those images that match the actual product and the one being imported from CSV are preserved, the others deleted. and the new ones in CSV are added.

I tested the new files, they work but I noticed no change. Please can you tell me what should I check for?

And as you are dealing with this massaction files and plugin...

maybe you have an explanation on why new productes non existing in the import side don't get created from the CSV.

If you could give hint on this or just fix if its a 'bug' this would save my life in front of my client. I am experiencing a hard time because I cannot add new products.

I did put specific information in this post:

www.hikashop.com/forum/content-creation/...-matched.html#228838

Big thank you for your friendly nice support.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #228907

Hi,

The new versions should handle the files and images deletion ;)

Regarding the other issue, You've got an answer :)

The following user(s) said Thank You: PeterChain

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #228963

Hi Xavier, thanks for your kind answer.


Sorry for repeating my own words in this post form another one.

Tried last files from some 12 hours ago. Experienced no difference. I think is because this two attachments offer exactly the same file although I think they were expected to be different versions.


–––––––––––––––––––––––––––––––––– Thursday afternoon post –––––––––––––––––––––––––––––
File Attachment:

File Name: massaction_2016-02-04.zip
File Size: 17 KB
–––––––––––––––––––––––––––––––––– Thursday afternoon post –––––––––––––––––––––––––––––

–––––––––––––––––––––––––––––––––– Thursday evening post –––––––––––––––––––––––––––––
File Attachment:

File Name: massaction_2016-02-04-2.zip
File Size: 17 KB
–––––––––––––––––––––––––––––––––– Thursday evening post –––––––––––––––––––––––––––––

So looks like the file posted in the evening might not be offering the new code as compared to the former one are identical.


I will be kindly waiting for an update to test as soon as I recieve it.

Regards.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #228970

Hi,

I just checked and the two files does not have the same content, you have to use the "massaction_2016-02-04-2.zip" one.

I have done local tests with a simple csv file and the images are all deleted before adding the ones from the csv file, so that should solve this issue. Could you provide a csv file, that way I will be able to test on my local ?

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #229060

Hi Xavier,

My original product in Source Site had 8 pictures as iti did the same product in the Target site.

I removed 5 pictures form Source site. Added 1.

After importing in my Target Site the 8 pictures remain plus the one added.

I checked and rechecked that your last posted plugin and the massaction.php file are updated in both sites.

These are experimental sites so you are allowed to enter and touch and test everything. Access is in the PDF sent you yesterday (sorry if you are already aware).

Attached is the export file.

UPDATE:
I still don't see the check box to activate creation of new files so to me is like the last updates are not taking effect for some reason. But can't say. Cleaned caches, tries with different browsers. Don't know what else to invent.

Also tried in a fresh joomla / hikashop install in local, with no one single customization.

Attachments:
Last edit: 8 years 2 months ago by PeterChain.

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

  • Posts: 634
  • Thank you received: 16
8 years 2 months ago #229064

I am replacing all the time the file massaction.php in this folder as advised in your first post:

To test that, you have to replace the file "administrator/components/com_hikashop/classes/massaction.php" by this file:

is this right?

now I see that controllers folder has a file with the same name.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 2 months ago #229211

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

Time to create page: 0.102 seconds
Powered by Kunena Forum