[solved] children products from VM1, how to import

  • Posts: 3
  • Thank you received: 1
10 years 8 months ago #148947

-- HikaShop version -- : HikaShop Business 2.3.0
-- Joomla version -- : 3.2.2
-- PHP version -- : 5.4 / 5.3

Hi guys!
import from DB tables ( VM 1.1.8 ).

in the #__hikashop_product table I have all children product from VM, but I can not view or edit them.
If I add a 'charateristic' in the father product I can view as charateristics all children, but only in back office.
If I try to edit a child, a new product is created on save.

what have I to do with these children? I can recover them or I have to create again all 300+ children?

thank you,
marco

Last edit: 10 years 8 months ago by mmleoni.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 8 months ago #148950

Hi,

The import system from VM doesn't support child products.
You'll have to create again the variants/characteristics via the interface as explained here:
www.hikashop.com/support/support/documen...html#characteristics

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

  • Posts: 3
  • Thank you received: 1
10 years 8 months ago #149054

Hi nicolas,
thank you for your reply.

I read in other post that children are not imported, but children have been imported!

They are not usable, but they are all present in the table '#__hikashop_product' (they reference to the father by the product_parent_id field and a suffix has been added to product_code.).

When I try to add a charateristic (I have already read the documentation and the link you posted) and I click on 'manage variants', all the imported children appear.
As said, they are not visible in front end and they are not editable.

My question is: what should I do with these little children? Can I save them, or have I to act like Herod? :evil: (delete from #__hikashop_product where product_parent_id != 0)

note: I'm not asking if I can import children product, I would like to know what I have to do with imported ones.

ciao,
marco
---
edit: syntax error!

Last edit: 10 years 8 months ago by mmleoni.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 8 months ago #149097

You can delete them.
child products require more than just an entry in the hikashop_product table. They also need:
first, a characteristic with its values in the hikashop_characteristic table
then, for each characteristic of the product, a link between the product and the characteristic and a link between the product and the default value of the characteristic in the hikashop_variant table
and also, for each variant, a link between the variant in the hikashop_product table and its corresponding value for each characteristic in the table hikashop_variant.

It will be either to delete them and create all the links manually via the interface than doing it via phpmyadmin.

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

  • Posts: 3
  • Thank you received: 1
10 years 8 months ago #149201

ok, thanks nicolas.
You confirmed my analysis about tables involved into the operation.


In the attachment a '70 lines script' to transform imported orphans into active hikashop variants...
Too many children to do the work by hand! :P

Source is comment, read it carefully. this script solved my situation, but there is no warranty it will be useful to you too.
back db, put script into the root of joomla site and run it.

now I have, also, to write code for virtuemart variant....

have a nice day,
marco

Attachments:
The following user(s) said Thank You: nicolas

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

Time to create page: 0.064 seconds
Powered by Kunena Forum