Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

All Products SEO


231 replies to this topic

#21 Syros

  • Community Member
  • 8 posts
  • Real Name:Rinus

Posted 26 October 2008, 19:16

Here i am again. :)

I have installed a new contib recently....
SEO friendly URL's.
Took me all wekend to work properly, but it did work in the end, have some more testing to do, but ok...

After i checked a few basic thingy's i found a little problem with the all products.

when i press the all product line in the category box i get the full output (works fine) but there is a little bug in it.

Instead of a-z links at the top it gives me..

ALL_PRODUCTS_SEO_LINK_SEPARATOR A ALL_PRODUCTS_SEO_LINK_SEPARATOR B ALL_PRODUCTS_SEO_LINK_SEPARATOR C ALL_PRODUCTS_SEO_LINK_SEPARATOR D ALL_PRODUCTS_SEO_LINK_SEPARATOR E ALL_PRODUCTS_SEO_LINK_SEPARATOR F ALL_PRODUCTS_SEO_LINK_SEPARATOR G ALL_PRODUCTS_SEO_LINK_SEPARATOR H ALL_PRODUCTS_SEO_LINK_SEPARATOR I ALL_PRODUCTS_SEO_LINK_SEPARATOR J ALL_PRODUCTS_SEO_LINK_SEPARATOR K ALL_PRODUCTS_SEO_LINK_SEPARATOR L ALL_PRODUCTS_SEO_LINK_SEPARATOR M ALL_PRODUCTS_SEO_LINK_SEPARATOR N ALL_PRODUCTS_SEO_LINK_SEPARATOR O ALL_PRODUCTS_SEO_LINK_SEPARATOR P ALL_PRODUCTS_SEO_LINK_SEPARATOR Q ALL_PRODUCTS_SEO_LINK_SEPARATOR R ALL_PRODUCTS_SEO_LINK_SEPARATOR S ALL_PRODUCTS_SEO_LINK_SEPARATOR T ALL_PRODUCTS_SEO_LINK_SEPARATOR U ALL_PRODUCTS_SEO_LINK_SEPARATOR V ALL_PRODUCTS_SEO_LINK_SEPARATOR W ALL_PRODUCTS_SEO_LINK_SEPARATOR X ALL_PRODUCTS_SEO_LINK_SEPARATOR Y ALL_PRODUCTS_SEO_LINK_SEPARATOR Z ALL_PRODUCTS_SEO_LINK_SEPARATOR FULL

links work, but it doesn't look smooth :D

do you know where the problem can be fixed? i have searched some in the all-products.php, but didn't find anything (not a good scripter :) )

tnx again in advange!

Edited by Syros, 26 October 2008, 19:18.


#22 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 26 October 2008, 20:26

The database code for that contribution blindly deletes any entry with SEO in it so you have to run the database changes for this one again. But you should only have to run the following, not the full file.
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) 
 VALUES ('','All Products: ON/OFF', 'ALL_PRODUCTS_SEO', 'true', 'All Products <br>(true=on false=off)', '279', '1', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)
 VALUES ('','All Products: Display Mode', 'ALL_PRODUCTS_SEO_DISPLAY_MODE', 'true', 'Display in standard table format <br>(true=on false=off)', '279', '2', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)
 VALUES ('','All Products: Display Numbers in list', 'ALL_PRODUCTS_SEO_DISPLAY_NUMBERS', 'true', 'Show numbers in the list of clickable links at the top of the All Products page.', '279', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)
 VALUES  ('', 'All Products: Link Separator', 'ALL_PRODUCTS_SEO_LINK_SEPARATOR', '|', 'Separate the clickable links with this character.', '279', '4', NULL, now(), NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)
 VALUES  ('', 'All Products: Exclude Characters', 'ALL_PRODUCTS_SEO_EXCLUDE_LIST', '', 'Enter a comma separated list of characters to be excluded from the clickable links. For example, entering a,b will cause the list not to show A and B.', '279', '5', NULL, now(), NULL);

Jack

#23 Syros

  • Community Member
  • 8 posts
  • Real Name:Rinus

Posted 28 October 2008, 09:56

Once again: many thanks!!!
works like a charm.... :D

muchos lovahz ;)

#24 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 21 November 2008, 21:54

Sorry if I've missed this somewhere but I can't get this to work. After finishing the installation I click on an "all products link" (which I have placed in the information box) and I get the following error:

Fatal error: Cannot redeclare tep_header_tag_page()

This error references line 15 of includes/functions/header_tags.php

Any ideas as to what I may have missed?

Thanks.

#25 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 22 November 2008, 00:11

What version of Header Tags do you have installed?

Jack

#26 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 22 November 2008, 03:29

View PostJack_mcs, on Nov 22 2008, 12:11 AM, said:

What version of Header Tags do you have installed?

Jack


I have version 3.09 installed. I originally had 3.08 and I followed the instructions to update to 3.09 by uploading all that was in the admin part of the catalog.

Thanks.

#27 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 22 November 2008, 04:18

Hmm, I don't know what that could be then. The error is saying that the Header Tags code is being declared twice but this contribution doesn't decalre it anywhere so either a mistake was made with the Header Tags installation or there is code elsewhere in the shop that is causing the extra call. You might want to try replacing the includes/header_tags.php file and see if the error goes away. Other than that, you will have to try to isolate where the code is being redeclared. See if it only fails on one page, like all products, or if it is on any page - that sort of thing.

Jack

#28 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 22 November 2008, 17:24

View PostJack_mcs, on Nov 22 2008, 04:18 AM, said:

Hmm, I don't know what that could be then. The error is saying that the Header Tags code is being declared twice but this contribution doesn't decalre it anywhere so either a mistake was made with the Header Tags installation or there is code elsewhere in the shop that is causing the extra call. You might want to try replacing the includes/header_tags.php file and see if the error goes away. Other than that, you will have to try to isolate where the code is being redeclared. See if it only fails on one page, like all products, or if it is on any page - that sort of thing.

Jack


I replaced the includes/header_tags.php file and nothing changed. It's only happening on that one page (all products) so I'm clueless as to where to look... I'll just have to dig around a bit.

I appreciate you taking your time to help me Jack. Thanks.

#29 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 22 November 2008, 17:35

That file comes with the Header Tags code already installed so be sure that you didn't add it again when making the changes for Header Tags.

Jack

#30 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 22 November 2008, 17:54

View PostJack_mcs, on Nov 22 2008, 05:35 PM, said:

That file comes with the Header Tags code already installed so be sure that you didn't add it again when making the changes for Header Tags.

Jack


I didn't add it again... but I did find the deathstar! I turned off STS and All Products works as expected. So this is an STS compatibility issue I guess. I hadn't even thought of that earlier. I did just recently alter the header tags code in the sts_inc folder to accommodate FWR's duplicate content manager contribution... perhaps this is the problem?

Thanks again for your help Jack. The All Products SEO contribution really does look great!

#31 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 22 November 2008, 19:02

Thanks. If you are using STS, you should add the code to the <head> section of each page. That might be the problem.

Jack

#32 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 22 November 2008, 22:02

View PostJack_mcs, on Nov 22 2008, 08:02 PM, said:

Thanks. If you are using STS, you should add the code to the <head> section of each page. That might be the problem.

Jack


So apparently my problem solving skills went on vacation and didn't tell me before they left...

The header tags code is already in the top of all-products.php and with STS turned on I get the redeclare error. When I remove the code from the top of all-products.php the page works perfectly with STS, header tags and all. Obviously, then, when I turn off STS (with the mentioned code still removed) the page will display but without the header tag information.

So what am I missing? With the code removed somehow Header Tags SEO is still able to locate this page and apply the tags to it. This must be some function of STS right? I'm sure I must be thinking too hard into this...

Thanks again.

