Why aren't Flat HTML URLs for catalog pages working in Newtek Cart?

Isolated Sandbox to test your ecommerce solutions

*Note, Flat HTML URLs (also known as permalinks) for catalog pages can be enabled on the Search Settings page in Newtek Cart.

If you have installed Newtek Cart in the root of your website (i.e. the shopping cart is your website and not located in a sub directory), you will need to make a minor change to the \content\admin\admin_settings_search.php file in order for "Flat HTML URLs for catalog pages" to work properly.

You will also need to be sure your hosting plan supports IIS Mod-rewrite (which is required because this feature utilizes URL rewriting via an htaccess file that Newtek Cart generates).

On line 26 of your \content\admin\admin_settings_search.php file, you will see the following:
"RewriteBase\t".str_replace("//", "/", $rewriteBase)."\n".
When Newtek Cart is installed in the root of your site, $rewriteBase (as shown in the line above) ends up being "\", so the replace actually does nothing.

Because of this, you will need to change line 26 to:
"RewriteBase\t".str_replace("\\", "/", $rewriteBase)."\n".
This fix will have Newtek Cart produce a proper RewriteBase for the root of the site, and Flat HTML URLs for catalog pages should begin working as expected.

Add Feedback