Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

YASU


Romey-Rome

Recommended Posts

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Does

    Options +FollowSymLinks
   RewriteEngine   on
   RewriteRule     admin                      - [L]
   RewriteCond     %{REQUEST_URI}             !-d
   RewriteCond     %{REQUEST_URI}             !^/$
   RewriteRule     !\.(gif|php|css|jpg)$      /rewrite.php

work? Do you have a link to your site? When is it acting odd? Did you check to see if mod_rewrite works on your server by doing a simple rule like

    Options +FollowSymLinks
   RewriteEngine   on
   RewriteRule   /test.php   /index.php

You also might want to check if catalog is written into the code of rewrite.php anywhere.

 

Hth,

Matt

Link to comment
Share on other sites

>iiinetworks

I removed /catalog fro rewrite.php which didn't do anything.

There are no instances of /catalog in html_output.php

 

Using the code you provided I get this error when accessing categories. But the link displays the category name. ie. www.romeysblades.com/knives/

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/romey/public_html/includes/functions/database.php:13) in /home/romey/public_html/includes/functions/database.php on line 13

 

Using the test rule doesn't seem to change anything. mod_rewrite is installed.

my site is @ www.romeysblades.com , but my store is live, so I put everything back the way it was.

 

Thanks for the help!

Link to comment
Share on other sites

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/romey/public_html/includes/functions/database.php:13) in /home/romey/public_html/includes/functions/database.php on line 13
To fix this, change the require('includes/application_top.php'); at the top of the index.php and product_info.php files to say
require_once('includes/application_top.php');

Until you get the rewrite working, I would not make the includes/functions/html_output.php changes. The site should still work otherwise with just the mod_rewrite rules and rewrite.php installed. Changing require to require_once should not affect site functionality (when not using the rewrite). That way, you should be able to get both types of URLs ( www.romeysblades.com/knives/ and http://www.romeysblades.com/index.php/cPath/24 ) working simultaneously. Once you do that, you can make the html_output changes (which make osCommerce display with the new URLs).

 

I find the regular SEF URLs goofy and would not use them. I see no advantages to writing product_info.php/products_id/24 rather than product_info.php?products_id=24. I don't think that they would hurt anything at this point though.

 

Hth,

Matt

Link to comment
Share on other sites

Whenever I'm on a product listing page with more than 1 page, and I click on next, I get:

 

"Fatal error: Call to undefined function: shift()in /home/romey/public_html/rewrite.php on line 79"

I don't remember what I had to do to get the product listing pages working. They are a pain. I'll look into adding some changes for the listing_split class and uploading a new version.

 

You might have to rewrite the Back button code to point to

tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', $cPath_array)

or something like that ($cPath_array may not be the right name).

 

Hth,

Matt

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
i too get an error on line 79 of rewrite.php using this mod and its pointing to an undeclared function called "shift()" where is this function listed at ?
Try changing to array_shift instead.

 

I uploaded a new version of the contribution if you want to try that.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

The header_tag controller did not show the product_info tags.

the title will be detectet but the keywords and the description not.

I would try changing the following code from includes/application_top.php
// BOF: WebMakers.com Added: Header Tags Controller v1.0
 require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0

to

  if ($PHP_SELF != 'rewrite.php') {
// BOF: WebMakers.com Added: Header Tags Controller v1.0
   require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
   require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0
 }

and adding the original code into the rewrite.php file.

 

Essentially the problem is that it is trying to generate the header tags before it knows what product it is. With most of the other cases where this happened, I moved the variable definition into the rewrite.php file and it worked.

 

Hth,

Matt

 

P.S. I'm not sure that I understand the issue with the all prods that you mention in your other post. Perhaps you could explain more? Possibly with example links?

 

P.P.S. I know of two sites that are using this mod, but I'm not really comfortable posting them here as they are not my sites. If someone has a site installed that meets the My Store posting criteria, please post the link here. Thanks.

Always back up before making changes.

Link to comment
Share on other sites

and adding the original code into the rewrite.php file.

 

I`m not shure what code must in the rewrite.php to show the metas.

 

>Allprods A and also the categories without unique products cannot indicate these articles. In each case a Product is indicated. The article number does not seem more rewriter to evaluate correctly.

Link to comment
Share on other sites

  • 2 weeks later...
is it possible to change it into domain.com/computer-cpu-cooler?
Sure. You would lose the ability to include dashes in the product, category, and manufacturer names though. You can just add str_replace calls in rewrite.php and the tep_href_link function.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

i don't understand how to make the modifications to change '+' --> '-'

 

I would like to make modification to change all ' ?, ?, ?, ? ....' --> 'e, e, u, a ....' and all ",' ... to --> space

 

Thanks

 

Ludo

Link to comment
Share on other sites

Could someone please post thier htaccess and rewrite.php files that does not have their store in the /catalog/ folder?

 

I have mine installed at root, and I cannot get these rules to work.

 

Thanks for the help!

 

Burke Jones

Edited by bsnrjones
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
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...