Page 1 of 2

Uploading Thousand of products

Posted: 17 May 2022, 15:28
by saltri77
Hi,
I have a problem and I try explaining it better than the first time I did some days ago.
I need to upload many, many, products. I'm talking about thousand and more.
If I use the import option in phoca cart, it doesn't work because they are too much.
How can I do that?

Re: Uploading Thousand of products

Posted: 17 May 2022, 22:40
by Jan
Hi, you can increase php memory on your server, etc. but it will be better to import such products per SQL way - e.g. in phpMyAdmin, etc. :idea:

Jan

Re: Uploading Thousand of products

Posted: 17 May 2022, 23:52
by saltri77
Thank you Jan,
I created a php form to upload data from excel file. I can upload categories, manufacturer etc but when I try with the products it doesn't work. And I suppose, it's because in joomla database, in the products table there isn't a direct field to the categories (or, perhaps, I don't see it) and, because for a product in phoca cart it is required a category, my form doesn't work. I have to try how to solve it because the uploading must do my customer, the owner of the site and I can't give him the direct use of the database...

Re: Uploading Thousand of products

Posted: 22 May 2022, 14:07
by saltri77
Jan wrote: 17 May 2022, 22:40 Hi, you can increase php memory on your server, etc. but it will be better to import such products per SQL way - e.g. in phpMyAdmin, etc. :idea:

Jan
Hi, I don't know how. that is because I can use php and mysql but not my customer who has use the website.
Anyway, there is a problem, when I try to import on mysql even few products, it doesn't work, like I said in other post, I guess it's because in the _phocacart_products_ there is a field connected to the categories.

Re: Uploading Thousand of products

Posted: 22 May 2022, 23:38
by saltri77
Excuse me if I'm boring you... but... I've solved the first problem (now with a file php I can upload products), but I can't see the products on beckend, I see them only on the database.
Could you tell me, please, the right way, step by step, to add thousand of products without any errors?

I am having several difficulties:
1) through the php file I load the data of the products taking them from an excel sheet and insert them directly into the database table #_phocacart_products but in this table there is no field to insert the product category. How can I do?
2) loading the products in this way I see them on the database and not on the component (beckend). How do I resolve?
Thanks.

Re: Uploading Thousand of products

Posted: 25 May 2022, 15:43
by saltri77
Why, when I add products by mysql, in the right way, I can't see anything in the beckend of the component and I see everything in the database? Someone could help me?
I try to don't post in other posts o create new topic but if I don't have answers, perhaps "You don't have solutions" or similar... but it is not correct ignore person.

Re: Uploading Thousand of products

Posted: 25 May 2022, 16:29
by saltri77
I try again to explain better my problem. Maybe I can't explain my self but understand, I'm not english.
So. I love use phoca cart, but this time I had many problems.
I need to add thousand of products and hundreds of categories.
The website I'm preparing isn't mine. I have to give to my customer something he can use. So, I can't tell him "Add products in mysql" because he can't.
I create a form to add products from excel file to mysql. Everything works. I see the products on the database but I don't see them on Phoca cart component. My server, database etc are good about memory and soon.
There is another way?
I have to use the import system in phoca cart? If yes, how I can add so many products and for each one oh them inserting the right correspondence for categories etc?
I hope now I was clear. It's no easy speak in another language. And I hope someone could help me.

Re: Uploading Thousand of products

Posted: 25 May 2022, 23:10
by Jan
Hi, sorry for late response. It is not so easy with categories. Phoca Cart product can be saved in more than one category. This means special feature in database - the reference table for products and categories. So category is not saved in product table, because it is not possible to save more than one value.

This means when importing products, there is no category id item, This is stored in reference table:

Image

Jan

Re: Uploading Thousand of products

Posted: 26 May 2022, 14:34
by saltri77
Jan wrote: 25 May 2022, 23:10 Hi, sorry for late response. It is not so easy with categories. Phoca Cart product can be saved in more than one category. This means special feature in database - the reference table for products and categories. So category is not saved in product table, because it is not possible to save more than one value.

This means when importing products, there is no category id item, This is stored in reference table:

Image

Jan
Ok, I had see that table. how do you suggest me to proceed with the data upload? Do I load the categories first, then the products and at the end the ids in the product_categories table?

Re: Uploading Thousand of products

Posted: 26 May 2022, 15:57
by saltri77
@Jan
I tryed... but I failed... The system doesn't accept that I upload data in my way. I have to use your importing system. What is the best way to use the file csv?