import variant help please

  • Posts: 223
  • Thank you received: 1
13 years 8 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...

This attachment is hidden for guests.
Please log in or register to see it.


What am I doing wrong, please!?!

Thanks

Attachments:
Last edit: 13 years 8 months ago by plumbingdeals.

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

  • Posts: 12953
  • Thank you received: 1778
13 years 8 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.

This message has an attachment file.
Please log in or register to see it.

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

  • Posts: 223
  • Thank you received: 1
13 years 8 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: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 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
13 years 8 months ago #61733

1.5.8 Business

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

  • Posts: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 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
13 years 8 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: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 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
13 years 8 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: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 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
13 years 8 months ago #62386

can 1.5.9 now be safely installed?

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

  • Posts: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 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: 259
  • Thank you received: 22
13 years 8 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: 85584
  • Thank you received: 14008
  • MODERATOR
13 years 8 months ago #62669

That's correct.

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

Time to create page: 0.462 seconds
Powered by Kunena Forum