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

#   Categories from Virtuemart not imported

##

- **[korzo](/forum/user/34428-korzo "View korzo's Profile")**
- [![korzo's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34428.png)](/forum/user/34428-korzo "View korzo's Profile") Topic Author
- [ Offline](/forum/user/34428-korzo)

Less More

- Posts: 193
- Thank you received: 76
-
-

12 years 1 month ago [\#175816](#175816) by [korzo](/forum/user/34428-korzo "View korzo's Profile")  *[Categories from Virtuemart not imported](/forum/37-import-export-csv-xls/872362-categories-from-virtuemart-not-imported#175816 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.3.16  Today I tried import from Virtuemart 2.6.10 and categories are not imported to Hikashop. The problem is in the file administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;importvm.php at the line 857.  Result set from this query has several columns virtuemart&#95;category&#95;id and last one is always NULL. Because of this $c-&gt;virtuemart&#95;category&#95;id on following lines is always NULL, array $ids has only one element and queries on lines 1018 and 1034 silently fail with duplicate keys error.  This change  solved the problem and categories were imported, but it's horrible hack.")* was created by *[korzo](/forum/user/34428-korzo "View korzo's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.3.16

Today I tried import from Virtuemart 2.6.10 and categories are not imported to Hikashop.
The problem is in the file administrator\components\com_hikashop\helpers\importvm.php at the line 857.

Result set from this query has several columns **virtuemart\_category\_id** and last one is always NULL.
Because of this **$c-&gt;virtuemart\_category\_id** on following lines is always NULL, array $ids has only one element and queries on lines 1018 and 1034 silently fail with duplicate keys error.

This change Code:

SELECT *,vmc.virtuemart_category_id ...

solved the problem and categories were imported, but it's horrible hack.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 1 month ago -  12 years 1 month ago [\#175838](#175838) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Categories from Virtuemart not imported](/forum/37-import-export-csv-xls/872362-categories-from-virtuemart-not-imported#175838 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.3.16  Today I tried import from Virtuemart 2.6.10 and categories are not imported to Hikashop. The problem is in the file administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;importvm.php at the line 857.  Result set from this query has several columns virtuemart&#95;category&#95;id and last one is always NULL. Because of this $c-&gt;virtuemart&#95;category&#95;id on following lines is always NULL, array $ids has only one element and queries on lines 1018 and 1034 silently fail with duplicate keys error.  This change  solved the problem and categories were imported, but it's horrible hack.")*

Hi,

Thanks for your feedback.
I worked on the VM import Monday and I changed some elements in the import of categories.
We changed some elements in the queries in order to have a better import with high number of categories (like it was for VM1).
The query now starts with Code:

SELECT *, vmc.virtuemart_category_id as vmid, hkvm.vm_id as vm_cat_id, hkvmp.vm_id as vm_parent_id FROM

And we use "vmid" instead of "virtuemart_category_id" (and we also use "vm_cat_id" and "vm_parent_id" for the import resume).

The improvements of the import will be in HikaShop 2.3.4 that we want to release next week.

Regards,

---

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

Last edit: 12 years 1 month ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzIzNjItY2F0ZWdvcmllcy1mcm9tLXZpcnR1ZW1hcnQtbm90LWltcG9ydGVkP3RtcGw9bWFya2Rvd24=) 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.042 seconds

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