SEFU documentation

Requirements

For this contribution to work, you (or your host) needs an apache webserver allowing URL-rewriting via .htaccess.

Installation

You can install this plugin by uploading SEFU.sql via Admin→Tools→Install SQL Patches and copying the ‘includes’ directory and the .htaccess file into your Zen-Cart folder. After performing the database upgrade, you are able to switch the URL rewriting on and off as you like. The switch can be found in Admin→Configuration→My Store, is named ‘Use Search-Engine Friendly URLs’ and defaults to ‘false’. To render meaningful names for html files instead of just ‘index.html’ (built from manufacturers- and products-names) switch ‘Render meaningful filenames for SEFUs’ to ‘true’ (defaults to ‘true’, too).

Important: This contribution ties into the core of Zen-Cart. Some parts vital to Zen-Cart as well as some template files have been modified. That means if you use your own custom template (with or without overrides), chances are, you have to port the changes to your template files. You should examine the following files using a file comparison tool like WinMerge (Windows), BBEdit (Mac OS X), or Meld (Linux) if you are unsure about if you have customized these files:

Template files:

  • includes/templates/<your_template>/sideboxes/tpl_currencies.php

Other Zen-Cart core files:

  • includes/functions/html_output.php
  • includes/functions/functions_general.php
  • includes/application_top.php
  • includes/modules/payment/paypal/ipn_application_top.php

The changes from the files included in this contribution are vital to the functionality of your cart. It won’t work, if they aren’t updated and you’ll get unpredictable behaviour. Such errors are hard to track down, so please take the time and go through your files.

The following files are introduced in this contribution and simply have to be copied into your Zen-Cart folder.

  • includes/extra_configures/sefu_defines.php
  • functions/extra_functions/functions_sefu.php

Configuration

Make sure the RewriteBase in .htaccess is set to the same as your DIR_WS_CATALOG in includes/configure.php. That should be it. You can configure SEFU settings in Admin→Configuration→My Shop by adjusting the following entries.

  • Use Search-Engine Friendly URLs (default: false)

You have to set this to true for the contribution to work.

  • Render meaningful filenames for SEFUs (default: true)
  • Enable SEFUs for SSL (default: false)

SSL and shared certificates

Regarding RewriteRules in .htaccess, setting SEFU up on server in a shared certificate environment can cause some headaches. Special thanks go out to kelvyn for the following piece of information:

When a host has a shared certificate, it will quite often take the form:

mainhttp://www.mywebsite.com/shop/
sslhttps://secure.myhost.com/~mywebsite/shop/

Therefore, you need a second rewrite to take account of this, ie:

# set RewriteBase to DIR_WS_CATALOG
RewriteBase /shop/
RewriteRule ^pages-(.+)\.html index.php/pages-$1 [L]

# additional rewrite rule for ssl pages
RewriteBase /~mywebsite/shop/
RewriteRule ^pages-(.+)\.html index.php/pages-$1 [L]

Support

For recent updates of this contribution please visit http://breakmyzencart.com/sefu/. Support is available in this Zen-Cart forum thread and via the breakmyzencart forums.

 
contrib/sefu-doc.txt · Last modified: 2005/08/08 07:07 by 64.81.226.87
 
Recent changes RSS feed Valid XHTML 1.0 Valid CSS