sailing123 Posted January 23, 2015 Share Posted January 23, 2015 Hi, Currently exploring CC5 with the Crosshatch skin and noticed an issue with the URL writing of the categories, as such: - cat 1 - > URL witing is fine, ie domain name/cat 1 - sub category 1 - > URL is wrong it should be domain name/cat 1/sub cat 1 but instead you get URL domain name/sub cat 1 - sub sub category 1 -> URL is fine ie domain name/cat 1/sub cat 1/sub sub cat 1 So it is happening only with the 1st sub cat level, 2 levels of sub cat and the URL is correct. I also went on a live store of a business using Crosshatch and noticed that they had the same issue. As I am most likely to use this skin, do you know how it can be corrected ? Thank you. Sandrine Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 23, 2015 Share Posted January 23, 2015 This will need to be looked at in the controller code. The controller code (maybe the GUI class or the Catalogue class) is responsible for calculating the SEO Path if one was not specified in the admin Add/Edit Category screens. Once calculated, the path would (should?) be shown when re-editing that category. This URL is then given to the skin template system and is shown on the rendered page as given. So, regardless of the skin, this is CubeCart's behavior. Quote Link to comment Share on other sites More sharing options...
sailing123 Posted January 23, 2015 Author Share Posted January 23, 2015 Hi bsmither, Thank you for your reply. I played a bit more with the categories and added a 3rd and 4th level sub cat. Actually you can forget what I said that it was happening with only sub cat 1. Just created cat 2 with 3 sub cat levels and all URLs are wrong so no logic into the pattern. I also made sure it did not add any Custom SEO URL Path. I created the sub category, saved it, re-opened it and indeed the Custom SEO URL Path automatically created by Cubecart was wrong. So being a coding issue, how long do you think it will take for having it resolved ? Many thanks Sandrine Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 23, 2015 Share Posted January 23, 2015 I can look at this shortly. But I must assert that these results are simply what you wish to be otherwise. They do not serve your purpose or expectation. As long as the path is unique amongst any other category, product, document, or any other page, it satisfies the intent of providing a "friendly" expression of the product's description where said expression may include some reference to its categorical description. I'll be back shortly. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 23, 2015 Share Posted January 23, 2015 Just in case it makes a difference, please let us know the exact version of CubeCart you are using: admin, Dashboard, Store Overview tab Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2015 Share Posted January 24, 2015 My experiments show that the only way to effectively change a seo path, such that CubeCart itself generates the path, is to remove the path for that product from the CubeCart_seo_urls table. However, there is no means to do that. Once there is an seo path in the table, CubeCart will always use that, even when you blank the field where one enters a custom path. Blanking the field will not cause a new, default path to be generated. Yes, that could be fixed. I will see what I can find. In the meantime, you can delete all the records from the CubeCart_seo_urls table, which will then cause CubeCart to rebuild them all using the default path. The default path will be the product's master category, preceded by that category's path to the top level category. For example: test-category-2/test-category-2a/test-category-2a1/test-bundle-1 So, you will get the path from the top-level category to the product's master category, which is what you wanted. Actually, I do not get a default path when creating a new category, only when creating a new product. To delete all records from the CubeCart_seo_urls table, in admin, Maintenance, Query Database tab, enter: TRUNCATE CubeCart_seo_urls If you see mention of a table name prefix, be sure to use it. CubeCart will rebuild the seo paths as needed. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted January 24, 2015 Share Posted January 24, 2015 Hi In Store Settings | Search Engine tab you can switch on "Category name in product urls" which then will add the full category / sub-category path but only to product urls. As Brian also pointed out the CubeCart_seo_url table needs to be cleared so that new seo urls are generated and used and the only way currently is to use SQL to TRUNCATE the table which would need to be done after changing the above from a red cross to green tick. I have created a new issue on github https://github.com/cubecart/v6/issues/118which requests to 1) Add a new tick box option to the clear cache page in Maintenance to clear the CubeCart_seo_url table 2) Add a new option "Sub-category name in category url" to the Store Settings | Search Engine tab Ian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.