Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Yes

 

Well if it is a @nix server ( not Windows ) has mod_rewrite module in apache and RewriteBase is set correctly then USU5 always works.

Link to comment
Share on other sites

What is the file usu_cache.db-journal and why does it show up in my \cache_system\sqlite folder? It has zero-length and zero permissions(!) but when it shows up, my store breaks with this error:

 

Fatal error: Call to a member function fetch() on a non-object in /users/MYDOMAIN.com/htdocs/store/catalog/includes/modules/ultimate_seo_urls5/main/usu5.php on line 308

 

 

 

I wrote about this problem before and in the meantime discovered that this file is what breaks the store (I delete it and everything works again) but I still haven't heard from anybody here about what is the source of this problem. I really cannot allow it to keep happening as it breaks my store.

 

Any help?

Link to comment
Share on other sites

Installed this, works great but now seen an error on all pages

 

Fatal error: Call to a member function store() on a non-object in (in the top right)

 

**includes/modules/ultimate_seo_urls5/main/usu5.php on line 78 (at the footer)

 

Any ideas how I can fix this? using the latest version from yesterday

Link to comment
Share on other sites

Hi Robert,

 

I've been using your USU5 with RC2a for a while now, and it's worked wonderfully for me.

 

I was wondering if you could comment on the rel="canonical" tag for product pages.

 

It's easy enough to add the tag to the home page, but putting it on product page is a bit more complicated it seems.

 

Google's instructions aren't particular clear to me: http://www.google.com/support/webmasters/bin/answer.py?answer=139394

 

You'd talked about it briefly last summer in posts 159-160 here: http://www.oscommerce.com/forums/topic/330479-what-is-the-oscsid-why-you-must-not-loose-it/page__st__140

 

As an aside, I did read your rebuttal to this thread with interest and now force cookies on the site, and seems to work well.

 

Spooks also gave an example back in 2009 in post 8 here: http://www.oscommerce.com/forums/topic/329838-canonical-tag-implementation/

 

I'm not even sure that I need this tag, but Google seems to require it if you want to have any hope of getting rich snippets in your search results:

http://www.google.com/support/merchants/bin/request.py?contact_type=rich_snippets

 

 

Thanks for all the help

Link to comment
Share on other sites

Hello!

I hate to do this, but I just don't see this:

 

2) catalog/index.php

 

Find ( this is within a block of code ) ...

 

tep_draw_form('filter', FILENAME_DEFAULT, 'get')

Replace with ...

 

tep_draw_form('filter', tep_href_link( FILENAME_DEFAULT ), 'get')

 

I don't see this anywhere in the index.php that I'm working on. Do you have any ideas for me?

Link to comment
Share on other sites

The instructions also say that you may not have that code. It is also possible that you have a variant of it.

 

The default 2.2 store uses a simple link for the Buy Now button. Many store owners replace that with a form so that search engines don't follow it. Perhaps you have not done this or have removed the Buy Now button.

 

If you do have a Buy Now button, show us the code for it and we can advise further.

Link to comment
Share on other sites

Thank you so much for replying! I'm sorry that I'm lost, I was asked to help with this, even though I'm not the one who originally put the site together. This is what the current index.php file has in it:

 

 

 

<?php

require('includes/application_top.php');

$content = array();

$content = tep_content_data('1');

 

?>

<?php require(DIR_WS_INCLUDES . 'template_top.php'); ?>

<link href="/css/number_slideshow.css" rel="stylesheet" type="text/css"></link>

<script type="text/javascript" src="/js/number_slideshow.js"></script>

 

<!--left column starts-->

<div class="leftColumn">

<div id="banner">

<script language="javascript" type="text/javascript">

$(function() {

$("#number_slideshow").number_slideshow({

slideshow_autoplay: 'enable',//enable disable

slideshow_time_interval: '3000',

slideshow_window_background_color: "#ffffff",

slideshow_window_padding: '0',

slideshow_window_width: '713',

slideshow_window_height: '264',

slideshow_border_size: '0',

slideshow_border_color: 'black',

slideshow_show_button: 'enable',//enable disable

slideshow_button_text_color: '#ffffff',

slideshow_button_background_color: '#3b3f35',

slideshow_button_current_background_color: '#ababab',

slideshow_button_border_color: 'none',

slideshow_button_border_size: '0'

});

});

</script>

 

 

<div id="number_slideshow" class="number_slideshow">

<ul>

