Category List Sort Order (In Module)

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5354

Hello,

Brand new user here and trying to figure a few things out. First let me say Thank You for creating another e-commerce component for Joomla. I've tried several and so far haven't found one that I was particularly happy with. Your product is looking better than most (for my particular needs) and I haven't really gone too far with it yet. I'm optomistic!

My question is how to control the sort order of a category list when displayed in a module. I've tried just about all the Ordering Field options in both the Module parameters and Configuration/Display/Default Parameters for Categories and nothing seems to change the display order. Am I looking at the wrong parameter fields?

Regards,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5355

Hi,

That's actually a bug. Usually, users leave the category ordering field to the ordering column and use the ordering of the categories to order their categories so no one noticed that the ordering field option wasn't working.

You can edit the file components/com_hikashop/views/category/view.html.php and replace the lines

$pageInfo->filter->order->value = $app->getUserStateFromRequest( $this->paramBase.".filter_order", 'filter_order_'.$this->params->get('main_div_name').$category_selected,	'a.category_ordering','cmd' );
$pageInfo->filter->order->dir	= $app->getUserStateFromRequest( $this->paramBase.".filter_order_Dir", 'filter_order_Dir_'.$this->params->get('main_div_name').$category_selected,	'asc',	'word' );
by the lines:
$pageInfo->filter->order->value = $app->getUserStateFromRequest( $this->paramBase.".filter_order", 'filter_order_'.$this->params->get('main_div_name').$category_selected,	'a.'.$this->params->get('category_order'),'cmd' );
$pageInfo->filter->order->dir	= $app->getUserStateFromRequest( $this->paramBase.".filter_order_Dir", 'filter_order_Dir_'.$this->params->get('main_div_name').$category_selected,	$this->params->get('order_dir'),	'word' );
which should fix the problem until next release.

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5359

Hi Nicolas,

Thanks for the prompt response. I'm just starting the evaluation process so can live with setting the order in the category list for now and will look forward to a permanent solution in the next release.

I have noticed one other oddity regarding the categories. I have defined four main categories, each with two to eleven sub-categories. I have the category module displayed on a page that also has categories and products in the main body of the page (HikaShop Categories Listing menu type).

When I click one of the main category headings in the module that only has two sub-categories, the sub-categories appear at the top of the main body area of the page as well as below the category heading in the module. But if I click one of the main categories in the module that has either eight or eleven sub-categories, nothing changes in the main body section. (sub-categories for that category are not listed at the top of the page, but they do appear below the category in the module)

Have I missed a setting that would cause this behavior?

Regards,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5361

I'm not sure I understand. Could you give the URL of your website ?

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5365

Here's the link: (removed because it is no longer valid)

In the Categories module on the right, the bottom two categories when clicked, display corresponding sub-categories in the main body portion of the page. The top two categories when clicked, display sub-categories under the main category, but nothing changes in the main body of the page.

There is currently only one product and it is assigned to EPSP Races, EPSP Races/2003 Season, Modifieds and Modifieds/EPSP Modifieds categories.

Thanks for taking a look,
Ed

Last edit: 13 years 3 months ago by hdracing. Reason: Removed invalid link

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5368

MMmm. I just looked at your website and I saw the products in the main portion of the website when the category is selected on the module of the right part. Everything seems to be as it should.Did you fix your problem in the mean time maybe ?

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5375

Still not working for me. Are you saying that when you clicked EPSP Races or SNMS Races in the DVD Categories module you see all the 20xx Season sub-cats in the main part of the page, to the left of the module? I only see them listed in the module, not in the body part of the page. Clicking either of the bottom two DVD Categories, Modifieds or X-Mods does display the sub-cats in the main part of the page AND underneath the category in the module.

Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5376

I see. The problem is that there is no link on the main category name in the module for the two first categories.

That's strange as they are done the same way as the two others calling joomla's pane.

Looking at the code I don't see what could be the problem on HikaShop's end. Could you give us access to your backend so that we can put some traces ? I wonder if it doesn't come from a problem with the spaces in the categories name....

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5380

The space was the problem. It's working now, but it would probably be better if spaces were OK in category names.

Thanks for working with me on this. If you still need admin access I'll be happy to set you up.

Regards,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5381

Yes, that would be great to have access to your back end and that you put temporary one category with that problem.
We can't reproduce the problem on our end so it would help to be able to trace the problem on your website.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5405

Hi Nicolas,

Sorry I couldn't get back to you right away. I was out for a couple of hours. I was going to send login credentials for my site but can't find a way to send PM on this board. Where should I send the information?

Regards,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5409

You can use our contact form: www.hikashop.com/en/support/contact-us.html

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5448

Thanks Nicolas, un/pw sent.

One other thing on this topic. When the page is first opened containing the Category List Module, I would like to have all categories in the module list collapsed (no sub-cats displayed). Currently, the first category is open with all sub-cats displayed. Is there a setting to control this?

Regards,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5449

Hi,

The problem seems to come from your template javascript.
If you switch temporarily to the default joomla template, you should not have the problem.
Also, if you use your current template, disable the JS of firefox with the "web developer toolbar" addon, the link is there. Which means that the link is removed dynamically by some JS code. And the only JS code run when the page is displayed is the JS of your template.

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5450

You can edit the file listing_list of the view category via the menu Display->Views and change the line:

$this->tabs	=& JPane::getInstance('sliders', array('startOffset'=>$found,'startTransition'=>0));
to
$this->tabs	=& JPane::getInstance('sliders', array('startOffset'=>999,'startTransition'=>0));
so that no pane is opened by default.

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5451

nicolas wrote:

You can edit the file listing_list of the view category via the menu Display->Views and change the line:

$this->tabs	=& JPane::getInstance('sliders', array('startOffset'=>$found,'startTransition'=>0));
to
$this->tabs	=& JPane::getInstance('sliders', array('startOffset'=>999,'startTransition'=>0));
so that no pane is opened by default.

Did you make that change for me already? All of a sudden the slider is not open by default.

If so, Thanks,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5452

Now the slider does not stay open when a category is selected so that a sub-cat can be selected.

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5453

Yes I made the change already.

Ah ok. I thought that you didn't wanted it open at all when the page loads.

For what you want to do, you need to replace $found=0; by $found=999; in the same file instead of the previous change.

I made the modification already on your website.

Please Log in or Create an account to join the conversation.

  • Posts: 242
  • Thank you received: 0
13 years 3 months ago #5454

nicolas wrote:

Hi,

The problem seems to come from your template javascript.
If you switch temporarily to the default joomla template, you should not have the problem.
Also, if you use your current template, disable the JS of firefox with the "web developer toolbar" addon, the link is there. Which means that the link is removed dynamically by some JS code. And the only JS code run when the page is displayed is the JS of your template.

Nicolas,

I tried turning off JS as suggested and that does indeed solve the space-in-the-category-name problem, but causes another. Now all category sliders open expanded by default. Makes sense with JS disabled.

Thanks for making those changes for me, but I've taken enough of your time for now. I'll play with it for awhile and see what I can come up with.

Regards, and I appreciate all the help,
Ed

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #5456

What you could try is to use   instead of the space character in the categories name. That will be interpreted by the browser as a space so you will see a normal space and hopefully, the JS code of your template won't break it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum