osCmax v2.5 User Manual
Results 1 to 1 of 1

TIP allprods.tpl.php modification

This is a discussion on TIP allprods.tpl.php modification within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I'm not sure if anyone else has run into this problem but the stock Allprods mod that is in RC ...

      
  1. #1
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default TIP allprods.tpl.php modification

    I'm not sure if anyone else has run into this problem but the stock Allprods mod that is in RC 3.01 combined with SEO URLs not sure about stock (but definitely updated to 2.1+) was giving me problems. The problem may be a combination of these items running on Apache 2.+ because the rewrite is different but I think this was an issue before. Either way, Google flags the problem urls as problems so I want Google happy.

    The major problem is it was causing the address to be rewritten with the product name details twice. Googlebot doesn't like this and under Google's web tools it was listing this as a problem. On top of that it was being rewritten badly. Here is an example of how I wanted it
    Dried Flowers R Us : Case - Curly Willow - Natural - 15 bunches - $89.94
    and this is what I was getting
    Dried Flowers R Us : Case - Curly Willow - Natural - 15 bunches - $89.94
    which looks the same but if you click on the link it's a mess. I'm not sure how to get this to display the problem here but put your mouse over it or click it and you'll see.
    This is a problem on many levels but the fix is really simple. Here it is

    in templates/fallback/content/allprods.tpl.php look around line 44 for this code
    note: vbulletin is changing the code I'm pasting in this box
    Code:
    echo "     <a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, 'name=' .str_replace("/", "/", rawurlencode($this_products_name)). '&products_id=' . $this_products_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "\">" . $this_products_name . "</a><br>\n";
    and replace it with this
    Code:
    echo "     <a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, 'name=' . '&products_id=' . $this_products_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "\">" . $this_products_name . "</a><br>\n";
    Basically, this code is removed
    note: vbulletin is changing the code I'm pasting in this box
    Code:
    str_replace("/", "/", rawurlencode($this_products_name)).
    So, has anyone run into this problem besides me?
    Last edited by JohnW; 01-21-2008 at 08:56 PM.
    John

Similar Threads

  1. Adding an image next to the name link at allprods.tpl.php
    By icecold in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 07-19-2005, 03:08 AM
  2. Modification?
    By horsewhip in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-09-2004, 06:56 AM
  3. Ms2 Max modification of templates
    By whazzy in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 10-10-2003, 03:49 PM
  4. REALLY NEED HELP ON modification
    By humbags in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 07-18-2003, 06:45 AM
  5. Box Modification
    By crus in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 03-04-2003, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •