- Posts: 13
- Thank you received: 1
How to create a category under Root from a CSV import?
I need to reload the products list every night from a CSV file. I managed to build a CSV file that can generate categories under "Product category", but I don't know how to achieve that for a category under Root, using only data provided in the CSV file directly.
In other words, the following import works, if category "Size" has been previously defined in the back-end (In this case it has the ID #167):
Is it possible to generate the category "Size" directly in the CSV, with something like
Thanks
Please Log in or Create an account to join the conversation.
You're not supposed to create categories outside of the "product category" category.
You can try by using the text "Root" or "root" or "1" as "parent_category", but I've never tried. If these don't work, then I would say it's not possible.
Please Log in or Create an account to join the conversation.
Unfortunately, it seems I can't use such a category in a filter. I can define it, but apparently it does not show up in the product listing...
Please Log in or Create an account to join the conversation.
That's an entirely different issue.
And as I said
So it's no wonder that something might not work with such category.You're not supposed to create categories outside of the "product category" category.
But to say if that's something you could work out, we would need more information on how you configure your filter on the categories...
Please Log in or Create an account to join the conversation.
I need to solve this problem:
I have a set of products, each with a property called "size", and I have to let the user choose from one of the possible values of "size" from either a list or a simple dropdown box. The possible values of "size" can change overnight, but they are always a finite set of values.
In the meantime I have tried using a custom field. But in this case I have yet to find a way to assemble a list of all distinct values to present the user. Should I try to implement that "size" property as a sub-category of "product_category"?
Thanks in advance for any hint! I'm otherwise quite impressed by the HikaShop Business solution and very happy with it!
Please Log in or Create an account to join the conversation.
You should indeed use a custom field of the table "product" in that case.
Enter all the possible values of the field in the custom field (as a single or multiple dropdown, etc).
Then, in your products select the value(s) you want in the custom field.
And then create a filter applying on that custom field via the menu Display>Filters.
That filter will appear on your products listings allowing you to filter the products based on the values selected in the custom field for each one of them.
www.hikashop.com/support/documentation/1...-filter-listing.html
Thanks for the comment. If you want to, you can post a review on the Joomla Extensions Directory:
extensions.joomla.org/extensions/extensi...pping-cart/hikashop/
Please Log in or Create an account to join the conversation.
nicolas wrote: You should indeed use a custom field of the table "product" in that case.
Enter all the possible values of the field in the custom field (as a single or multiple dropdown, etc).
Then, in your products select the value(s) you want in the custom field.
The problem is that I do not know all the possible values of the field. And I need to have them all listed in a single dropdown.
If there is a way to programmatically update the list of all possible values of a custom field, then I would be very glad if someone could explain me how to do it.
In the meantime I found an alternative solution by creating a sub-category of "Product category" called "Size" and mapping all distinct values of that field to sub-categories of that category. All products are then assigned to one of those sub-categories and I can apply a category filter to achieve the wanted result of having a single dropdown of all possible (distinct) "Size" values.
nicolas wrote: Thanks for the comment. If you want to, you can post a review on the Joomla Extensions Directory:
extensions.joomla.org/extensions/extensi...pping-cart/hikashop/
Yes, I'll surely do it!
Please Log in or Create an account to join the conversation.
Programmatically, you can do anything so that sure is possible. But it's not the easiest. You would have to run a PHP script to update the data of the custom field in the table hikashop_field. If you found a good enough solution with categories then it will be easier that way.
Please Log in or Create an account to join the conversation.