Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

I've a question...

 

i'm using the SEO Mod Rewriting for a while but i would like to change few things in it.

 

I've tryed to do it myself, but can't solve the problem.

 

I've today some link for my product like :

 

"myproductsname-p-100.html?osCsid=xxxxx" assume that "100" is the Id of my product.

 

I would like to have something like

 

"myproductsname-prID-100.html?osCsid=xxxxx" so i've tryed this

case 'products_id':

      $rewrite_product = true;     

      if ( defined('PRODUCT_NAME_'.$p2[1]) ){

      $rewrite_page_product = short_name(constant('PRODUCT_NAME_'.$p2[1])) . '-prID-' . $p2[1] . '.html';

      } else { $seo = false; }

      break; 

   

 

and made the replacement in my .htaccess with

 

RewriteRule ^(.*)-prID-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

 

but as you can understand, it doesn't work, my server an't find the page i'm requested.

 

what did i miss ?

 

Thanks y advance for your help

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Hi all

 

First of all thanks for the great contrib and support you offer to the OSc community.

 

I am not a techie but trying to help my developers sort my site out - http://www.bombaybedspread.com

 

We are doing the final touches to our site and have a homepage which leads to the OScommerce section of the site. As part of this homepage we have links to different parts of the shop and categories.

 

We are getting a weird problem where 1 in 4 attempts the homepage links just don't work and lead to a error message - "the page cannot be displayed".

 

This happens randomly and so far we have not been able to find out what could be the issue.

 

Sometimes the links do two OScID - could it be related to this?

 

We are using the Ultimate SEO contrib on the site - could this be causing a conflict somewhere?

 

Any tips? All helps appreciated.

 

cheers

Link to comment
Share on other sites

hi chemo, hi community

 

I am hopelessly lost. I installed some minor contribs and made changes to the code, the HTC contrib was already a challenge for a noob like me but I finally did it,

 

SEO URLS is far too much for me, seemstoo work in the url but my shopping process gives me errrors e.g.

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/httpd/vhosts/funjumping.de/httpsdocs/shop/includes/functions/general.php on line 42

 

ok something with the charset, which can be done in admin I assume, bit I am lost.

doesn't happen on my local winxp install, but there I get another problem, which I accept to arouse on the testserver equally. after checkout success I loose the sid I think because I am directed to index php

 

the first prob (wraning see above) can be reproduced on the testserver here at http://funjumping.de/shop/

 

any help for a php-greenhorn from germany?

thx

dahui

Link to comment
Share on other sites

What a thread!

 

Guy's - I have been struggling with the installation of this mod for some time now. So much so that I now have a clean install with just this contrib.

I have set it up on my local IIS and on my host which is UNIX - I have the same problem on both platforms.

 

The admin seems to work Ok but if you click on a product or a category in the shop, you get the dreaded page not found message.

 

I have searched for a solution on this forum and come up with nothing, so any help would be well received! :thumbsup:

Link to comment
Share on other sites

  • 2 weeks later...

Hello, I was wondering if anybody could help me with x-sell, I started playing with the code, because it was not working with Ultimate SEO URLs v2.1.

 

It is important to start from the beginning I think. After I've installed SEO URLs, I was having this problem:

Let's say I had a product A where I was promoting, x-selling product B. When clicked on product's B "Buy Now" button, it should (and before SEO install it was) add product B in the basket. It was however adding product A - WRONG.

Link of image was showing:

http://www.originalabsinthe.com/absinthe-spoon-p-45.html

And Buy Now button was showing:

http://www.originalabsinthe.com/index.php?...&action=buy_now

 

Both product IDs were different!!

 

I noticed that there were 2 product_id's in the URL - for example:

index.php?cPath=21&products_id=56&action=buy_now&products_id=45

 

I was advised to get one of them out of the URL. In the X-SELL module I would need to change the tep_get_all_params() function to also add products_id.

 

That was the history so far and I think that SEO URLs just highlighted wrong code in x-sell module. So I started experimenting:

 

In /includes/modules/xsell_products.php I found this bit of code:

<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>');

and I changed it like this:

<a href="' . tep_href_link(FILENAME_DEFAULT, 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>');

You can see it here.

It seems to work but unfortunately there are two problems at the moment:

1/ on mouseover, you'll notice that both image and name of the product are displaying

http://www.originalabsinthe.com/absinthe-spoon-p-45.html

but the Buy Now button will display non SEO link:

http://www.originalabsinthe.com/index.php?products_id=45&action=buy_now

 

It wouldn't bother me that much, but it will get worse :angry:

 

2/ if you click Buy Now button -> it adds product in the basket :thumbsup: -> now try click on Continue Shopping and you'll receive this message:

 

"Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked." And I don't think that the problem is with SEO URLs. :'(

 

Perhaps somebody with better PHP knowledge could help to finish it? Otherwise it will take me another six months until I learn more php! :blink:

 

Thanks for your help. And I hope it may help others with X-sell and SEO installed because both are great contributions that will boost your sales (if we can make them work together).

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

  • 7 months later...

Hi,

 

I am trying to use ultimate SEO urls for Extra Pages Infobox Version 4.3. It seems to work with some mods.

It now makes an url like this: www.domain.com/information.php?pages_id=2 look like this: www.domain.com//test-2.html in the address line in my browser.

The thing is, that the links from other pages, to these information pages, when I look at the source of my pages, look like this: www.domain.com//information.php/pages_id/2

 

So I have been desperately trying to find the problem, without result. I hope somebody can help me out.

I will include the code that shows the links to the information pages.

 

In advance, thank you very much.

 

<?php

 

$page_query = tep_db_query("select

p.pages_id,

p.sort_order,

p.status,

s.pages_title,

s.pages_html_text,

s.intorext,

s.externallink,

s.link_target

from

" . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id

where

p.status = 1

and

p.page_type != 9

and

s.language_id = '" . (int)$languages_id . "'

order by

p.sort_order, s.pages_title");

 

 

?>

<!-- info_pages //-->

<tr>

<td class="smallText"><div align="center"><br>

<?php

 

$page_list = '';

 

$rows = 0;

 

while ($page = tep_db_fetch_array($page_query)) {

$rows++;

 

$target="";

if($page['link_target']== 1) {

$target="_blank";

}

 

$link = FILENAME_INFORMATION . '?pages_id=' . $page['pages_id'];

 

 

if($page['intorext'] == 1) {

$page_list .= '<a target="'.$target.'" href="' . $page['externallink'] . '">' . $page['pages_title'] . '</a> | ';

}

else {

$page_list .= '<a target="'.$target.'" href="' . tep_href_link($link) . '">' . $page['pages_title'] . '</a> | ';

}

}

$page_list .= '';

 

echo $page_list;

 

?>

</div></td>

</tr>

<!-- info_pages_eof //-->

 

------------------------------

and I added this line to my .htaccess:

RewriteRule ^(.*)-(.*).html$ information.php?pages_id=$2&%{QUERY_STRING}

Link to comment
Share on other sites

Hi Guys,

 

I know Bobbi is history here but hoping someobe else may have come accross this..

 

 

Shop worked fine with SEO urls. I imported about 8,000 products (still worked fine) then I deleted the SEO cache to configure the url paths correctly... now all I get after deleting cache:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2949120 bytes) in /home/virtual/site123456789/fst/var/www/html/tmp/ultimate_seo_cache/seo_english.cache(5758) : eval()'d code on line 5463

 

ANY IDEAS??? I even tried turning off the SEO but still same results.

 

 

Thanks.. KJ

Edited by Top_Speed

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

Hi Guys,

 

I know Bobbi is history here but hoping someobe else may have come accross this..

Shop worked fine with SEO urls. I imported about 8,000 products (still worked fine) then I deleted the SEO cache to configure the url paths correctly... now all I get after deleting cache:

ANY IDEAS??? I even tried turning off the SEO but still same results.

Thanks.. KJ

 

 

You either have to increase the allowed mempry for PHP script (if you have acess) or disable the cahce feature.

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

I got her figured out (finally). Anyone else that runs into this problem with a big shop....

 

I bumped the memory_limit in php.ini from 8MB to 32MB. This has solved the prob. Now my shop has over 12,000 prods with no error with the SE urls: Millers True Value

 

Thanks,

KJ

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

Hey Everyone,

 

I was wondering whether you might be able to help me.

 

I run OsCommerce with Chemo's Ultimate SEO URL?s v2.1d (the one that was on Chemo's forums - it was on OsCommerce but it got removed for licensing problems which have been fixed anyway).

 

Anyway, I have noticed that in my website logs, I have a huge amount of temporary 302 redirects, instead of them being permanent 301 redirects. I believe there are usually triple the amount of temporary redirects than there is permanent redirects. I think search engines are not liking this.

 

Does anyone know what could be causing it? I have not been able to confirm this, but maybe the titles of my products are changing slightly over time.

 

Do you know of any ways to fix this?

 

Any help is greatly appreciated.

 

You can check out my site here if you need to check anything with it: www.stonebridgecomputing.com.au

 

Cheers,

Chris :)

Edited by stonebridgecomputing
Link to comment
Share on other sites

  • 1 month later...

Hi everyone,

 

I have seen this question asked before, and expect many ppl have solved the issue themselves, but I could not find an answer, and am still learning php.

 

I am using Creloaded 6.15 and have installed chemo's SEO v2 for creloaded.

 

