Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seach Engine Friendly URL Support


BlueYon

Recommended Posts

I'm having trouble getting this addon to work alongside the Meta Tag Controller (per item per category) script.

 

I think the reason is because the url doesnt show "product_info.php" so the controller addon doesnt know it needs to change the title.

 

The meta tag contribution is:

http://www.oscommerce.com/community/contri...search,meta+tag

"Custom META Tags per Item"

 

And i am using the 1.8 version of this SEF url with the most recent fix to change the nested categories.

my site is http://www.liftchair.com/catalog and you can see that the meta tag addon is infact working by going to one of the item pages and pressing review.

 

Youll also notice that this SEF addon doesnt include the reviews in the optimized urls. Perhaps this is the reason that the meta tag addon is working?

 

I was thinking i might be able to fix it by passing the information to the meta tag addon BEFORE going to the search engine friendly addon, but i dont know how to go about doing this.

 

Does anyone know how i might be able to fix this?

 

 

I am not sure if you found the solution yet but here is what I did. Basically where the install says to add the follwing to the index.php page

 

 

From METE Docs.....

 

REPLACE:

<title><?phpechoTITLE;?></title>

 

WITH:

<?php // Randelia Custom_META_Tags_Per_Item. Includes TITLE!

echo ShowMETA('categories', $cPath, $languages_id); ?>

 

I replaced this instead.

 

<?php
if (isset($HTTP_GET_VARS['products_id'])){
// Randelia Custom_META_Tags_Per_Item. Includes TITLE!
echo ShowMETA('product_info', (int)$HTTP_GET_VARS['products_id'], $languages_id);
} else { 
// Randelia Custom_META_Tags_Per_Item. Includes TITLE!
echo ShowMETA('categories', $cPath, $languages_id);} ?>

 

I am using an old version of SEF. I think 1.3

Link to comment
Share on other sites

  • Replies 968
  • Created
  • Last Reply

Top Posters In This Topic

Hi BlueYon,

 

I would appreciate your help as I have followed your installation intructions twice over and I'm having troubles getting the product info section come up - it keeps going to product list i.e. index. I checked the source, and I can see the source of product_info.php is in fact included into index.php based on the presence of the product_id variable. And Ive tried to pint text within the condition but alas it never enters the condition...

 

//SEF BEGIN
 if (isset($HTTP_GET_VARS['products_id'])){


echo 'show product info';//<--- Never reaches here
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);

 } else {

 

 

I've read this thread but have come across no solutions, FYI im using version 1.8

 

Thank you in advance for any advice you or others may have :)

Edited by Richard Lee
Link to comment
Share on other sites

Help i get the following error when I try and add anything to my basket

 

Error!

 

Unable to determine the page link!

 

try it

 

I am also facing same error, However looking into this thread I only found this one facing the same but no solutino is there yet.

 

The actual thing is that.. I have latest ms2 oscommerce, first contrib being instaled is this SEF url one, here whenever I goto domain/shopping_cart.php then it shows..

 

---->

 

 

Error!

 

Unable to determine the page link!

 

 

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

 

Can anyone help me or guide that where could be the problem, I double / triple checked the modification I have done on files and all was fine.

..........

...........

Free Image Hosting : ImageTor.com

...........

........

Link to comment
Share on other sites

If you had Read through this support tread and you would have found the answer already...

 

Its related to setting Use Search Engine Friendly Urls to true in your shops admin, this does not work on many hosting/server set-ups.

 

If it does not work for you, you can eighter reconfigure your server, move to another hosting or you can simply not use this function and along with it this contribution.

 

There are plenty of other seo/sef url contributions which do not require you to set Use Search Engine Friendly Urls to True, to see some click on Seo & Sef Urls in my signature under.

1. You have an incorect cookie path setting in your includes/configure.php

 

2. go over the install again and check the mods you made in admin/includes/functions/general.php

 

Well.. I was looking at ur sig ..

So you mean need to change few settings on server, can you guide me what thing has to be modified.

..........

...........

Free Image Hosting : ImageTor.com

...........

........

Link to comment
Share on other sites

Does this contribution work on a windows IIS server?

 

I found many other seo contriubtions were not. I'm looking desparetely for one...

 

Any one who can help me out....

 

 

For Windows IIS there is only this one: cName & pName

Link to comment
Share on other sites

Hello,

 

I have installed the contrib. No errors so far but now i have two problems.

 

First:

 

it changed all my product stats into not available, and

 

Second:

 

The contrib shows all categories correctly but the products are shown like before. (....product_info.php/cPath/81/products_id/10296) for example.

 

Anyone any ideas what i can do/change?

Link to comment
Share on other sites

Does anyone have this contrib along with the Links Manager contrib? I am looking for something that will alter the Links Manager contrib to make the URLs more "Search Engine Friendly".

 

 

Hello,

 

I have installed the contrib. No errors so far but now i have two problems.

 

First:

 

it changed all my product stats into not available, and

 

Second:

 

The contrib shows all categories correctly but the products are shown like before. (....product_info.php/cPath/81/products_id/10296) for example.

 

Anyone any ideas what i can do/change?

Link to comment
Share on other sites

When I install this contribution I get this error:

 

Warning: Wrong parameter count for ltrim() in /home/sites/site84/web/includes/classes/url_rewrite.php on line 36

 

Warning: Wrong parameter count for trim() in /home/sites/site84/web/includes/classes/url_rewrite.php on line 36

 

Fatal error: Only variables can be passed by reference in /home/sites/site84/web/includes/classes/url_rewrite.php on line 36

 

Can anyone help me get rid of these problems?

Link to comment
Share on other sites

I haven't read the entire thread.

 

I followed the instructions perfectly and the contribution is working great. However, there were 4 files that didn't contain the

 

<title><?php echo TITLE; ?></title>

 

code...

 

They were:

 

check_out_process.php

download.php

popup_image.php

redirect.php

 

I left them alone. Is that the correct thing to do? Or should I add the code?

 

Please advise

A. Iber

Link to comment
Share on other sites

In step 6 of the v1.8 contribution it says:

 

Step #6 - In In /admin/includes/functions/general.php

Before code } (around line 956) add this code

@unlink(DIR_FS_CACHE . 'url.cache');

Note: This should be the at the end of the tep_reset_cache_block function

 

I'm confused at exactly what "code }" refers to. I have a modified general.php so my line 956 won't align with the instructions and just referring to "}" doesn't give enough insight as to where I'm supposed to put the code "@unlink(DIR_FS_CACHE . 'url.cache');"

 

Everything else went fine, just want to know where to put this last bit of code. Would appreciate any assistance.

 

Thanks

Link to comment
Share on other sites

After installing v1.8 I find that the "URL" description (shown when I mouse over the URL link) now is SEF, but when I click the link what is shown in the "address" bar in my browser is the old style url.

 

As an example, when I mouse over here's the URL display (did a copy of the shortcut):

http://www.yourwebhere.us/catalog/en/drives/toshiba

 

When I click the link I get this shown in the address bar:

http://www.yourwebhere.us/catalog/index.php?cPath=1_7

 

I did a scan through the support forum but didn't see this mentioned as to the cause (with hundreds of message I may have overlooked it).

 

Thanks

Link to comment
Share on other sites

AdrenalineFilms @ Jul 18 2005, 09:52 PM)

Would you be able to tell me how to do that? I'm a php rookie.

 

 

 

You would need to add in in the header tag contribution where it defines the headers for index.php

 

Somthing like:

 

if (isset(products_id)) {

 

your product_info.php header tags

 

} else {

 

your index.php header tags

 

}

i can't get this to work with header tags controller, what file specifically should be edited?

Link to comment
Share on other sites

if you want to remove the trailing slash:

 

in includes/classes/url_rewrite.php, look for:

return $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '/';

 

 

change to:

return $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'];

 

 

has anyone gotten this contribution to work with all manufacturers contribution?

for me, the urls' look like http://www.mysite.com//Manufacturer-Name

Link to comment
Share on other sites

for anyone using the all manufacturers contrib and you're having problems with the double slash like i was, here's the fix:

 

in includes/classes/url_rewrite.php, look for:

			$manufacturer_name = tep_db_fetch_array($manufacturer_query);
		$url_parts['path'] .= '/' . $this->prepare_url($manufacturer_name['manufacturers_name']);
		break;

 

change to:

			$manufacturer_name = tep_db_fetch_array($manufacturer_query);
		$url_parts['path'] .= '' . $this->prepare_url($manufacturer_name['manufacturers_name']);
		break;

 

 

now, i hope someone can help me merge this contrib with header tags controller :)

Link to comment
Share on other sites

after further tests i have determined the manufacturers (all-manufacturers page) OR the pull-down menu will produce duplicate content links for your product pages - i do not advise to use either of these if you're worried about duplicate content penalties with the search engines

Link to comment
Share on other sites

I'm using contribution "related_products_3_1" this contribution works from product_info.php since I'm using Seach Engine Friendly URL contribution have stop to work and I'm notice that SEF URL have stop to work with product_info.php

 

I will apreciate if somebody can help me with that, I will like too understand better how work SEF contribution.

Link to comment
Share on other sites

if a contribution requires any edits to product_info.php, you must do those edits in index.php instead... this sef module merges the two together.

