MAssive insert product

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167736

-- HikaShop version -- : latest

Hi All,

i need to insert almost 500 product in the same category, but with different price (also photo and download file).
Is it possible to do a Massive insert? Maybe via database?
How?
Is there a documentation?

Thanks
Andrea

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

  • Posts: 2143
  • Thank you received: 747
10 years 8 months ago #167758

andreasuriani wrote: Is there a documentation?


See here: www.hikashop.com/support/support/documen...hikashop-import.html


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Jerome

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167759

Thanks to sharing it.
But, can i have an exemple fo CSV file, please?

Thanks
Andrea

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

  • Posts: 2143
  • Thank you received: 747
10 years 8 months ago #167760

The easiest way to create a perfect example for your specific case is - logically! - an export of existing products.

Please keep reading the documentation. Also, if you look closely at the forums here, you'll see that there's a section dedicated to this, where you might find more hints and tips: www.hikashop.com/support/support/documen...hikashop-import.html


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: andreasuriani

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167761

I can't find anythings about export product!

How can i do this??

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167762

Sorry, i'm an idiot! :D

I've export it.
i'm trying to make a good csv file.


Thanks for now!

Andrea

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167767

Ok, it works but not at 100%.

The column called "files_name" doesn't works. Hikashop doesn't give me a wrong feedback , but the download name doesn't displayed.

Made i some mistake?

In attachment Csv File.

Andrea

Attachments:
Last edit: 10 years 8 months ago by andreasuriani.

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167778

Hi,
also the "images" it doesn't work. (url is correct)

Can somebody help me?

Andrea

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

  • Posts: 13201
  • Thank you received: 2322
10 years 8 months ago #167851

Hi,

Could you give us a link to your website in order to see how is the product displayed on frontend ?
The csv seems to be correct. Are you sure that you have the desired data at the correct place in FTP ?

For example the folder "folder" present in the "media/com_hikashop/upload" one ? Are the "taste.jpg", "preview.jpg" file existing ?

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167859

Ciao Xavier,
i've solved issue about image, but not about file name.

The cvs is correct, but it seems that Hikashop, not consider string "file_name".

How can i solve it?

Andrea

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

  • Posts: 83732
  • Thank you received: 13547
  • MODERATOR
10 years 8 months ago #167861

Hi,

There is no file_name column for the CSV import. It's files_name
Note also that you'll want to add that fix or it won't work since we didn't do a release yet with the fix :
www.hikashop.com/support/forum/content-c...-working.html#166258

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #167976

Hi,
ok , i'll try to make a correction on php file and i will send u the result.

Andrea

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #168003

Hi Nicolas,
I changed the string to the file "import.php" as you suggested, but it still does not work.
After uploading the file, the file name is the address of the folder.

Can you help me?

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

  • Posts: 83732
  • Thank you received: 13547
  • MODERATOR
10 years 8 months ago #168030

Hi,

And did you change the column name to files_name instead of file_name in your CSV as I also said in my message ? Otherwise, it won't work

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #168087

Yes i did.

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

  • Posts: 83732
  • Thank you received: 13547
  • MODERATOR
10 years 8 months ago #168186

Then I don't know.

Can you provide the CSV file that you're using right now so that we can check it and try to reproduce the problem on our end ?

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #168197

HI nicolas,
in attachment the csv file.

Please, let me know asap, beacuse for this reason the Photostore is closed at he moment! :(


File Attachment:

File Name: UPDATE-PHO...D545.csv
File Size:1 KB

Attachments:

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

  • Posts: 83732
  • Thank you received: 13547
  • MODERATOR
10 years 8 months ago #168213

Hi,

Great, I found the problem.
Change the code:

$array = $this->_separate($product->$name);
			if(count($array) != count($files)) continue;
			$key = 'file_'.$var;
			foreach($files as $k => $file){
				$files[$k]->$key = $array[$k];
			}
to:
$this->_separate($product->$name);
			if(count($product->$name) != count($files)) continue;
			$key = 'file_'.$var;
			foreach($files as $k => $file){
				$files[$k]->$key = $product->{$name}[$k];
			}
in the file administrator/components/com_hikashop/helpers/import.php and that will fix the problem. We'll include the fix in next version of HikaShop.

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

  • Posts: 177
  • Thank you received: 1
10 years 8 months ago #168301

Great Nicolas!

Works perfectly!!

Merci!

And

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

Time to create page: 0.106 seconds
Powered by Kunena Forum