Forums / Templates, Stylesheets, Page Layout / need to get rid of a character

need to get rid of a character

Views: 747

Results 1 to 11 of 11
31 May 2015, 2:41 AM
#1
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

need to get rid of a character

the filter drop menu

The very last item in the alphabetical list is an X, how to get rid of it please. I went to the product_listing_alpha_sorter.php and copied it to my templates override folder.

I then added // to one line but the "X" just wont go away and when clicked on it takes you back to your category but not....you get the category but nothing below the category description, that is just blank.

This is the code I tried in the file:

================================

// build alpha sorter dropdown
if (PRODUCT_LIST_ALPHA_SORTER == 'true') {
if ((int)$_GET['alpha_filter_id'] == 0) {
$letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES);
} else {
$letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES_RESET);
}
for ($i=65; $i<91; $i++) {
$letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );
}
// for ($i=48; $i<58; $i++) {

$letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );

}

========================================

Is there some other file to do this at?

Please let me know since I have tried many different wys to get rid of it. I noticed that in 1.3.9h there was a line that does not seem to be in this version:

  $letters_list[] = array('id' => sprintf('%02d', 48), 'text' => '#' );
31 May 2015, 5:25 AM
#2
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

Well this problem went away. no idea why.

31 May 2015, 11:37 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: need to get rid of a character

DarkAngel:

Well this problem went away. no idea why.

Are you sure it didn't cause another problem? The line that was commented out would result in unbalanced curly brackets, which could a) cause undesirable results,b) cause warnings/errors to be generated and logged into the logs directory.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 May 2015, 11:09 PM
#4
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

mc12345678:

Are you sure it didn't cause another problem? The line that was commented out would result in unbalanced curly brackets, which could a) cause undesirable results,b) cause warnings/errors to be generated and logged into the logs directory.

Then that line should not be commented out? The company that was taking care of this account would go in when asked and "fix" things like getting some things out of the drop menus and were notorious for editing the core files not making a copy then adding it to the template override one...LOL

They said "To control the options in the "Filter Results by" dropdown on all the category home pages: /public_html/includes/modules/piccadilly_posh/product_listing_alpha_sorter.php"

which is what we are trying to do. To make the drop list just show the alphabet only without the : or x at the bottom.

Maybe that is what messed up the front pages image borders, the code is not touched and it was showing borders/drop shoadow but now are with no border and not 3 per line either.

1 Jun 2015, 5:53 AM
#5
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: need to get rid of a character

I think what you wanted to do was comment out the whole for loop like this

// build alpha sorter dropdown
  if (PRODUCT_LIST_ALPHA_SORTER == 'true') {
    if ((int)$_GET['alpha_filter_id'] == 0) {
      $letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES);
    } else {
      $letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES_RESET);
    }
    for ($i=65; $i<91; $i++) {
      $letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );
    }
[B]// [/B]   for ($i=48; $i<58; $i++) {

[B]// [/B]$letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );

[B]// [/B]}
1 Jun 2015, 6:03 AM
#6
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

Thank you so very much. I did as you showed and hope this behaves.

Now if you could answer me this... the buttons.php, should it be in languages/custom/buttons.php or in the defines folder?

I have it in the template folder and the button that should say to see all from this designer does not it still says return to product list.

1 Jun 2015, 6:20 AM
#7
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: need to get rid of a character

The default should be in "includes/languages/YOUR_LANGUAGE", and the override in includes/languages/YOUR_LANGUAGE/YOUR_TEMPLATE". But is it is in "includes/languages/YOUR_LANGUAGE/extra_definitions" it will also load, because all the php files in that directory will load on every page.

1 Jun 2015, 6:29 AM
#8
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

Design75:

The default should be in "includes/languages/YOUR_LANGUAGE", and the override in includes/languages/YOUR_LANGUAGE/YOUR_TEMPLATE". But is it is in "includes/languages/YOUR_LANGUAGE/extra_definitions" it will also load, because all the php files in that directory will load on every page.

ok, since it is in english i left off the your language in the folder area

well then maybe I need to have it in both places cause in just the template folder it will not show the button name

thanks.

1 Jun 2015, 6:36 AM
#9
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

well I put it in both areas and it did nothing. I then removed it from the template override and left it in ONLY the template overid in defines and still the darn button is not showing the right name on it.

click any category then any image of product (do not click front page images they send you to live store) and see the button in between previous and next...and still no alts show...LOL

1 Jun 2015, 10:54 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: need to get rid of a character

Commenting all the lines that were commented will remove A through Z and not just X. If it is/was desired to just remove the one letter then need to restore the lines commented, change the largest value to that of ascii of X, copy those lines and paste below, change the highest value of the new code to what it was above, and then the lowest value to that of Y.

As to the buttons above, when you say that you left off the your language part, the intention was that english be substituted for your situation. Beyond that, not sure what is going on (yet). :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Jun 2015, 9:41 PM
#11
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: need to get rid of a character

mc12345678:

Commenting all the lines that were commented will remove A through Z and not just X. If it is/was desired to just remove the one letter then need to restore the lines commented, change the largest value to that of ascii of X, copy those lines and paste below, change the highest value of the new code to what it was above, and then the lowest value to that of Y.

As to the buttons above, when you say that you left off the your language part, the intention was that english be substituted for your situation. Beyond that, not sure what is going on (yet). :)

UM, I did not make meself clear about what in that drop menu was to go away.... there is the stndard alpha listing in the drop menu but...immediately after the Z is found a "#" or sometimes a ": "

In 1.3.9 there is that character in the file and if you remove it from its 'x' leaving only the single quote it looks fine.

This is the code and in red are the commented lines as instructed above.....and wellllllll, that last obnoxious character is gone now and my list is showing as it should. 1.5.4 seems to be a whole new animal.


// build alpha sorter dropdown
if (PRODUCT_LIST_ALPHA_SORTER == 'true') {
if ((int)$_GET['alpha_filter_id'] == 0) {
$letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES);
} else {
$letters_list[] = array('id' => '0', 'text' => TEXT_PRODUCTS_LISTING_ALPHA_SORTER_NAMES_RESET);
}
for ($i=65; $i<91; $i++) {
$letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );
}
**// for ($i=48; $i<58; $i++) {

// $letters_list[] = array('id' => sprintf('%02d', $i), 'text' => chr($i) );

// }**

  $letters_list[] = array('id' => sprintf('%02d', 48), 'text' => '' ); **<--------- here is where the x is located in 1.3.9, which is not there in this version**
}
if (TEXT_PRODUCTS_LISTING_ALPHA_SORTER != '') {
  echo '<label class="inputLabel">' . TEXT_PRODUCTS_LISTING_ALPHA_SORTER . '</label>' . zen_draw_pull_down_menu('alpha_filter_id', $letters_list, (isset($_GET['alpha_filter_id']) ? $_GET['alpha_filter_id'] : ''), 'onchange="this.form.submit()"');
} else {
  echo zen_draw_pull_down_menu('alpha_filter_id', $letters_list, (isset($_GET['alpha_filter_id']) ? $_GET['alpha_filter_id'] : ''), 'onchange="this.form.submit()"');
}