Jump to content

Disable SEO path error


bobdonkey

Recommended Posts

Hi all

I am importing all my products into the database, and because I don't specify the SOE path, it is set automatically (which is fine) but as a result the error is showing the whole time, even to normal users (and google):

The following errors were detected:
The SEO path specified is already in use with another item. A unique one has been specified for you. Please check and amend if necessary.

I do not want normal users seeing this error. How can I disable it completely?

Thanks

Link to comment
Share on other sites

Please try this. In /classes/seo.class.php, near line 642:

Was:
	// Force unique path is it's already taken
	$unique_id = substr($type, 0, 1).$item_id;
	$GLOBALS['db']->insert('CubeCart_seo_urls', array('type' => $type, 'item_id' => $item_id, 'path' => $path.'-'.$unique_id, 'custom' => $custom));
	$GLOBALS['gui']->setError($GLOBALS['language']->settings['seo_path_taken']);

Now:
	// Force unique path is it's already taken
	$unique_id = substr($type, 0, 1).$item_id;
	$GLOBALS['db']->insert('CubeCart_seo_urls', array('type' => $type, 'item_id' => $item_id, 'path' => $path.'-'.$unique_id, 'custom' => $custom));
	if($show_error && CC_IN_ADMIN) $GLOBALS['gui']->setError($GLOBALS['language']->settings['seo_path_taken']);

The edit in the last line above will show the error only if not specifically prohibiting it, and then only if this SEO function is called from an administrative action.

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