import variant help please

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #61587

I cannot get an import of variants to work...

I created a test product, then a Characteristic with a couple of variants, and assigned this to the product.

After saving all this, I did an export and attempted to add several additional variants following what the export showed.

When I imported this, here is what showed....



Here is the file I imported...

File Attachment:

File Name: hikashopexport.csv
File Size:2 KB


What am I doing wrong, please!?!

Thanks

Attachments:
Last edit: 12 years 2 months ago by plumbingdeals.

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

  • Posts: 12953
  • Thank you received: 1778
12 years 2 months ago #61689

Hello,

I fixed some parts of your CSV, but make sure that you realy have the white and gold values into your finish caracteristc.

Attachments:

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

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #61707

I tried your corrected file, and got the same result

I insured that white and gold were in the characteristic

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #61727

Which version of Hikashop are you using ?

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

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #61733

1.5.8 Business

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #61896

I don't find any foreach on my end on line 1123 on 1.5.8 of that file where the message comes from.
Could you give the text that you have on that line ?

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

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #61926

lines 1121-1129...

}elseif(isset($product->$type)){
$ids[] = (int)$product->product_id;
foreach($product->$type as $k => $id){
if(!empty($id)){
$id = $this->_getRelated($id);
$product->{$type}[$k] = $id;
$value = array((int)$id,$this->db->Quote($type),$product->product_id);
$values[] = implode(',',$value);
$totalValid++;

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62039

That's because of the line:
}elseif(isset($product->$type)){
which is now:
}elseif(isset($product->$type)&&is_array($product->$type)){
in the latest version of Hikashop.
If you change that these errors won't happen.

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

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #62263

yes, that seems to have solved it...

however I wonder, as we have updated regularly, while this file was not updated, even in our live store which is also using 1.5.8?

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62376

Because we did that change for 1.5.9.

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

  • Posts: 223
  • Thank you received: 1
12 years 2 months ago #62386

can 1.5.9 now be safely installed?

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62477

You should wait for the 1.6.0 release that we plan on doing tomorrow.

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

  • Posts: 256
  • Thank you received: 21
12 years 2 months ago #62503

Jumping in here, but from the above it looks like you have to create a variants characteristics in Hikashop before you can import your products - Is my understanding correct?

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62669

That's correct.

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

Time to create page: 0.106 seconds
Powered by Kunena Forum