Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

All Products or Categories #1

Open
Tristan-N opened this issue Oct 26, 2016 · 1 comment
Open

All Products or Categories #1

Tristan-N opened this issue Oct 26, 2016 · 1 comment

Comments

@Tristan-N
Copy link

Great feature. Thanks a lot.

I do have some questions. Is it possible to regen all product URLs instead of some selected product id's? And same for categories? I tried it but it didn't get it to work.

Any idea's, suggestions or tips & tricks about adding that kind of features?

@iazel
Copy link
Owner

iazel commented Oct 26, 2016

Uhm, yeah it should be feasible to do for all the products. I think I'll had this feature in the weekend, but if you don't want to wait, you can simply change RegenerateProductUrl#execute to iterate over all the products instead of the given ids.

Regarding the categories, what do you mean, exactly? The script should generate the link for each category associated to the product. Eg: if product1 is associated to cat1 and cat3 it will generate the following links:

  • /product1.html
  • /cat1/product1.html
  • /cat2/cat3/product1.html

Please notice that if you use more than 1 store view and the product has url_names different for each store view, then you must run the script for each store (-s <id-store>). By default (-s0) it regenerate only the global ones.

Oh, you need to clear the cache after the script run or you'll see the old urls.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants