An importing problem - product codes and variants

  • Posts: 6
  • Thank you received: 1
11 years 1 month ago #122793

Hello,
Can you please explain what is the relation betwen following table fields?
- product_parent_id vs. product code
Do I understand correnctly the variant takes the product_code of "main" to become variant´s product_parent_id?
Let´s say, product_parent_id of "main" product is its category ID.
Product_parent_id of "variant" is its "main´s" product_code. Correct?
Another question is: Do I have to use the table hikashop_characteristic at all?

I have about 22000 line items. About 85% of that number are variants which are rather difficult to be categorized into characteristics.
I would wish to obey to use characteristics and instead, just to have MAIN product and link to selection of variants. Price is the same. What differs are size patterns and color patterns. They create too large number of variations.

Thank you very much for the job you have done so far on Hikashop.

Ondrej

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

  • Posts: 2334
  • Thank you received: 403
11 years 1 month ago #122825

Hi Ondrej,

I think you didn't completely understood our table, let me make it clear :)
The product_code is simply the real product code, the one used in Hikashop and is not related to the variants. However, the product_id of a main product indeed match the product_parent_id of the variant.
The table hikashop_characteristic is useful if you plan to import your characteristics (which is obligatory if you have variants). Without the characteristics, Hikashop won't be able to generate the variants. So you can either recreate them before importing or copy the table in your new installation.

You can also take a look at the Hikashop SQL structure if you want to know more about the relations between tables: www.hikashop.com/hikashop_database.png

The following user(s) said Thank You: ondrejhajnik

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

  • Posts: 6
  • Thank you received: 1
11 years 1 month ago #123112

Hi Eliot,
Thank you very much for your clear explanation. I understand now the parent code is equal to product code of "main". The "variant" have always the parent code linked to "main" product code in the sequense of adding the suffix to product code of main.
Also, thank you for the SQL DB structure. This will help me a lot.
Kind regards,
Ondrej

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

  • Posts: 6
  • Thank you received: 1
11 years 1 month ago #123114

Hi Eliot,
I have one more question.
Do you think not having the variants in the database but having the variant in the product table could block product listing module from displaying the products in the front end? Till now I can only display empty categories with no link futher to products listed.

Attachments:

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 1 month ago #123172

Hi,

I do not understand your message.
Not having variants in the database but having the variants in the product table ?

For your category listing, do you have a product listing module attached like explained in our tutorial ?
www.hikashop.com/support/documentation/6...html#categories_menu

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 6
  • Thank you received: 1
11 years 1 month ago #123673

Hi Jerome,
I guess I found the cause of the problem.
The module is there, of course.
The problem is somewhere with hikashop_categories table. When I look at the back end products I can see the product to be inside category. However the category is not linked to Product category.

In other words, at back end page of product I see only CATEGORY.

I am sure I have not linked properly the categories to ROOT/Product Category/"some category".

Please see the attached pics.

Ondrej

Just to add. Please note I need to upload the categories through sql. Therefore I cannot go through back end and add category, but insert the data into the tables.

Also for products display.
Products get displayed only after I go to product page on back end and clink on save button. There are no changes in the hikashop_product or hikashop_product_category tables.
Is there any script what I could run to go through all the products and make them registered with the system?

Attachments:
Last edit: 11 years 1 month ago by ondrejhajnik. Reason: adding details

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 1 month ago #123824

Hi,

For what I see the product is right link to a category, with the id 12
But this category does not have a parent category, so there is no "breadcrumb" displayed.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 6
  • Thank you received: 1
11 years 1 month ago #123881

Hi Jerome,
thank you very much for your answer.
I am sure I am missing something during data upload to the tables.
When I add category of product via back end everything works just fine.
When I upload the products via sql query, I do not get them displayed on the front end untill I approach them via back end and click on save button on product page (yes, products are displayed only on back end after sql upload).

The tables I use for upload are:
hikashop_category
hikashop_product
hikashop_product_category
hikashop_file (for image files)

Do I miss any table which I should also alter for proper product display on front end?

Thank you,

Ondrej

Hi Jerome,
I found the reason of above behaviour.
For proper products listing on front end it is vital to have also the columns "product_created" and "product_modified" load with data. Otherwise the product is only accessible (visible) on back end but not front - end.
I believe the same reason applies for categories in breadcrumb.

Thank you once again for your help,

Ondrej

Last edit: 11 years 1 month ago by ondrejhajnik. Reason: explanation
The following user(s) said Thank You: Xavier

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

Time to create page: 0.089 seconds
Powered by Kunena Forum