Is there any easy way to disassociate all products from a certain category? [OPENCART 3.]
For example I have products in cat1/subcat/subcat2, cat1/subcat/ and cat1
I would like to remove them from cat1 and subcat, and leave them only in subcat2. So I would like to essentially select 100 products, and disassociate them from 2 of the 3 categories that they belong to.
Would this be some sort of SQL thing? or is there a way to do it in the opencart interface without doing it one by one (I have a few thousand products added to store now)
Please let me know, thank you
Luke
And, if so, the just about only way, to avoid such, would be so-called SEO Linking
throughout the Site, by use of an extension, by example like one linked below.
Ernie
---
Ultimate Links Module manager Block - OpenCart 2.X
https://www.opencart.com/index.php?rout ... n_id=26418
Ultimate Links Module manager Block - OpenCart 3.X
https://www.opencart.com/index.php?rout ... n_id=31942
---
found here:
https://www.opencart.com/index.php?rout ... le%20links
---
I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'100 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.
you can simply write a query to remove all products from certain category only:
Code: Select all
delete from oc_product_to_category where category_id=999;
Well, that might be you opinion, still, during my stay in this place,on this forum everyone trying to make money!
nobody ever had to pay a single penny to me.

On the other hand, if you really care to assist others for free, then
better take into account, that most won't even know, what a QUERY is.

But you will find out, I assume, that OC-Life is not as easy, as it might sound.
Good Luck !

Ernie
I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'100 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.
shahriar-b - I can confirm that worked really nicely, its done - much appreciated.
Luke
It might not save you from a lot of work, but it could solve your category
linking-problem for good.
Good Luck

Ernie
---
Structured Data Unspecified Type & URL Without Category(vq)
Google-Translation:
It is an add-on that helps SEO configuration by solving the following issues.
- Fixes an unspecified type error in Google Structured Data Testing Tool results,
resulting from OpenCG's enriched card creation code for Facebook.
This will ensure that Google receives your structural data without error.
- Corrects the error that our product pages have two different URLs, which again
caused our site to be detected incorrectly. If we open the products under the
category page, it prevents the category name from being added to the URL.
In this case, our product page comes with the link added directly to the root URL.
https://www.opencart.com/index.php?rout ... n_id=32399
---
Remove parent category urls from subcategories and products
How to Remove parent category urls from subcategories and products
domain.com/category/sub-category = domain.com/sub-category
domain.com/category/product.html = domain.com/product.html
https://www.opencart.com/index.php?rout ... n_id=33577
---
I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'100 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.
Thanks, I was looking for this. Can this be done inside Opencart or in phpMyAdmin ?shahriar-b wrote: ↑Tue Jul 17, 2018 11:26 amYou don't have to buy an extension to do this easy task, unfortunately on this forum everyone trying to make money!
you can simply write a query to remove all products from certain category only:
change the category_id by the category_id you want to disconnect your products from.Code: Select all
delete from oc_product_to_category where category_id=999;
PHPMyAdmin only.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com