Jump to content
Chemo

[Contribution] Ultimate SEO URLs - by Chemo

Recommended Posts

I have a recommendation but no clue how to implement it:

 

I believe there needs to be some sort of translation for superscripts. I have an item as follows:

 

Xircom? RealPort? BNC Cable Accessory Kit

 

and the url rewrite shows up like this:

 

xircom%C2%AE-realport%E2%84%A2-bnc-cable-accessory-kit-p-7.html

 

Similiar situation with the CNAME version as well.

Share this post


Link to post
Share on other sites
Hi All,

 

I have had this great contrib installed and running for over a month now, and it has worked great.  I have added new products and sub-catagories and the URL's have always been generated correctly.

I added a couple of new sub-cats earlier this week and added products to them.  I also added some new products to some old cats.  The new sub-cats, and all the new products added are not generating the pName and cName URLs.

Correct:

 

http://www.kmlscorner.com/product_info.php...-tommy-hilfiger

New product added:

 

http://www.kmlscorner.com/product_info.php...products_id=237

This has just begun happening as I have been adding new products all along and have not seen this happening.

 

I must have to fix something somewhere, but I have no idea of where to begin.  If anyone has seen this happen and knows how to correct it, I would appreciate your help. 

 

Thanks in advance!

 

 

Did you clear the categories cache? It helped me when I first installed the mod and couldn't get the category box links to work.

Share this post


Link to post
Share on other sites

Nevermind on my suggestion in Post 1101..turns out to be a Mozilla Firefox & Netscape thing...it displays the superscripts just fine in IE and Opera.

Share this post


Link to post
Share on other sites

I have a concern with the Froogle contribution. When I have this SEO mod turned on, the old links no longer work. I will need to update the Froogle file to output a new url. Currently the file uses this:

 

SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url,

 

How can it be modified to reflect the new url style?

 

OR if I installed the mod incorrectly, please tell me how to get the old links to work concurrently and Froogle will not be an issue.

Share this post


Link to post
Share on other sites

Hi everyone,

 

I have just installed this great contribution and everything seems to be working so far. I have one small request. Is there anyway to change the following:

 

from

http://www.mydomain.com/about_us.php

 

into

http://www.mydomain.com/about_us.html

 

I am not familiar with Apache and Mod rewrite, but I believe this can be done. Any help would be greatly appreciated.

 

Thank you in advance. :D

Share this post


Link to post
Share on other sites

That would be a good idea...getting all links to look the same whether using CNAME or rewrite - not so much for the engines but moreso for uniformity.

Share this post


Link to post
Share on other sites

You beat me to it. Just found it myself. Was posting my own answer! Silly cow

 

Not so silly at all JoeMcManus! Thanks to your posts Post #185 & #187 & 189 I was able to figure out what I had done wrong (same as you!)

 

Chemo, thanks for a great contribution! The only one out of 4 I've tried that actually works for me!

Share this post


Link to post
Share on other sites

I do have one question, though. How would I change this line:

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'pName')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

so it would add the item to the shopping cart (instead of going to the product page) when the BUY NOW button is clicked?

Share this post


Link to post
Share on other sites
Hi everyone,

 

I have just installed this great contribution and everything seems to be working so far. I have one small request. Is there anyway to change the following:

 

from

http://www.mydomain.com/about_us.php

 

into

http://www.mydomain.com/about_us.html

 

I am not familiar with Apache and Mod rewrite, but I believe this can be done. Any help would be greatly appreciated.

 

Thank you in advance. :D

 

Yep. There sure is.

 

RewriteRule ^about_us.php /about_us.html

Share this post


Link to post
Share on other sites
Yep. There sure is.

 

RewriteRule ^about_us.php /about_us.html

 

 

Hi Paul,

 

I have tried the above and it did not work. I have the following error:

HTTP 404 Not Found. The page cannot be found.

 

Any ideas?

Share this post


Link to post
Share on other sites

The form action for where the page goes is set through the admin control panel.

 

AdminCP -> Configuration -> MyStore -> Display Cart After Adding Product -> true (or false)

 

Thanks Bobby, I appreciate your response but that wasn't the problem.

 

When the list of items comes up in a category (in the product_listing.php) module, it shows the BUY NOW buttons next to the items in the list.

 

If a person were to click that, they would be taken to a page that describes the item. In otherwords, BUY NOW is not actually allowing the customer to BUY NOW but rather to VIEW item.

 

 

So what would be changed in the code that would place the item in the cart?

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'pName')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

Hope I explained that ok.

Share this post


Link to post
Share on other sites

Not sure where your problem is Cindy....my Buy Now button goes right to the cart. :blink:

 

BTW Cindy... does this sound familiar:

 

never fear the neg!

 

;)

Share this post


Link to post
Share on other sites

Approximately line 175:

 

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'pName')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

break;

 

That's what mine looks like. Try a copy n paste of my code. See if it helps. I'm too tired to note a difference if there even is one.

Share this post


Link to post
Share on other sites
I don't understand this at all.  lol.  Where do these types of changes/definitions/whatever get made?

In your .htaccess file.


Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Share this post


Link to post
Share on other sites
QUOTE(montytx @ Apr 22 2005, 12:15 AM)

I have had this for a few months and everytime I add catagories or to my catalog they do not show up in the title. I have reset the cache several time and even installed and unistalled the Seo-cache.php peice. Any other ideas?

 

Thanks

*

 

 

 

 

Did you install the code in categories.php to reset cache?

 

if so - Have you checked the cache tables to make sure you are dumping them?

 

I double checked the admin/ general file and discovered that I did not copy the correct code. So I fixed the error being generated in the admin screen. But I do not seem to be able to reset the cache for the new items I have added to my store. It defaults back to the old method. I have tried to reset the cahe for the store several times and nothing seems to be happening. I am nnot a php expert so I am not sure how to dump the cache values in the db. Any suggestions?

Share this post


Link to post
Share on other sites

BTW Cindy... does this sound familiar:

 

never fear the neg!

 

LOL! For some reason, why, yes, Yes it does! Hey there!

 

Your code and my code are exactly the same. I don't understand why my BUY NOW is taking the customer to the View item and not right to the cart like it should. Grrr!

 

I might could figure this out if I knew how all these files were related.

 

I wish there was some kind of chart that visually pointed out which files are being accessed by each other file. Trying to figure this out is like putting together a 1,000,000 piece puzzle.

 

Guess I get to go back and open up each file to find the needle in the haystack.

Isn't there an easier way?

Share this post


Link to post
Share on other sites

Ok, my BUY NOW buttons are still not placing the product in the cart when clicked.

 

I've finally found what I *think* might be the problem in html_output.php.

 

  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

$seo = ( defined('SEO_URLS') ? SEO_URLS : false );
$seo_rewrite_type = ( defined('SEO_URLS_TYPE') ? SEO_URLS_TYPE : false );
$seo_pages = array('index.php', 'product_info.php');
if ( !in_array($page, $seo_pages) ) $seo = false;

 

It seems the $seo_pages array doesn't have the shopping cart page listed.

 

Sooo...if I put 'shopping_cart.php' into the $seo_pages array, will that will fix my problem or will I be messing something up?

Share this post


Link to post
Share on other sites

It seems the $seo_pages array doesn't have the shopping cart page listed.

 

Sooo...if I put 'shopping_cart.php' into the $seo_pages array, will that will fix my problem or will I be messing something up?

 

No, that can't be right. That would just make the shopping cart pages become SE friendly. Let me keep looking for an answer. < sigh >

Share this post


Link to post
Share on other sites

ok, went to a vanilla install and the BUY NOw button still goes to the product_info.php page, so this is probably not a problem with SEO. I'll quit posting here.

Share this post


Link to post
Share on other sites

For reference in case someone else runs across this "problem":

I found out elsewhere that my osCommerce is working perfectly.

 

Thanks to Jumping Rabbit for this clarification:

 

If the product has attributes, the buy now will take you to the product page.

If the products do not have attributes, it will add the selected product to the shopping cart.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×