Post by lukeketchum1 » Mon Jul 16, 2018 8:52 pm

Hello all,

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

Active Member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by IP_CAM » Tue Jul 17, 2018 5:17 am

Well, do you see the same Product, but placed in Main- and Sub-Category ?
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'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in Action here: http://www.jti.li/shop/
---
940+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by shahriar-b » Tue Jul 17, 2018 11:26 am

You 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:

Code: Select all

delete from oc_product_to_category where category_id=999;
change the category_id by the category_id you want to disconnect your products from.

Newbie

Posts

Joined
Sat Feb 03, 2018 11:18 am

Post by IP_CAM » Tue Jul 17, 2018 5:58 pm

on this forum everyone trying to make money!
Well, that might be you opinion, still, during my stay in this place,
nobody ever had to pay a single penny to me. :D
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. :laugh:
But you will find out, I assume, that OC-Life is not as easy, as it might sound.
Good Luck ! ::)
Ernie

I'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in Action here: http://www.jti.li/shop/
---
940+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by lukeketchum1 » Tue Jul 17, 2018 6:14 pm

Thanks both for your replies.

shahriar-b - I can confirm that worked really nicely, its done - much appreciated.

Luke

Active Member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by IP_CAM » Thu Jul 19, 2018 4:02 am

Well, more by accident, I found two free Extensions, possibly coming close.
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'm no longer active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in Action here: http://www.jti.li/shop/
---
940+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 31 guests