jigoshop/jigoshop — pull request #1019 by newash (2014-12-17 10:45:46+00:00)
Title: Shop slugs

Hey lads,

Could you take a look at these changes?

Originally I wanted to change the code only to allow the "product" prefix to be modifiable through admin
settings as all other prefixes. Why has this been left out? Could there be a setting for this as well so if I wanted to localize it I could do it at the same place as the others and not have that separately in a translation file?

As for the rest of the changes: I've found the original logic a little bit confusing. I couldn't really figure what were the use cases, so it might have been totally fine, but let me describe my changed logic:

- if one checks nothing for the product prefix it would be: `product`
- if one checks "Prepend product permalinks with shop base page" but not "Prepend product permalinks with product category" the prefix would be: `shop/product`
- if one checks "Prepend product permalinks with product category" it would not matter if the other option would be checked (it could even be greyed out in the settings page) and the prefix would be URL ending of the category. With the same rules as for the category. So either `shop/product-cat/my-category` or `product-cat/my-category`

Of course for this to work the `jigoshop_options.class.php` has to be modified (product prefix added, and optionally the greying-out effect).

So I'm not asking to merge these changes, I'm just interested in your opinion.

Cheers.