- Posts: 10
- Thank you received: 0
Product & category import in xml format
I have to add functionality of importing product & categories in xml format in hika shop.
I have done with layouts & all. but in code when I select xml file & echo it itis giving me blank file & give warning for selecting a file & process stops there.
Can anyone help me???? It's quite urgent task for me.
Please Log in or Create an account to join the conversation.
We would need to know what exact modifications you have done to be able to help you.
Please Log in or Create an account to join the conversation.
Now I just want to insert those rows in db.
Please Log in or Create an account to join the conversation.
You can see the structure of the table #__hikashop_product to see how it's managed.
The entries are simple, the only thing is if the products have variants, so you have to put the main product in the table, get its id, and use it for the variants as the product_parent_id.
You will have too to fill the table #__hikashop_product_category, it's only a correspondence table, you just have to set the product_id and the category _id to create a relation.
Please Log in or Create an account to join the conversation.
Can you pl tell me in which tables I have to made entries in order to insert new variant of any product.
Variants are fixed that it will be either size or color.
Pl. reply ASAP. It's very urgent for me.
Please Log in or Create an account to join the conversation.
I have done for category xml import but in that I have to import category images also.So can anyone tell me where can I insert images for category...
Please Log in or Create an account to join the conversation.
=> hikashop_characteristic
=> hikashop_variant
=> hikashop_product
db shows the variant entry but I am not getting variant in product display.
So, help me to show variants in product display.
Please Log in or Create an account to join the conversation.
It means that you're missing some entries in these tables.
You need :
one entry for the characteristic in the hikashop_characteristic table
one entry for each value of the characteristic in the hikashop_characteristic table with their characteristic_parent_id pointing to the characteristic_id of the characteristic entry.
one entry in the hikashop_product table for the main product
one entry for each variant of the product in the hikashop_product table with their product_parent_id pointing to the product_id of the main product entry.
one entry linking the characteristic with the main product in the hikashop_variant table
one entry linking the default value of the characteristic with the main product in the hikashop_variant table
one entry linking each value of the characteristic with its corresponding variant in the hikashop_variant table
Please Log in or Create an account to join the conversation.
I have done all the entries those you explain but still I am not getting variants in product display.
Here I have attached screenshots for all related tables with main product & variant entries. Just check it & tell me where i am missing the thing. product #1001 is main product & product #1000482 is variant for main product #1001.
@ Admin panel on product view it is showing the variant with its value(Showing proper variant of main product) but
@ front on product view it is showing Color "No values found".
Please Log in or Create an account to join the conversation.
Can anyone tell me where images for categories & products are stored?(in which table?)
Please Log in or Create an account to join the conversation.
In the screenshot www.hikashop.com/media/kunena/attachments/32517/h702fbec.png you're missing a link between the characteristic value "colorato" and the variant of your product with the id 1000482
The images are stored in the hikahsop_file table with the file_ref_id being the id of the product/category. Make sure that the file_type is set to the correct type as the table also stores product files.
Please Log in or Create an account to join the conversation.
Thanks for your help. It works for me.
Now I have to import images for variants. Different image for different color.
I have two variants Color & Size.
For each color (regardless the “size”) a Product-Variation-Image can be available.
I am not getting hoe to do it. Can you anyone tell me how can I do it?
Please Log in or Create an account to join the conversation.
Variants are the combination of all the possible values of each characteristic.
Si if you have 3 values (red blue green) for the first characteristic and 2 values (big small) for the second, that will give you 6 variants that you can edit via the button "manage variants" of your product.
And thus, in the 2 variants for red, you want your red image, in the 2 variants for blue, you want your blue image and in the 2 variants for green, you want your green image.
So in the hikashop_file table, with that example, you would need 6 entries, one for each variant.
Please Log in or Create an account to join the conversation.