<li><a href="#"><img src="images/banner-1.jpg" width="713" height="264" alt="slideshow_large"/></a></li>

<li><a href="#"><img src="images/banner-2.jpg" width="713" height="264" alt="slideshow_large"/></a></li>

<li><a href="#"><img src="images/banner-3.jpg" width="713" height="264" alt="slideshow_large"/></a></li>

<li><a href="#"><img src="images/banner-4.jpg" width="713" height="264" alt="slideshow_large"/></a></li>

</ul>

<ul class="number_slideshow_nav">

<li><a href="#">1</a></li>

<li><a href="#">2</a></li>

<li><a href="#">3</a></li>

<li><a href="#">4</a></li>

</ul>

<div style="clear: both"></div>

</div>

 

</div>

 

<?php require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_FEATURED);?>

 

<a href="contact_us.php"><img src="images/do-you-have-any-question.jpg" alt="" border="0" align="left" /></a>

<img src="images/spacer.gif" alt="" height="98" width="10" align="left" />

<a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>"><img src="images/special-offer-at-lifemed.jpg" alt="" border="0" align="left" /></a>

 

<?php require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_TOP_SELLING);?>

</div>

<!--left column ends-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

 

 

<?php require(DIR_WS_INCLUDES . 'template_bottom.php'); ?>

 

Do you see anything I should edit in this file?

Another hassle is that the template has the version number scrubbed from it, so I'm not positive what version it is. It was supposedly just created a few weeks ago though, so I'm assuming it's the latest version.

Link to comment
Share on other sites

Oh, you're using a template system. Well, you'll have to look at the FILENAME_PRODUCT_LISTING_FEATURED file in the includes/modules directory to see what, if any, code you need to change. In general with templates, all the standard add-on instructions go out the window and you have to hunt down where the code is.

Link to comment
Share on other sites

I need some urgent help here please. I just installed this, and all seems to be working fine re. urls. HOWEVER, each time you go into a product it says "ITEM IS SOLD", which is not at all the case. It is happening with every product. Can someone please help asap

My website iswww.nontando.com

Link to comment
Share on other sites

I need some urgent help here please. I just installed this, and all seems to be working fine re. urls. HOWEVER, each time you go into a product it says "ITEM IS SOLD", which is not at all the case. It is happening with every product. Can someone please help asap

My website iswww.nontando.com

 

I haven't a clue what your "item is sold" contribution is but USU5 creates urls, nothing else .. perhaps post in the support topic of the other contribution.

Link to comment
Share on other sites

Hi Robert,

 

I've been using your USU5 with RC2a for a while now, and it's worked wonderfully for me.

 

I was wondering if you could comment on the rel="canonical" tag for product pages.

 

 

Hi nick

 

The support thread for USU5 isn't really the place, I don't mind commenting on it elsewhere however.

Link to comment
Share on other sites

I haven't a clue what your "item is sold" contribution is but USU5 creates urls, nothing else .. perhaps post in the support topic of the other contribution.

 

Robert, I did not install any other contribution. When you click on a product to view the details, I have a message "THIS ITEM IS SOLD". This normally happens when quantity = 0 for that product. I have just installed your contr. - nothing else, and I have never had this issue.

 

I have checked my admin, the quantities are correct there, i.e. all are equal or greater than one.

Edited by bksbeat
Link to comment
Share on other sites

Robert, I did not install any other contribution. When you click on a product to view the details, I have a message "THIS ITEM IS SOLD". This normally happens when quantity = 0 for that product. I have just installed your contr. - nothing else, and I have never had this issue.

 

I have checked my admin, the quantities are correct there, i.e. all are equal or greater than one.

 

USU5 has nothing to do with quantities and has no known issues, also osCommerce does not have the functionality "THIS ITEM IS SOLD" so I can't help as.

 

a] I can't replicate any issue

b] It is non standard code

c] USU5 has nothing at all to do with quantities

Edited by FWR Media
Link to comment
Share on other sites

What is the file usu_cache.db-journal and why does it show up in my \cache_system\sqlite folder? It has zero-length and zero permissions(!) but when it shows up, my store breaks with this error:

 

Fatal error: Call to a member function fetch() on a non-object in /users/MYDOMAIN.com/htdocs/store/catalog/includes/modules/ultimate_seo_urls5/main/usu5.php on line 308

 

 

 

I wrote about this problem before and in the meantime discovered that this file is what breaks the store (I delete it and everything works again) but I still haven't heard from anybody here about what is the source of this problem. I really cannot allow it to keep happening as it breaks my store.

 

Any help?

 

Looks like sqlite crashes on your server for some reason .. change the cache strategy to file or database.

Link to comment
Share on other sites

USU5 has nothing to do with quantities and has no known issues, also osCommerce does not have the functionality "THIS ITEM IS SOLD" so I can't help as.

 

a] I can't replicate any issue

b] It is non standard code

 

 

I have has this message appear whenever a quantity = 0 and the product status is still true. That has been the case, ever since I installed OSC.

 

c] USU5 has nothing at all to do with quantities

Link to comment
Share on other sites

Robert, I have never ever changed code re. message and installed OSC many years ago. I have always has this message appear when the status of a product is true and the quantity = 0. I am not blaming anything on you, I love this contribution, and love what is happening with the url's but I am 100% this problem is related to this install. It could have nothing to do with your code, maybe I did something wrong when copying the code into the programs. I am trying to see what I may have done, otherwise I will reinstall my original code and lose this install, but I will have no choice.

 

I just found where the message is coming from. In admin under config > stock

there is an option called "mark product out of stock". I have that value set as sold. And it says

under the edit button

Display something on screen so customer can see which product has insufficient stock

 

Date Added: 05/10/2006

Last Modified: 07/28/2008

Edited by bksbeat
Link to comment
Share on other sites

Robert, I have never ever changed code re. message and installed OSC many years ago. I have always has this message appear when the status of a product is true and the quantity = 0. I am not blaming anything on you, I love this contribution, and love what is happening with the url's but I am 100% this problem is related to this install.

 

There is one thing .. and only one thing affected by USU5 in osCommerce and that is URLs via the tep_href_link() wrapper function.

 

If you have made code mistakes or whether or not you have a contribution installed that is breaking is really not the point, it is a localised issue and not a USU5 bug so I can't help you in this support thread.

Edited by FWR Media
Link to comment
Share on other sites

There is one thing .. and only one thing affected by USU5 in osCommerce and that is URLs via the tep_href_link() wrapper function.

 

If you have made code mistakes or whether or not you have a contribution installed that is breaking is really not the point, it is a localised issue and not a USU5 bug so I can't help you in this support thread.

 

 

I have just copied back to my server the original code. And all is working again - www.nontando.com

I dont know - I did install kiss meta tags a few weeks ago and perhaps there is some conflict. Oh well! Thanks again

This is what I had installed. I did noticed that there was another wrapper function, i.e. The HTML form submit button wrapper function, below the code that needed to be installed. I am not sure if that is normally there.

 

 

 

/**
 * ULTIMATE Seo Urls 5 PRO by FWR Media
 * Replacement for osCommerce href link wrapper function
 */
 require_once DIR_WS_MODULES . 'ultimate_seo_urls5/main/usu5.php';

 function tep_href_link( $page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true ) {
   return Usu_Main::i()->hrefLink( $page, $parameters, $connection, $add_session_id, $search_engine_safe );
 } 


// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }
if ($image_size = @getimagesize($src)) {
     if ((CONFIG_CALCULATE_IMAGE_SIZE == 'true' && $src != DIR_WS_IMAGES . 'pixel_black.gif' && $src != DIR_WS_IMAGES . 'pixel_trans.gif' && $src != DIR_WS_IMAGES . 'pixel_silver.gif' )) {
	if ( ($width) || ($height) ) {
		if ( $width=="100%" ) {
		  $width = $image_size[0];
		} elseif ( $height=="100%" ) {
		  $height = $image_size[1];
		} elseif ( $width==0 ) {
		  unset($width);
		} elseif ( $height==0 ) {
		  unset($height);
		}
		$src=thumbimage(DIR_FS_CATALOG . '/' .$src, $width, $height, 1, 1, DIR_FS_CATALOG . '/' . DIR_WS_IMAGES . 'imagecache');
		if ((($image_size[1]/$height) > ($image_size[0]/$width) ) && $height>0){
			 $width=ceil(($image_size[0]/$image_size[1])* $height);
		} elseif ($width>0) {
			 $height=ceil($width/($image_size[0]/$image_size[1]));
		}
	}
	  }
     } elseif (IMAGE_REQUIRED == 'false') {
       return '';
     }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }


   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

Edited by bksbeat
Link to comment
Share on other sites

