Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

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.

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
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.

Link to comment
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

Link to comment
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!

Link to comment
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?

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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)

}

Link to comment
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?

Link to comment
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?

Link to comment
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?

Link to comment
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 >

Link to comment
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.

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