#33 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 22 November 2008, 23:33

Yes, there is code in STS that handles that part of the code. If you turn off STS and that code isn't in the head section, then Header Tags won't work properly for that page. It isn't usally a problem since most people don't turn STS off and on, excpet for testing.

Jack

#34 DimeNote

  • Community Member
  • 139 posts
  • Real Name:Unknown
  • Gender:Male

Posted 12 December 2008, 14:12

View PostJack_mcs, on Nov 22 2008, 11:33 PM, said:

Yes, there is code in STS that handles that part of the code. If you turn off STS and that code isn't in the head section, then Header Tags won't work properly for that page. It isn't usally a problem since most people don't turn STS off and on, excpet for testing.

Jack


Sorry for the late response. The problem was, as you correctly pointed out, that I was testing STS... hence the errors. All is working perfectly now and the contribution looks amazing. I really appreciate the time you invest in helping (myself and others) on the forums. I strongly believe that osCommerce would be nothing without the support and dedication of community members like you Jack.

Thanks.

#35 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 December 2008, 15:18

Thank you for the kind words. I agree that it"s the oscommerce community that makes this package successful.

Jack

#36 nicko107

  • Community Member
  • 117 posts
  • Real Name:nicko
  • Gender:Male
  • Location:Spain

Posted 30 December 2008, 22:10

Hi,

I did a translation to spanish of the installation instructions and the file catalog/includes/languages/espanol/all-products.php

Because I cant upload an spanish version of the contribution I put the translation in the next link to anyone that need it or in the case that could be add to the contribution:

http://www.oscatalogo.com/all-products-seo-en-espanol/473/


Thanks for this new version of All Products!


regards
nicko107

#37 bog_tom

  • Community Member
  • 1 posts
  • Real Name:B

Posted 09 January 2009, 18:00

Can you adjust this addon to show all products from a specific category in one page?

Edited by bog_tom, 09 January 2009, 18:00.


#38 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 10 January 2009, 00:43

Yes, that can be done. I'll put it on the list of changes for the next version but no idea when that will be.

Jack

#39 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 03 February 2009, 03:18

A new version has been uploaded. It contains these changes:

- Added css class for h1. Not needed if Header Tags is installed.
- Added german language file as supplied by dargond in the support thread.
- Changed the bredcrumb code on the page to use NAVBAR_TITLE.
- Added code to control title and sub-text on all-products page from admin.

Jack

#40 assadrafaq

  • Community Member
  • 14 posts
  • Real Name:Assad Rafaq

Posted 07 February 2009, 07:46

Hi,

According to ur instructions made changes to all files,but In Categories.php I couldn't find exactly this

"new infoBox($info_box_contents);"



Instead found:

new infoBox($info_box_contents, true);

at the end of the file.

Infact the code for categories.php is as following:
<?php
/*
  $Id: show_subcategories.php,v 1.0 2003/01/08 10:37:00 Exp $

  osCommerce, Open Source E-Commerce Solutions
  [url="http://www.oscommerce.com/"]http://www.oscommerce.com/[/url]

  Based on: main_categories.php Ver. 1.0 by Gustavo Barreto

  History: 1.0 Creation

  Released under the GNU General Public License

*/

