- Posts: 127
- Thank you received: 12
SOLVED: Bulk Create Product Category Rows
- tony@10uk.net
-
Topic Author
- Offline
Less
More
12 years 10 months ago - 12 years 10 months ago #134093
by tony@10uk.net
SOLVED: Bulk Create Product Category Rows was created by tony@10uk.net
-- url of the page with the problem -- : not required
-- HikaShop version -- : 1.5.7
-- Joomla version -- : 1.7
-- PHP version -- : not required
-- Browser(s) name and version -- : not required
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hello,
I wish to add many products (1000s) into a new category. That category will be applied to a discount code.
I have two options:
1) Spend a long time using the backend to update the relevant products with the new category.
2) Bulk change the database.
I wish to do the second of these.
Looking at the database, there are three tables:
- Category
- Product
- Product Category
It seems to me that Product Category is an m:n resolver between the other two tables.
My plan is to simply insert rows into Product Category combining the relevant Category IDs and Product IDs and allowing the primary key to auto increment.
This seems quite straight forward.
My question is... Are there any other tables involved? Will this work? Do you envisage any problems by doing this?
Many thanks,
Tony
-- HikaShop version -- : 1.5.7
-- Joomla version -- : 1.7
-- PHP version -- : not required
-- Browser(s) name and version -- : not required
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hello,
I wish to add many products (1000s) into a new category. That category will be applied to a discount code.
I have two options:
1) Spend a long time using the backend to update the relevant products with the new category.
2) Bulk change the database.
I wish to do the second of these.
Looking at the database, there are three tables:
- Category
- Product
- Product Category
It seems to me that Product Category is an m:n resolver between the other two tables.
My plan is to simply insert rows into Product Category combining the relevant Category IDs and Product IDs and allowing the primary key to auto increment.
This seems quite straight forward.
My question is... Are there any other tables involved? Will this work? Do you envisage any problems by doing this?
Many thanks,
Tony
Last edit: 12 years 10 months ago by tony@10uk.net.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 10 months ago #134123
by Mohamed Thelji
Replied by Mohamed Thelji on topic Bulk Create Product Category Rows
Hi Tony,
Note that another solution can be to :
- Create some products manually
- Export them through the EXPORT button of the page "Hikashop->Products"
- Add your product through this exported CSV file
- Import it
Doing it through Hikashop SQL tables won't be that easy, for example regarding your product price you'll also have to add your price through the "hikashop_price" table.
Note that another solution can be to :
- Create some products manually
- Export them through the EXPORT button of the page "Hikashop->Products"
- Add your product through this exported CSV file
- Import it
Doing it through Hikashop SQL tables won't be that easy, for example regarding your product price you'll also have to add your price through the "hikashop_price" table.
Please Log in or Create an account to join the conversation.
- tony@10uk.net
-
Topic Author
- Offline
Less
More
- Posts: 127
- Thank you received: 12
12 years 10 months ago #134137
by tony@10uk.net
Replied by tony@10uk.net on topic Bulk Create Product Category Rows
Thank you for your post, but I don't think you have understood my question.
My Products exist.
My Category exists.
Let me phrase the question differently:
If I use the Hikashop backend to asign a Category to a Product, what database rows are created/updated?
Is it JUST Product_Category?
Tony
My Products exist.
My Category exists.
Let me phrase the question differently:
If I use the Hikashop backend to asign a Category to a Product, what database rows are created/updated?
Is it JUST Product_Category?
Tony
Please Log in or Create an account to join the conversation.
12 years 10 months ago #134198
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Bulk Create Product Category Rows
Yes, just this one.
Regards,
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- tony@10uk.net
-
Topic Author
- Offline
Less
More
- Posts: 127
- Thank you received: 12
12 years 10 months ago #134263
by tony@10uk.net
Replied by tony@10uk.net on topic SOLVED: Bulk Create Product Category Rows
Thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.221 seconds