Very nice and cleaver contribution. Installation went easy following the included instructions and everything works fine, excepted the sitemap generation. I have a multilanguage - 4 languages - shop. Products and categories have different names in each language. urls are well formated on site but sitemaps allthough the detect the language, they serve the first met language names. I try to be more clear with an exemple, lets say:

 

category_id : 21

category's german name: bücher

category's english name: books

category's french names: livres

on site urls :

http://mysite/de/bücher-c-21.html

http://mysite/books-c-21.html

http://mysite/fr/livres-c-21.html

 

Sitemaps

http://mysite/de/bücher-c-21.html

http://mysite/bücher-c-21.html

http://mysite/fr/bücher-c-21.html

 

It seems like the Usu5_Bootstrap::i()->bootStrapper( $lng ) doesn't initiates correctly but I am not able to fix it not to track something through the objects. Any help greatly welcome.

Link to comment
Share on other sites

I have just copied back to my server the original code. And all is working again - www.nontando.com

I dont know - I did install kiss meta tags a few weeks ago and perhaps there is some conflict. Oh well! Thanks again

This is what I had installed. I did noticed that there was another wrapper function, i.e. The HTML form submit button wrapper function, below the code that needed to be installed. I am not sure if that is normally there.

 

 

 

/**
 * ULTIMATE Seo Urls 5 PRO by FWR Media
 * Replacement for osCommerce href link wrapper function
 */
 require_once DIR_WS_MODULES . 'ultimate_seo_urls5/main/usu5.php';

 function tep_href_link( $page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true ) {
   return Usu_Main::i()->hrefLink( $page, $parameters, $connection, $add_session_id, $search_engine_safe );
 } 


// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }
if ($image_size = @getimagesize($src)) {
     if ((CONFIG_CALCULATE_IMAGE_SIZE == 'true' && $src != DIR_WS_IMAGES . 'pixel_black.gif' && $src != DIR_WS_IMAGES . 'pixel_trans.gif' && $src != DIR_WS_IMAGES . 'pixel_silver.gif' )) {
	if ( ($width) || ($height) ) {
		if ( $width=="100%" ) {
		  $width = $image_size[0];
		} elseif ( $height=="100%" ) {
		  $height = $image_size[1];
		} elseif ( $width==0 ) {
		  unset($width);
		} elseif ( $height==0 ) {
		  unset($height);
		}
		$src=thumbimage(DIR_FS_CATALOG . '/' .$src, $width, $height, 1, 1, DIR_FS_CATALOG . '/' . DIR_WS_IMAGES . 'imagecache');
		if ((($image_size[1]/$height) > ($image_size[0]/$width) ) && $height>0){
			 $width=ceil(($image_size[0]/$image_size[1])* $height);
		} elseif ($width>0) {
			 $height=ceil($width/($image_size[0]/$image_size[1]));
		}
	}
	  }
     } elseif (IMAGE_REQUIRED == 'false') {
       return '';
     }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }


   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

 

 

I removed this code from product_info and it seems to be working fine now.

<td class="main" align="right">
<?php if(tep_get_products_stock($products_id) > 0 )
{
echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
}else{
echo ("<p><FONT SIZE=5>THIS ITEM IS SOLD</FONT>");
}
?></td

Link to comment
Share on other sites

I removed this code from product_info and it seems to be working fine now.

 

Glad you got it working .. but that code has nothing to do with USU5

Link to comment
Share on other sites

Glad you got it working .. but that code has nothing to do with USU5

 

Thanks Robert and thanks for your patience. Just one quick question. If you place your mouse over a certain category, is that suppose to be reflected in the url? I thought I had read that somewhere in this forum. As that aint happening with my site, ie. www.nontando.com

 

I will take a look at the admin options, and see if there is anything that could be beneficial to improve things.

On of the things I want to remove is product_info appearing in the url very time you select a product.

- Just noticed in your doc, to remove index.php & product_info.php from appearing in the utl it requires a mod rewrite.

Otherwise, it is great - Thank you so much, Gary

Edited by bksbeat
Link to comment
Share on other sites

If you correctly use tep_href_link to form URLs for links, then they should always have the SEO style. You'd have to look at the PHP code to diagnose that - looking at the web site wouldn't help.

Link to comment
Share on other sites

If you correctly use tep_href_link to form URLs for links, then they should always have the SEO style. You'd have to look at the PHP code to diagnose that - looking at the web site wouldn't help.

 

Thanks Steve - Looks like everything else is working and it is probably html_output.php but It aint the end of the world. It is still alot better than it was before.

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