Jump to content

v6 Foundation Category Sort issue


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

"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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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);
}
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...