Link to comment
Share on other sites

In "/admin/includes/functions/general.php" 
Before (around line 956):

 } 
Add this code (around line 956):

@unlink(DIR_FS_CACHE . 'categories_array.cache'); 
@unlink(DIR_FS_CACHE . 'manufacturers_array.cache'); 
@unlink(DIR_FS_CACHE . 'products_array.cache'); 
Note: Should be the reset cache function!

I don't get this part of the instructions.

My general.php has 1258 lines and has been modified before.

So "} (around line 956)" is not very helpful.

In which function is that? Can you please post some more code around it?

 

Thanks!

 

I got no tep_reset_cache_block function

 

Where did you find it? "around" line 956 i got this code:

946 // strpos()+1 to remove up to and including the first { which would create an empty array element in explode()
947		  $attributes = explode('{', substr($prid, strpos($prid, '{')+1));
948
949		  for ($i=0, $n=sizeof($attributes); $i<$n; $i++) {
950			$pair = explode('}', $attributes[$i]);
951
952			if (is_numeric($pair[0]) && is_numeric($pair[1])) {
953			  $attributes_ids .= '{' . (int)$pair[0] . '}' . (int)$pair[1];
954			} else {
955			  $attributes_check = false;
956			  break;
957			}
958		  }

 

i searched for the tep_reset_cache_block function in general.php, but it isn't there, even searched it in in includes/functions/cache.php and didn't find it

my general.php file version is v1.231 (i only found this function in older versions of this file ie. v1.160)

 

i am using OSC v2.2ms2

 

btw in SEF v1.8 install notes it states i should only copy this line

@unlink(DIR_FS_CACHE . 'url.cache');

not theese

@unlink(DIR_FS_CACHE . 'categories_array.cache');

@unlink(DIR_FS_CACHE . 'manufacturers_array.cache');

@unlink(DIR_FS_CACHE . 'products_array.cache');

 

also if i copy .htaccess to catalog directory i receive

Error 500!

 

/

Internal Server Error!

if i ovewrite the .htaccess with a blank file, site shows, links are in SEF form (http://domain.com/Hardware/DVD-Recordes/Some-DVD-Recorder/) , but they dont work, leading to 404 errors.

 

can anyone help?

Link to comment
Share on other sites

  • 2 weeks later...

Hi, This contribution is really great and thank you to everyone who worked and helped to make it done.

 

I have a small problem, my url for principal categories is like http://gh3.ro/gerovital/index.php/cPath/25 intead of http://gh3.ro/gerovital/Skin-Care/ , it is this ok??? you can see the problem on my site My Webpage

Please reply, is not verry urgent :D

 

Sorry for my english.

Link to comment
Share on other sites

I would love to install this mod on my site so that crawlers can get my product info. I'm confused as to what to install as on the contribs page I see several possible downloads. Which one gets installed first and then what's second?

Link to comment
Share on other sites

Hi

 

I installed the version 1.8 of this contribution and it seems to be working great. I have run into 2 problems though.

 

The first is that I cannot get the manufactures to list the same way as the other products. This isn't really too big a deal. I did download the new manufactures.php file, and that didn't seem to help either.

 

The bigger problem for me is that I added a new catagory (a couple actually, to test). The new catagories do not work.

 

If you look at www.custombytes.com/catalog you'll see my site. I added "Cards" over the weekend after installing this contribution, but it doesn't work. it should take you to http://custombytes.com/catalog/Cards/ which it does, but it shows the main page... rather than a page like this one http://custombytes.com/catalog/Scanner/

 

Any help is greatly appreciated!

 

Thank you!

Joe

Link to comment
Share on other sites

Well - I identified the problem for why some of my catagories aren't working... it has to do with the cache being on. I deleted everything in my cache folder and it allowed me to see the Cards. Now I have other directories that are giving me problems, but i'm sure if i get rid of the cache again, they'll work.

 

Anyone have an idea for a fix?

 

Hi

 

I installed the version 1.8 of this contribution and it seems to be working great. I have run into 2 problems though.

 

The first is that I cannot get the manufactures to list the same way as the other products. This isn't really too big a deal. I did download the new manufactures.php file, and that didn't seem to help either.

 

The bigger problem for me is that I added a new catagory (a couple actually, to test). The new catagories do not work.

 

If you look at www.custombytes.com/catalog you'll see my site. I added "Cards" over the weekend after installing this contribution, but it doesn't work. it should take you to http://custombytes.com/catalog/Cards/ which it does, but it shows the main page... rather than a page like this one http://custombytes.com/catalog/Scanner/

 

Any help is greatly appreciated!

 

Thank you!

Joe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...