Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Thanks Badbo, like I said, I was in no way criticising the mod, just looking for guidance on what might cause such a problem and this thread seemed like the logical place to ask such a question. I searched the thread beforehand and no such quirk exists in 120 pages of delighted users.

 

I didn't install the Mod myself, I had someone put it in there during some custom development. I have to run the following SQL each time. Have I at least got the right SQL? Thanks

 

 

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(277, 'Enable SEO URLs 5?', 'SEO_URLS_ENABLED', 'true', 'Turn Seo Urls 5 on', 17, 1, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(278, 'Add cPath to product URLs?', 'SEO_URLS_ADD_CPATH_TO_PRODUCT_URLS', 'false', 'This setting will append the cPath to the end of product URLs (i.e. - some-product-p-1.html?cPath=xx).', 17, 3, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(279, 'Add category parent to beginning of URLs?', 'SEO_URLS_ADD_CAT_PARENT', 'true', 'This setting will add the category parent name to the beginning of the category URLs (i.e. - parent-category-c-1.html).', 17, 2, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(280, 'Filter Short Words', 'SEO_URLS_FILTER_SHORT_WORDS', '1', '<b>This setting will filter words.</b><br>1 = Remove words of 1 letter<br>2 = Remove words of 2 letters or less<br>3 = Remove words of 3 letters or less<br>', 17, 5, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''1'', ''2'', ''3''), '),
(281, 'Output W3C valid URLs?', 'SEO_URLS_USE_W3C_VALID', 'true', 'This setting will output W3C valid URLs.', 17, 4, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(282, 'Choose URL Rewrite Type', 'SEO_URLS_TYPE', 'rewrite', 'Choose SEO URL format:<br><b>rewrite</b><br>mysite.com/great-product-p-3.html<br><b>standard</b><br>mysite.com/product_info.php/great-product-p-3<p><i>Note: mod_rewrite has to be enabled for the rewrite option and AllowOveride set to all.</i></p>', 17, 6, '2010-09-25 13:59:40', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''rewrite'', ''standard''), '),
(283, 'Enter special character conversions. (Better to use the file based character conversions.See extras/character_conversion_pack/instructions.txt)', 'SEO_URLS_CHAR_CONVERT_SET', 'Á=>a,á=>a,é => e,ú=>u,í=>i,ó=>o,ñ=>n,ü=>u', 'This setting will convert characters.<br><br>The format <b>MUST</b> be in the form: <b>char=>conv,char2=>conv2</b>', 17, 7, '2010-09-25 14:34:52', '2010-09-25 18:56:04', '', ''),
(284, 'Remove all non-alphanumeric characters?', 'SEO_URLS_REMOVE_ALL_SPEC_CHARS', 'false', 'This will remove all non-letters and non-numbers. If your language has special characters then you will need to use the character conversion system.', 17, 8, '2010-09-25 13:57:40', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(285, 'Set the number of days to store the cache.', 'SEO_URLS_CACHE_DAYS', '7', 'Set the number of days you wish to retain cached data, after this the cache will auto reset.', 17, 11, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', ''),
(286, 'Reset SEO URLs Cache', 'SEO_URLS_CACHE_RESET', 'false', 'This will reset the cache data for SEO', 17, 12, '2010-09-25 14:33:43', '2010-09-25 18:56:04', 'tep_reset_cache_data_seo_urls', 'tep_cfg_select_option(array(''reset'', ''false''), '),
(287, 'Turn debug reporting on true/false.', 'SEO_URLS_OUPUT_PERFORMANCE', 'false', '<span style="color: red;">Debug reporting should <b>NOT</b> be set to ON on a live site</span><br>It is for dev reporting re: performance and queries.', 17, 14, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''true'', ''false''), '),
(288, 'Select caching system.', 'SEO_URLS_CACHE_SYSTEM', 'FileSystem', '<b>Filesystem:</b><br>Zero queries after cache load.<br><b>Database:</b><br>One query after cache load<br><b>Memcached:</b><br>Requires memcached in apache and php.ini.', 17, 10, '2010-09-25 18:56:04', '2010-09-25 18:56:04', '', 'tep_cfg_select_option(array(''FileSystem'', ''Database'', ''Memcached''), ');



--
-- Table structure for table `usu_cache`
--

DROP TABLE IF EXISTS `usu_cache`;
CREATE TABLE IF NOT EXISTS `usu_cache` (
 `cache_name` varchar(32) collate utf8_spanish_ci NOT NULL,
 `cache_data` mediumtext collate utf8_spanish_ci NOT NULL,
 `cache_date` datetime NOT NULL,
 PRIMARY KEY  (`cache_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `usu_cache`
--


Link to comment
Share on other sites

This really sounds like site cross scripting if someone puts something in another database and it changes another database. There is a cure for that. Try ANTI Cross Site Scripting attacks by Spooks it might be worth a try.

Bo

Link to comment
Share on other sites

I would like to build the seo url of a product based on another uniq field in the products table (unique code). Is this too hard to achieve aka are the scripts build in such a way that that it would require too many edits ?

 

example: /my-product-p-1.html to /my-productc-pUniqCode (preferably without .html)

 

 

I hope FWR sees this question :)

Link to comment
Share on other sites

I would like to build the seo url of a product based on another uniq field in the products table (unique code). Is this too hard to achieve aka are the scripts build in such a way that that it would require too many edits ?

 

example: /my-product-p-1.html to /my-productc-pUniqCode (preferably without .html)

 

 

I hope FWR sees this question :)

 

This is a personal need and not related to the general contribution so is out of scope for this support thread.

 

The script would require modification to the Usu_Products.php module and perhaps elsewhere. The -p- has to remain as it is a required marker. .htaccess would require alteration as well.

Link to comment
Share on other sites

Of course, i modified MARKER in usu_products.php but the urls are not generated accordingly(-p- is simply ommited not replaced), (i cleared the filecache). I know the basics in php but i dont know the innerworkings of usu5, thats why Im asking. Is there any developer docs :D ?

Link to comment
Share on other sites

Hi spoofy,\

            $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; 

 

 

sorry, please dump this

Edited by blr044
Link to comment
Share on other sites

Hi

 

I so want this contrib SEO 5 to work on my fresh OS install but it just aint happening!

 

I have spent many hours looking through the forum for a post with the same errors I'm having but no luck. As I said I have a fresh install of OS 2.3.1 and I have tried a 'drop on top' install and 'manual' install but keep getting errors.

 

Error when trying to access store is: Fatal error: Call to a member function add_current_page() on a non-object in /mounted-storage/home2/sub001/sc17958-FIWR/my-store.co.uk/shop/includes/application_top.php on line 344

When trying to access to admin is: Fatal error: Call to undefined function tep_get_version() in /mounted-storage/home2/sub001/sc17958-FIWR/my-store.co.uk/shop/backoff/includes/header.php on line 20

 

I have read and re-read the instructions. I have tried 4 times with no luck and each time re-installing OS.

 

Any help appreciated. thank you!

 

Ps. Sorry in advance for my stupidity if a user error! (ps. I'm not such a newbie either!)

Edited by harperk
Link to comment
Share on other sites

Hi

 

I so want this contrib SEO 5 to work on my fresh OS install but it just aint happening!

 

When trying to access to admin is: Fatal error: Call to undefined function tep_get_version() in /mounted-storage/home2/sub001/sc17958-FIWR/my-store.co.uk/shop/backoff/includes/header.php on line 20

 

I have read and re-read the instructions. I have tried 4 times with no luck and each time re-installing OS.

 

Any help appreciated. thank you!

 

Ps. Sorry in advance for my stupidity if a user error! (ps. I'm not such a newbie either!)

function tep_get_version is a new function in 2.3.1. are you sure that you have upgraded functions/general.php?

Link to comment
Share on other sites

Hi

 

I so want this contrib SEO 5 to work on my fresh OS install but it just aint happening!

 

I have spent many hours looking through the forum for a post with the same errors I'm having but no luck. As I said I have a fresh install of OS 2.3.1 and I have tried a 'drop on top' install and 'manual' install but keep getting errors.

 

Error when trying to access store is: Fatal error: Call to a member function add_current_page() on a non-object in /mounted-storage/home2/sub001/sc17958-FIWR/my-store.co.uk/shop/includes/application_top.php on line 344

When trying to access to admin is: Fatal error: Call to undefined function tep_get_version() in /mounted-storage/home2/sub001/sc17958-FIWR/my-store.co.uk/shop/backoff/includes/header.php on line 20

 

I have read and re-read the instructions. I have tried 4 times with no luck and each time re-installing OS.

 

Any help appreciated. thank you!

 

Ps. Sorry in advance for my stupidity if a user error! (ps. I'm not such a newbie either!)

 

USU5 was written before the release of 2.3.X the drop on top files are not compatible they are 2.2.X

 

Having said that the contribution is compatible with 2.3.X using the manual install.

 

USU5 PRO which is packaged and ready for release has install and drop on top instructions for both 2.2.X and 2.3.X.

Link to comment
Share on other sites

Hi Rob, Thanks a lot for your reply.

 

I did try manual install also but this produced errors. User pdcelec mentioned a file change for OScom 2.3 in functions/general.php. Is this correct? and if so what are the changes needed?

 

In your opinion shoudl I wait and install USU5 PRO when released?

 

Thanks in advance for your help.

Link to comment
Share on other sites

Hi Rob, Thanks a lot for your reply.

 

I did try manual install also but this produced errors. User pdcelec mentioned a file change for OScom 2.3 in functions/general.php. Is this correct? and if so what are the changes needed?

 

In your opinion shoudl I wait and install USU5 PRO when released?

 

Thanks in advance for your help.

 

USU5 will not produce errors with the manual install.

 

I believe you did the drop on top ( which changed some files incorrectly ) then you tried the manual install which isn't working due to the fact that the incorrect files that you "dropped on top" are still in place.

Link to comment
Share on other sites

Hi Rob,

 

Just checking the files again ready to do a manual install on a clean OS install and found some differences to what I need to change the file from to what I have...basically can not find the fcode to 'replace'. Here are the files...

 

catalog/includes/application_top.php

 

2- Find ...

 

// set php_self in the local scope 
 if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

 

My file in OS 2.3 is

 

// set php_self in the local scope
 $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']);

 

catalog/includes/modules/product_listing.php

 

5- Find ...

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

My file in OS 2.3 is.....

 

case 'PRODUCT_LIST_BUY_NOW':
           $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
           break;

 

How do I 'replace' if I can not find this code in the files?

 

Thanks

Link to comment
Share on other sites

Hi Rob,

 

How do I 'replace' if I can not find this code in the files?

 

As I mentioned, I have not yet written instructions for 2.3 because of the imminent release of USU5 PRO so you have to temporarily read between the lines.

 

In the first case ( $PHP_SELF ) replace the 2.3 code you found.

 

In the second case replace

 

tep_get_all_get_params(array('action'))

 

with ..

 

tep_get_all_get_params(array('action', 'products_id'))

Edited by FWR Media
Link to comment
Share on other sites

Rob,

 

SUCCESS! after your expert help made it possible to complete the 'base install'.

 

Just to clarify in case any other users want to upgrade their OS 2.3 version to USU5 the changes were simple as you stated and given below....

 

Only 2 file changes..

 

catalog/includes/application_top.php

 

Find

 

// set php_self in the local scope
 $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']);

 

replace with code as per install instructions...

 

/** 
 * USU5 function to return the base filename  
 */ 
 function usu5_base_filename() { 
   // Probably won't get past SCRIPT_NAME unless this is reporting cgi location 
   $base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF', 'REQUEST_URI', 'ORIG_PATH_INFO', 'HTTP_X_ORIGINAL_URL', 'HTTP_X_REWRITE_URL' ) ); 
   while ( $base->valid() ) { 
     if ( array_key_exists(  $base->current(), $_SERVER ) && !empty(  $_SERVER[$base->current()] ) ) { 
       if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) { 
         preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches ); 
         if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) ) 
                                   && ( substr( $matches[0], -4, 4 ) == '.php' ) 
                                   && ( is_readable( $matches[0] ) || ( false !== strpos( $_SERVER[$base->current()], 'ext/modules/' ) ) ) ) { 
           return $matches[0]; 
         }  
       }  
     } 
     $base->next(); 
   } 
   // Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php 
   if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) { 
     return 'index.php'; 
   }  
   trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING ); 
 } // End function 
// set php_self in the local scope 
 $PHP_SELF = usu5_base_filename();

 

catalog/includes/modules/product_listing.php

 

Replace...

 

tep_get_all_get_params(array('action'))

 

with...

 

tep_get_all_get_params(array('action', 'products_id'))

 

 

ALL other files and instructions are exactly as per original instructions to get a BASE INSTALL

 

 

Thanks Rob!

Link to comment
Share on other sites

Rob,

 

Is there a need to add SEO Header Tags when using USU5 & KissMT on a osc 2.3.1?

 

Cheers

 

If you mean Linda McGraths' Header Tags Controller ( later renamed and added to by jackmcs and renamed to Header Tags Seo ) then the answer is no.

 

I'm not a fan of that contribution but the one thing it does offer that KissMT does not is the ability to set your own specific title/description/keywords via admin.

 

It only takes a few fields in products/categories/manufacturers so I may add the functionality to KissMT in the future.

Edited by FWR Media
Link to comment
Share on other sites

Thanks for the contribution

 

I made it work on CRELOADED 6.33.. But it just can't work CRELOADED 6.15 ..

It just give me 404 page not found on every category or product ....

 

Anyone has experience on this ..

 

Thanks

 

Firstly .. these are the osCommerce forums not the CRE Loaded forums and we only offer support here for osCommerce.

 

Having said that USU5 will work on 6.15 just fine .. I'd hazard an educated guess that you simply have RewriteBase wrong in .htaccess.

Link to comment
Share on other sites

Hello,

 

There is a bug with memcache when you have several site in the same server dedicate.

For example I have a site1 with : http://www.mysite1/product_name-p-1542.html

another site 2 with : http://www.test/product_name-p-1542.html

 

The result is when I am on site 1, I see the url of the site 2.

 

regards.


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

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.
Note: Your post will require moderator approval before it will be visible.

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