[Skip to main content](#vessel-content)

#   Set variants default value with import

##

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

8 years 4 months ago [\#294544](#294544) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Set variants default value with import](/forum/37-import-export-csv-xls/895095-set-variants-default-value-with-import#294544 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  Hello,  I import data with json string and i need to set a default variant in that import. How can i do that?  Thank you")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0

Hello,

I import data with json string and i need to set a default variant in that import.
How can i do that?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTUwOTUtc2V0LXZhcmlhbnRzLWRlZmF1bHQtdmFsdWUtd2l0aC1pbXBvcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86578
- Thank you received: 14321
-
-

8 years 4 months ago [\#294551](#294551) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Set variants default value with import](/forum/37-import-export-csv-xls/895095-set-variants-default-value-with-import#294551 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  Hello,  I import data with json string and i need to set a default variant in that import. How can i do that?  Thank you")*

Hi,

I don't understand what you mean ? There is no json import in HikaShop.
What is the precise format of the file you're importing ?
Could you provide a copy of the file so that we can see where you are with the import ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTUwOTUtc2V0LXZhcmlhbnRzLWRlZmF1bHQtdmFsdWUtd2l0aC1pbXBvcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

8 years 4 months ago [\#294597](#294597) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Set variants default value with import](/forum/37-import-export-csv-xls/895095-set-variants-default-value-with-import#294597 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  Hello,  I import data with json string and i need to set a default variant in that import. How can i do that?  Thank you")*

Hello,

I have created my own import system in php that works fine except that the default variant is not set.
I create the main product, then I create the variants but I can't find the difference of default variant to set it via SQL.
I receive the data via json string.

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTUwOTUtc2V0LXZhcmlhbnRzLWRlZmF1bHQtdmFsdWUtd2l0aC1pbXBvcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86578
- Thank you received: 14321
-
-

8 years 4 months ago [\#294608](#294608) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Set variants default value with import](/forum/37-import-export-csv-xls/895095-set-variants-default-value-with-import#294608 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  Hello,  I import data with json string and i need to set a default variant in that import. How can i do that?  Thank you")*

Hi,

The default variant is set by have an entry for each characteristic of the product in the table hikashop_variant linking the main product of the hikashop_product table and the default values you want for each characteristic of the hikashop_characteristic table.

The following user(s) said Thank You: [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTUwOTUtc2V0LXZhcmlhbnRzLWRlZmF1bHQtdmFsdWUtd2l0aC1pbXBvcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.055 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