I use the preinstalled "easy populate basic" to export froogle feeds, and am now trying to get the products url within the feed to reflect the new SEO url.

 

 

Within easypopulate_basic.php there's the code:

 

if ($froogle_SEF_urls){

// if only one language

if ($num_of_langs == 1){

$row['v_froogle_products_url_' . $lid] = $froogle_product_info_path . '?cPath=' . $cPath . '&products_id=' . $row['v_products_id'];

} else {

$row['v_froogle_products_url_' . $lid] = $froogle_product_info_path . '?cPath=' . $cPath . '&products_id=' . $row['v_products_id'] . '&language=' . $epdlanguage_code;

}

} else {

if ($num_of_langs == 1){

$row['v_froogle_products_url_' . $lid] = $froogle_product_info_path . '?cPath=' . $cPath . '&products_id=' . $row['v_products_id'];

} else {

$row['v_froogle_products_url_' . $lid] = $froogle_product_info_path . '?cPath=' . $cPath . '&products_id=' . $row['v_products_id'] . '&language=' . $epdlanguage_code;

}

}

 

which i believe generates the url code, but I am unsure how to modify this to represent the new SEO urls - can anybody help???

 

Many, many thanks in advance to anyone who can help me with this.

 

Dan.

Link to comment
Share on other sites

Hi

 

I installed Ultimate_SEO_URLs_v2-2.2 on my shop http://butik.jocit.dk

 

Then on the last step of the install doc. it sais to call the shop so I did but, nothing, every thing look just as usual and nothing happend.

 

Then I tried to click a category and "404 File NOT found"

 

The requested URL /butik/index.php was not found on this server.

 

Can it have something todo with the .htaccess file?

I dident have one so I created one and put in the lines as disribet in the install doc.

In the line "RewriteBase /directory/" i deletet the directory and a slash so that it says

"RewriteBase /" I also tried /butik/ but it gives the same 404 error.

 

the path in the RewriteBase should that be the absolute server path?

 

For now I have turned SEO off so that my shop at least works.

 

I'm not a php programmer so I'm the perfect subject if I can install it with ease then every one should have the posibility.

 

cheers,

Jonas

Link to comment
Share on other sites

Hi

 

I installed Ultimate_SEO_URLs_v2-2.2 on my shop http://butik.jocit.dk

 

Then on the last step of the install doc. it sais to call the shop so I did but, nothing, every thing look just as usual and nothing happend.

 

Then I tried to click a category and "404 File NOT found"

 

The requested URL /butik/index.php was not found on this server.

 

Can it have something todo with the .htaccess file?

I dident have one so I created one and put in the lines as disribet in the install doc.

In the line "RewriteBase /directory/" i deletet the directory and a slash so that it says

"RewriteBase /" I also tried /butik/ but it gives the same 404 error.

 

the path in the RewriteBase should that be the absolute server path?

 

For now I have turned SEO off so that my shop at least works.

 

I'm not a php programmer so I'm the perfect subject if I can install it with ease then every one should have the posibility.

 

cheers,

Jonas

 

Rewrite Base is the path to your catalog directory (usually /catalog/).

To solve your SEO problem. Please turn off "Use Search-Engine Safe URLs (still in development)" in Admin-->Configuration-->My Store, as this is the OSC internal SEO attempt (set to false). Instead of that turn on Ultimate SEO in Admin-->Configuration-->SEO URLS (enable SEO URLs = true).

 

I hope this helps!

 

 

CU Nick

Edited by mightyx
Link to comment
Share on other sites

I've installed this Mod, and it works great, but having been thru 62 pages of support items for it, i'm wondering if this is coverered in another thread...

 

At the moment the urls are running as

 

gifts-novelties-c-25.html for example

 

I'm wondering if its possible to remove the last part of the url so it looks like this...

 

gifts-novelties.html

 

Its something to SEO company have suggested to improve the ranking of the site, and my boss is giving me grief to sort his one out.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

I've installed this Mod, and it works great, but having been thru 62 pages of support items for it, i'm wondering if this is coverered in another thread...

 

At the moment the urls are running as

 

gifts-novelties-c-25.html for example

 

I'm wondering if its possible to remove the last part of the url so it looks like this...

 

gifts-novelties.html

 

Its something to SEO company have suggested to improve the ranking of the site, and my boss is giving me grief to sort his one out.

 

Any help would be greatly appreciated.

 

Hey,

 

As far as I know, that is completely impossible with this contrib. The c-25 is the category name is the ONLY thing that links the SEO'd URL to the correct page on your website.

 

Google and other search engines will not penalise you at all by having the c-25 there because as far as they are concerned, it could be a part of your product name (and google don't know that you are using something to change your URLs like that).

 

Cheers,

Chris :)

Link to comment
Share on other sites

  • 2 weeks later...

I've installed Ulimate SEO URL's v2-2.2 and it's doing what it should, the only problem seems to be that it's "broken" my product notifications in checkout_success.php.

 

As a customer I can select the product notifications option from the Notifications Box on the product_info pages and that shows in my account.

 

But when I buy a product and select the product notifications option check box on the checkout_success pages it doesn't show in my account.

 

 

product_notifications works fine - adds the notification to my acount:

 

 

$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_NOTIFICATIONS);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'));

if (tep_session_is_registered('customer_id')) {
  $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int)$customer_id . "'");
  $check = tep_db_fetch_array($check_query);

  $notification_exists = (($check['count'] > 0) ? true : false);
} else {
  $notification_exists = false;
}

$info_box_contents = array();
if ($notification_exists == true) {
  $info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></td></tr></table>');
} else {
  $info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></td></tr></table>');

 

 

checkout_success looks as though it is working (no error codes) when I check the product notification box but it does not add the notification to my account:

 

 

if ($global['global_product_notifications'] != '1') {
echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

$products_displayed = array();
for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
  if (!in_array($products_array[$i]['id'], $products_displayed)) {
	echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
	$products_displayed[] = $products_array[$i]['id'];
  }
}

echo '</p>';
 } else {
echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }

 

I can see that the two blocks of code are different but can anyone give me a steer on what I should check/change?

Link to comment
Share on other sites

Anyone getting this Error rom the latest version 2.2.2 package? Is there a fix?

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ...... path \catalog\includes\classes seo.class.php on line 115

 

The line is:

 

function FetchArray($resource_id, $type = MYSQL_BOTH) {

return mysql_fetch_array($resource_id, $type); <-- LINE 115 ERROR

} # end function

 

My previous version 2.1c did not throw this error and that line looked like this:

 

return @mysql_fetch_array($resource_id, $type); ... it had an @ symbol before mysql

 

I tried putting it in the new version but still same error.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

i'm using following contribs :

 

1. http://www.oscommerce.com/commuGoogle XML Sitemap Feed v1.3 from 5 Jun 2005

 

and

 

2. Ultimate SEO URLs 2.2 Nventa 8 Apr 2006

 

and i cannot get this two contribs working together. The links are mod-rewrited in shop (see here) and i get no error. Also the sitemaps are generated BUT the links are not SEO (product id NOT product name)

 

Sorry for my english but the 'working' example you can see here.

 

Does anyone know a solution/fix or know a working combination of these two contribs?

 

 

Best Regards

 

Adam Piotrowski

netCart

Poland

Link to comment
Share on other sites

Hi,

 

i'm using following contribs :

 

1. http://www.oscommerce.com/commuGoogle XML Sitemap Feed v1.3 from 5 Jun 2005

 

and

 

2. Ultimate SEO URLs 2.2 Nventa 8 Apr 2006

 

and i cannot get this two contribs working together. The links are mod-rewrited in shop (see here) and i get no error. Also the sitemaps are generated BUT the links are not SEO (product id NOT product name)

 

Sorry for my english but the 'working' example you can see here.

 

Does anyone know a solution/fix or know a working combination of these two contribs?

Best Regards

 

Adam Piotrowski

netCart

Poland

 

Try using Ultimate SEO URL's 2.1d (Chemo's official one that was uploaded by myself in the contrib area).

 

Also, try replying in the other Ultimate SEO URLs thread here: http://www.oscommerce.com/forums/index.php?showtopic=154166

 

Regards,

Chris

Link to comment
Share on other sites

Hi,

 

I installed the Ultimate SEO URLs v2.2.2 adn have 2 problems that hopes someone can help me to fix it:-

 

1. If I choose the "Enable automatic redirects?" to "false" on the SEO URL in admin control panel, then, it is working. Otherwise, it doesn't work, why?

 

2.In the "product listing" page, The hyper-link in "product name" is not work, but the link in image is working.

Where can i find the code for that link and how can i fix it?

 

here is one of the link on my website for your reference:-

http://www.monstech.com/bluetooth-h...2bd0446b469c11a

 

The link on the image is working correctly:-

http://www.monstech.com/bluetrek-wa...2bd0446b469c11a

 

The link on the product name is not work:-

[/url]http://www.monstech.com/product_inf...2bd0446b469c11a[/url]

Link to comment
Share on other sites

Hi guys can you tell me what is the best version, i want install but i dont no what is the version have the full package.

 

thanks

 

Hey,

 

Install Chemo's Official 2.1d that I put in the contrib area. I use it and it works well.

 

I haven't used any of the other versions that have been put in there, so I dont know what they are like.

 

Cheers,

Chris

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