// Preorder tree traversal
  function preorder($cid, $level, $foo, $cpath)
  {
    global $categories_string, $HTTP_GET_VARS;

// Display link
    if ($cid != 0) {
      for ($i=0; $i<$level; $i++)
        $categories_string .=  '  ';
      $categories_string .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath
=' . $cpath . $cid) . '">';

// 1.6 Are we on the "path" to selected category?
      $bold = strstr($HTTP_GET_VARS['cPath'], $cpath . $cid . '_') ||  $HTTP_GET_VARS['cPath'] == $cpath . $cid;
// 1.6 If yes, use <b>
      if ($bold)
        $categories_string .=  '<b>';
      $categories_string .=  $foo[$cid]['name'];
      if ($bold)
        $categories_string .=  '</b>';
      $categories_string .=  '</a>';
// 1.4 SHOW_COUNTS is 'true' or 'false', not true or false
      if (SHOW_COUNTS == 'true') {
        $products_in_category = tep_count_products_in_category($cid);
        if ($products_in_category > 0) {
          $categories_string .= ' (' . $products_in_category . ')';
        }
      }
      $categories_string .= '<br>';
    }

// Traverse category tree- this is for older snapshots pre-November 2002
/*    foreach ($foo as $key => $value) {
      if ($foo[$key]['parent'] == $cid) {
//        print "$key, $level, $cid, $cpath<br>";
        preorder($key, $level+1, $foo, ($level != 0 ? $cpath . $cid . '_' : ''))
;
      } */
// Function used for post November 2002 snapshots
  function tep_show_category($counter) {
    global $foo, $categories_string, $id;

    for ($a=0; $a<$foo[$counter]['level']; $a++) {
      $categories_string .= "  ";
    }
    }
  }

?>
<!-- show_subcategories //-->
          <tr>
            <td class="infoBox_left">

<?php

//////////
// Display box heading
//////////
  $info_box_contents = array();
  $info_box_contents[] = array('align' => 'left', 'text'  => BOX_HEADING_CATEGORIES);
  new infoBoxHeading($info_box_contents, true, false, false, true);

//////////
// Get categories list
//////////
// 1.2 Test for presence of status field for compatibility with older versions
//  $status = tep_db_num_rows(tep_db_query('describe categories status')); used for older snapshots
$status = tep_db_num_rows(tep_db_query('describe ' .  TABLE_CATEGORIES . ' status'));


  $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
            from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
            where c.categories_id = cd.categories_id";
// 1.3 Can't have 'where' in an if statement!
  if ($status >0)
    $query.= " and c.status = '1'";
  $query.= " and cd.language_id='" . $languages_id ."'
            order by sort_order, cd.categories_name";

  $categories_query = tep_db_query($query);


// Initiate tree traverse
  $categories_string = '';
  preorder(0, 0, $foo, '');

//////////
// Display box contents
//////////
  $info_box_contents = array();
  $row = 0;
  $col = 0;
  while ($categories = tep_db_fetch_array($categories_query)) {
   if ($categories['parent_id'] == 0) 
   {
            $temp_cPath_array = $cPath_array;  //Johan's solution - kill the array but save it for the rest of the site
         unset($cPath_array);
         
            $cPath_new = tep_get_path($categories['categories_id']);
            
         $text_subcategories = '';
     $subcategories_query = tep_db_query($query);
     while ($subcategories = tep_db_fetch_array($subcategories_query)) 
         {
             
                if ($subcategories['parent_id'] == $categories['categories_id'])
                {
                        
                                        $cPath_new_sub = "cPath="  . $categories['categories_id'] . "_" . $subcategories['categories_id'];

                    $text_subcategories .= '' . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new_sub, 'NONSSL') . '" class="menusubcateg">' . '&nbsp;&nbsp;&nbsp;' . tep_image(DIR_WS_IMAGES . 'pointer_blue_light.gif', '') . $subcategories['categories_name'] . '</a>' . " ";
                } // if
     } // While Interno
    $info_box_contents[$row] = array('align' => 'left',
                                           'params' => 'class="smallText" width="125" valign="top"',
                                           'text' => '' . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '" class="menucateg"><b>' . '&nbsp;' . tep_image(DIR_WS_IMAGES . 'pointer_blue.gif', '') . $categories['categories_name'] . '</b></a>' . $text_subcategories);
    $col ++;
    if ($col > 0) 
        {
                $col = 0;
                $row ++;
    }
    $cPath_array = $temp_cPath_array; //Re-enable the array for the rest of the code
   }
  }
  new infoBox($info_box_contents, true);


?>
            </td>
          </tr>
<!-- show_subcategories_eof //-->