Re: Ultimate SEO 2.200+ (new features)
There seems to be a bug in the script causing a blank page, but it only affects stores using a database prefix because the table names are hard coded.
Here's the solution. Edit includes/classes/seo.url.php file as follows:
find (line 613)
Code:
/* START SEO-ADD-PRODUCT-CAT PATCH
*
* Patched to use SEO_ADD_PRODUCT_CAT
* This allows the use of a directory structure for urls.
* @author Andrew Ballanger
*/
if($this->attributes['SEO_ADD_PRODUCT_CAT'] == 'true')
{
$sql = 'SELECT pd.products_name AS pName, ptc.categories_id AS c_id ' .
'FROM products_description AS pd ' .
'LEFT JOIN products AS p ' .
'ON pd.products_id=p.products_id ' .
'LEFT JOIN products_to_categories AS ptc ' .
'ON pd.products_id=ptc.products_id ' .
'WHERE pd.products_id=\'' . (int)$pID . '\' ' .
'AND language_id=\'' . (int)$this->languages_id . '\' LIMIT 1';
}
and replace with:
Code:
/* START SEO-ADD-PRODUCT-CAT PATCH
*
* Patched to use SEO_ADD_PRODUCT_CAT
* This allows the use of a directory structure for urls.
* @author Andrew Ballanger
*/
if($this->attributes['SEO_ADD_PRODUCT_CAT'] == 'true')
{
$sql = 'SELECT pd.products_name AS pName, ptc.categories_id AS c_id ' .
'FROM ' . TABLE_PRODUCTS_DESCRIPTION . ' AS pd ' .
'LEFT JOIN ' . TABLE_PRODUCTS . ' AS p ' .
'ON pd.products_id=p.products_id ' .
'LEFT JOIN ' . TABLE_PRODUCTS_TO_CATEGORIES . ' AS ptc ' .
'ON pd.products_id=ptc.products_id ' .
'WHERE pd.products_id=\'' . (int)$pID . '\' ' .
'AND language_id=\'' . (int)$this->languages_id . '\' LIMIT 1';
}
find (line 825)
Code:
function get_parent_categories_path(&$path, $categories_id, &$cPath = array())
{
$sql = 'SELECT c.parent_id AS p_id, cd.categories_name AS name ' .
'FROM categories c ' .
'LEFT JOIN categories_description cd ' .
'ON c.categories_id=cd.categories_id ' .
'AND cd.language_id=\'' . (int)$this->languages_id . '\'' .
'WHERE c.categories_id=\'' . (int)$categories_id . '\'';
$parent = $this->db->Execute($sql, false, true, 43200);
and replace with
Code:
function get_parent_categories_path(&$path, $categories_id, &$cPath = array())
{
$sql = 'SELECT c.parent_id AS p_id, cd.categories_name AS name ' .
'FROM ' . TABLE_CATEGORIES . ' c ' .
'LEFT JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' cd ' .
'ON c.categories_id=cd.categories_id ' .
'AND cd.language_id=\'' . (int)$this->languages_id . '\'' .
'WHERE c.categories_id=\'' . (int)$categories_id . '\'';
$parent = $this->db->Execute($sql, false, true, 43200);
Changes are highlighted in red. Hope it helps...
Re: Ultimate SEO 2.200+ (new features)
@balihr, Thanks for the catch, I'll go back through the code before the next release and look for any SQL statements where the table names are used directly.
@SupuS, It looks like you are using either more then one language or a non-english language.
Before you add balihr's changes, please use the "Product Cache Generation Patch" previously posted in this thread.
My Guess
Another consideration (I've not completely dug through all the code from the original module): if no name is found in the database for the language the web browser is set to use. When this occurs, it may cause the current code base to omit names in the URLs (If I remember correctly, the module does not attempt to fall back to another language if no language specific result is found).
Fix for Guess
If the target audience for your store includes more than one language, please make sure you add translations for all the languages. For example, if your target audience is Spanish and English, you need to make sure you define category and product names for both the Spanish and English languages using the admin interface.
Re: Ultimate SEO 2.200+ (new features)
hi
i have just downloaded this what file do i upload to my server am using 1.5.0 zencart
this is a fresh install of this and there is 4 files a licence file
1 file is affected_files_150
1 file is new_files_150
1 file is new files 150 czech
1 file is new file 150 english
this is a fresh install so nothing from this plugin has been installed before which of the 4 files do i upload to my server
thanks??
Re: Ultimate SEO 2.200+ (new features)
There are more then 4 files in those directories. Start by extracting the entire zip file.
Most plugins include a readme. This is always a good place to start with any new mod / plugin. The readme files include more information on how each of the four folders you mentioned are used.
In addition, I should note each of those four directories are organized further into "includes" and "your_admin_folder". Files under "includes" go into the "includes" folder of your Zen Cart installation. Files under "your_admin_folder" go into the admin folder of your Zen Cart installation.
From the README (English language) distributed in the zip file:
Code:
===========================================================
INSTALLATION INSTRUCTIONS
===========================================================
1. Copy files from `new_files_150` and `new_files_150_English` to your Zen Cart install
2a. If you haven't made changes to Zen Cart, Copy and replace files from `affected_files_150` to your Zen Cart install
2b. If you have made changes to your Zen Cart, you will need to merge your versions with this version
3. A sample .htaccess file is included. Simply rename to .htaccess and edit to match your site
4. Config the module in CONFIGURATION
For step three, see notes on the .htaccess file.
I would also highly recommend the following before making your Zen Cart installation live (and accessible to Search Engines).- Install any relevant patches released (after the version you are using was released)
- Finalize category and product names
- Configure the settings for "Ultimate SEO"
- Make sure the URLs match what you desire
Re: Ultimate SEO 2.200+ (new features)
after much tinkering on an install on a fresh 1.5 site which generated blank white pages, I have figured out that there are two files that are breaking the site:
/affected_files_150/includes/auto_loaders/config.ultimate_seo.php
/affected_files_150/includes/functions/html_output.php
Again, this is a fresh 1.5 install.
.htaccess path was modified.
Does anyone have any ideas?
Thank you,
Re: Ultimate SEO 2.200+ (new features)
I have installed 2.2 on a fresh 1.5 zencart. It breaks the site. After enabling/disabling one file at a time, I found the two files that are breaking the catalog side of the site:
affected_files_150/includes/functions/html_output.php
includes/auto_loaders/config.ultimate_seo.php
the path in the .htaccess file has been modifed.
Does this give anyone a clue in how I can continue troubleshooting?
the site is at www.custombookmarker.com
thank you!