Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic generation of URLs?


danic

Recommended Posts

I'm using SEO-G that provides automatic generation of URLs, this contribution googlexml_sitemap_seo don't support this.

I get results like this: product_info.php?products_id=68

 

Is it OK (In the name of SEO) to submit it to google, or should I update the XML with my SEO-G names?

Edited by danic

I'm the owner of a danish gift shop, where you will find gifts, ideas & presents for her & him.

Link to comment
Share on other sites

You should only have one URL per page for Google purposes. I would recommend updating the XML. It looks like you could just change

	function hrefLink($page, $parameters, $connection, $add_session_id) {
	if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) {
		return tep_href_link($page, $parameters, $connection, $add_session_id);
	} else {
		return $this->base_url . $page . '?' . $parameters;
	}
} # end function

to

	function hrefLink($page, $parameters, $connection, $add_session_id) {
	return tep_href_link($page, $parameters, $connection, $add_session_id);
} # end function

and it would work.

Always back up before making changes.

Link to comment
Share on other sites

You should only have one URL per page for Google purposes. I would recommend updating the XML. It looks like you could just change
	function hrefLink($page, $parameters, $connection, $add_session_id) {
	if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) {
		return tep_href_link($page, $parameters, $connection, $add_session_id);
	} else {
		return $this->base_url . $page . '?' . $parameters;
	}
} # end function

to

	function hrefLink($page, $parameters, $connection, $add_session_id) {
	return tep_href_link($page, $parameters, $connection, $add_session_id);
} # end function

and it would work.

 

If I make the change, then I get this error: PHP Fatal error: Call to undefined function tep_href_link()

If I turn the code back, then it works again, strange as it the same function.

I'm the owner of a danish gift shop, where you will find gifts, ideas & presents for her & him.

Link to comment
Share on other sites

The function tep_href_link() is part of the html_output.php file, I found out that index.php only require html_output.php in this function:

 

	//if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){
if ( file_exists(DIR_WS_CLASSES . 'seo_url.php') ){	
   if (! defined("tep_get_parent_categories"))
   {
     function tep_get_parent_categories(&$categories, $categories_id) {
       $parent_categories_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$categories_id . "'");
       while ($parent_categories = tep_db_fetch_array($parent_categories_query)) {
         if ($parent_categories['parent_id'] == 0) return true;
         $categories[sizeof($categories)] = $parent_categories['parent_id'];
         if ($parent_categories['parent_id'] != $categories_id) {
           tep_get_parent_categories($categories, $parent_categories['parent_id']);
         }
       }
     }
   }
	//require_once(DIR_WS_CLASSES . 'seo.class.php');
	require_once(DIR_WS_CLASSES . 'seo_url.php');		
	$seo_urls = new SEO_URL($languages_id);
}

require_once(DIR_WS_FUNCTIONS . 'html_output.php');

if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){		
	include(DIR_WS_CLASSES . 'cache.class.php');
	$cache = new cache($languages_id);
	if ( file_exists('includes/seo_cache.php') ){
		include('includes/seo_cache.php');
	}
	$cache->get_cache('GLOBAL');
}
} # end if

 

I'm not using Ultimate SEO 'seo.class.php' but G-SEO 'seo_url.php' I made change but I still get the same error:

PHP Fatal error: Call to undefined function tep_href_link()

 

as far as I know the 'cache.class.php' is only for Ultimate SEO so I should exclude that part.

I'm the owner of a danish gift shop, where you will find gifts, ideas & presents for her & him.

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