Dirty Butter Posted March 3, 2015 Share Posted March 3, 2015 I get a 403 when I click on any choice. Sort has yet to work for me through all the betas. I have commented on GitHub on an old closed issue similar to mine, #221. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 This is what the HTML shows from the browser, and the template code: <form action="https://dirtybutter.com/plushcatalog/.html" class="autosubmit" method="post"> <form action="{$VAL_SELF}" class="autosubmit" method="post"> In all the HTML that uses VAL_SELF (currency and language selectors), it is empty. CANONICAL is also empty. In gui.class.php, line 221, there is: $GLOBALS['smarty']->assign('VAL_SELF', currentPage()); At the end of the function currentPage(), it is run through SEO. With CubeCart's debug turned on, what is the $_GET['seo_path'] value? Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 Ok, it turns out that ['seo_path'] is destroyed by SEO->getItem() before Debug works with (the remainder of) $_GET. @Al: critical diagnostic piece of info! Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 The above might not be so critical to know. Obviously the .htaccess file is working, otherwise CubeCart wouldn't have an ['seo_path'] to fetch the category. So, we need to focus on currentPage(), SEO->getItem() and SEO->SEOable() in your installation. The code is fine in my installation. You might also check the demo. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 So I should try virgin seo.class - what else? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 I don't know what to do to fix this, other than take Sort off the page completely. I tried swapping to clean Foundation, and it still doesn't work for me. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 If you have not disabled caching, and you switch to a skin name that is the same as an experimental one, be sure to clear the cache. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 Cache is disabled, and my version of Foundation has its own name. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 Then I think we are back at post #4. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 LOL But I don't understand #4. I did try swapping to virgin seo.class.php, but it still didn't work. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 "But I don't understand #4." There's always a chance that you would. But, until I can get a more detailed procedure for you to follow to help track down where the problem lies, my stated hypotheses are for anyone else who wants to put in a bit of effort to look over some code. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 We might also want to look at some records in your CC6 database. I think this happens: * CubeCart uses "health-related-plush" to query for the appropriate values for _a=type and the item_id. * CubeCart then uses the values of _a and the item_id to query for the path when making the currentPage(). So, maybe there are records in the CubeCart_seo_urls table where the path is empty for a type: cat and an item_id of the category_id for health-related-plush. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 "But I don't understand #4." There's always a chance that you would. You're being very kind Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 If I try to go here: https://dirtybutter.com/plushcatalog/index.php?_a=cat&cat_id=5 CubeCart immediately issues 301 Moved to the SEO-based URL. But that URL is malformed. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 Let's try this: In admin, Store Settings, Search Engines tab, set the "Add subcategories to category URL path?" to Yes. But I think I found the actual problem. In /classes/seo.class.php, lines 231-235: Was: if($GLOBALS['config']->get('config', 'seo_cat_add_cats') == 0) { // Get last part of path $cat_parts = explode('/', $path); $path = array_pop($path_parts); } Now: if($GLOBALS['config']->get('config', 'seo_cat_add_cats') == 0) { // Get last part of path $cat_path_parts = explode('/', $path); $path = array_pop($cat_path_parts); } Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 I tried your code change WITHOUT changing and adding the categories or subcategories to the SEO url's. It works! Tested every which way I could think of.But it did reveal another issue - the little box that should show the quantity - is not. We only have 1 of most items, but Sorting TY for (Stock High to Low) sorts in the correct order, but all say 1 in the little box. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2015 Share Posted March 3, 2015 That little box is not a "stock level". That's how many the customer wants to put in their shopping basket -- if there was a "Buy Now" button to match. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2015 Author Share Posted March 3, 2015 Ah - I took the Buy Now OFF. The more I thought about it, it doesn't make sense to give the customer a way to buy WITHOUT reading the description. Since our items are all used, there is normally a description of condition, as well as description of the product. Thanks again - I know how to comment out the little box LOL. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 19, 2015 Author Share Posted March 19, 2015 The Sort is not working for me again. I have upgraded to 6.0.1 AND all the GitHub changes completed as of today for 6.0.2. I'm using Foundation v5.5.1. I had to replace your $cat_path_parts part on seo.class.php - I would have expected it to be in the 6.0.1 code. I'ts my fault that I didn't comment your fix in my code, and I failed to notice that it wasn't there when I ported all my edits to 6.0.1 and a half. Any suggestions about where else to look? 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.