Caching problem

  • Posts: 60
  • Thank you received: 0
11 years 10 months ago #82567

Hello,

Check out this website www.oliverafineart.com/

When I click on "echo of the forest" under 'paintings' on the left it gets a class of 'active current', but when I then click on for example 'fantasy' under 'illustrations', it gets highlighted with a class of 'active current' but that same class remains on 'echo of the forest' as well, until you refresh the page again.

So i get 2 links with a class of 'current active'

I guess this is a caching problem.

Can it be fixed?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #82604

Hi,

You can maybe try to remove the current active class with some jQuery, like "$("#li").removeClass("active");".
But it's not HikaShop related, you can try with other Joomla menu and it will be the same way.

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

  • Posts: 60
  • Thank you received: 0
11 years 10 months ago #82652

I think you didn't understand me.

Did you go to the site to see the problem?

I get TWO links with "active" class, but when I refresh only the right one remains with the 'active' class (how it should be).

It is hikashop related problem, this never happened to me before, and it happens with hikashop category listing.

just check the website and you'll what i mean.

Just click anythi under 'Paintings' on the left, and then click anything under 'illustrations' and you will see they both remain with hover effect, but then if you refresh the page only the second one you clicked will have the hover effect (which is the active class).

Last edit: 11 years 10 months ago by Dzumla.

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 10 months ago #82868

Hi,

That's a problem which indeed happens with two categories listing module.
Can you try to change the code:

$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
to
if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
	$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
in the file components/com_hikashop/views/category/tmpl/listing_list.php ?
That should hopefully fix the problem.

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

  • Posts: 60
  • Thank you received: 0
11 years 10 months ago #82964

Didn't help. that was around like 221 with me. Changed it, but it is still the same.

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 10 months ago #83013

Then maybe you're using the "no child" option.
Try to change the code:

$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
						foreach($this->rows as $row){
							if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
to
foreach($this->rows as $row){
							if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
								$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
in the same file.

The following user(s) said Thank You: Dzumla

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

  • Posts: 60
  • Thank you received: 0
11 years 10 months ago #83031

this is on line 87 with me.

It gives me an error.

Last edit: 11 years 10 months ago by Dzumla.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #83124

Can you give us the error returned ?

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

  • Posts: 60
  • Thank you received: 0
11 years 10 months ago #83157

Hello,

It actually works with the second solution now.

I guess I made a mistake when I replaced the code, but now when I did it again it solved it! (the second block of code).

Thanks Nicholas! Always helpful with your answers.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum