Advertisement:

Author Topic: [SOLVED] Not working while clicking on the category in mobile version  (Read 6094 times)

haryour

  • Newbie
  • *
  • Posts: 36
  • My fingers and keyboard are magno-reacting
Re: [SOLVED] Not working while clicking on the category in mobile version
« Reply #15 on: February 28, 2014, 04:42:09 pm »
@cartagena68

Thanks man! You are a genius.

Got the question for you. The Sort By is inactive i.e. unclickable. How do I go about this?

First thank you, second i'm not a genius.

About your question, i don't understand what you mean. Is your site online?

@cartagena68

Guess you dont like hyping.
Anyway, I got it solved thanks to http://forums.osclass.org/3-3-x/sort-by-in-dropdown/msg85529/#msg85529

zendengoh

  • Jr. Member
  • **
  • Posts: 54
Re: Not working while clicking on the category in mobile version
« Reply #16 on: May 14, 2014, 10:55:56 am »
Hi,
i had the same problem, is working if you have subcategories, but if you have only categories is not working.
What i did is a little change in file function.php in your theme folder
find the line (around 198)

<h1><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span></h1>

and replace with

Code: [Select]
<h1><a onclick="javascript:location.href='<?php echo osc_search_category_url() ; ?>'" class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span></h1>
and line 203

<a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a>

with

Code: [Select]
<a onclick="javascript:location.href='<?php echo osc_search_category_url() ; ?>'" class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a>
i'm not sure if you need to change the second line to, try only the first and then you see if is working
Can't find the script inside the functions.php

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
@ zendengoh

what theme do you have?

zendengoh

  • Jr. Member
  • **
  • Posts: 54
bender : )

Have tried the method but didn't solve.
« Last Edit: May 14, 2014, 02:59:37 pm by zendengoh »


sharkey

  • Full Member
  • ***
  • Posts: 102
Easy, quick, and correct answer.

Go to oc-content/themes/bender/common.head.php

Change line 49 from:

Code: [Select]
    bender.langs = <?php echo json_encode($js_lang); ?>
to

Code: [Select]
    bender.langs = <?php echo json_encode($js_lang); ?>;
Thanks to _Blueberry for the solution (I was fixing something else and it fixed this too. )  I didn't have to move the code like he said though.

http://forums.osclass.org/3-3-x/are-you-sure-you-want-to-delete-your-account/15/