osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 01-21-2008, 09:51 PM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 227
Thanks: 10
Thanked 32 Times in 18 Posts
Rep Power: 8
JohnW has a spectacular aura aboutJohnW has a spectacular aura about
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?
__________________
John

Last edited by JohnW; 01-21-2008 at 09:56 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to JohnW For This Useful Post:
bkpie (03-13-2008)
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 10:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax