Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

seo simple contribution


Recommended Posts

This is a nice contribution, simple, but nice all the same. I've managed to impliment everything into my site except the following code which should remove the cpath from the links:

 

6.Remove (get rid) the cpath from the link to the product. your product link will be without the cpath.

this is very important because there are cases the link to the product is without cpath (case: new products). Than you have different links to the same product - duplication = Bad Seo !

 

* ~Line 100 Find:

		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

* Replace with:

		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

* ~Line 128 Find:

		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

* Replace with:

		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';


($cPath ? 'cPath=' . $cPath . '&' : '') .

 

Basically my product listings are blank when I try and add the code. Can anyone help with this.

 

Cheers

Link to comment
Share on other sites

  • 11 months later...

Hello everybody,

 

I tried to install this contribution ( seo_simple_contribution_v0.7 ) also but seem to have two problems.

1 - I could make all the nesseserry changes provided in the readme file wit the exception of the very last part:

 

Go to admin/includes/function/general.php

* ~Line 868 Find:

delete the folowing lines:

   if ($sortby) {
     $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">' ;
     $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
   }

 

My "admin/includes/function/general.php" does not have any of the code described above

 

2 - I am keeping the long URL's like: "shop-url-here/shop/index.php?cPath=49&osCsid=fe8fd32f6996e31a4ce950e3d2276b38" and "shop-url-here/shop/index.php?cPath=49"

 

The content of my ".htaccess" file is:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^url-of-my-shop-here.nl [nc]
rewriterule ^(.*)$ [url="http://www.url-of-my-shop-here.nl/$1"]http://www.url-of-my-shop-here.nl/$1[/url] [r=301,nc]

<IfModule mod_setenvif.c>
 <IfDefine SSL>
   SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
 </IfDefine>
</IfModule>

 

The location of my ".htaccess" file is: url-of-my-domain.nl/shop/.htaccess

But eaven if i delete the .htaccess completely nothing changes...

The changes witch I could not make in the "general.php" should not be the reason it's no working at all I guess.

I know something goes wrong but just can't figure out what.

 

Any help would be greatly appreciated

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