Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

osCommerce links to categories taking to a wrong page


4 replies to this topic

#1 lebert

  • Community Member
  • 8 posts
  • Real Name:Albert

Posted 15 March 2011, 01:50

This is probably an easy question, but I'm new to osCommerce, so I'm a little bit lost.

I'm modifying a website made with osCommerce (I didn't make this website), and one of the things I have to modify is the look of the home page. My problem is that I have modified the index.php file, and all the changes look fine. However, when I click a link that has been written in PHP with this function:

<?php echo tep_href_link(FILENAME_DEFAULT,'cPath=24&sort=2a') ?>

(in the filenames.php I have:
define('FILENAME_DEFAULT', 'index.php');
)

what happens is that it shows the correct results, but in a different page, with the old design. I don't undesrstand it, because as I understand, that link should take me to the same index.php that I modified, but obviously it's taking me somewhere else. But I don't know what page is it showing, the only thing I see is the link written by the PHP function:

..(my_catalog_folder)/escaparate-c-24.html?sort=2a&osCsid=p7fp55t489nv042p0ip4mp7si1

I guess that the tep_href_link() is writting that, but I don't know what page is using to show the results.

Any clues would be much appreciatted!

#2 germ

  • Community Member
  • 13,586 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 15 March 2011, 03:16

The site has one of the SEO URL mod's installed.

The links are being rewritten by the .htaccess file.

I'm no .htaccess guru - I can only point you in that direction, not explain how it works in detail.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#3 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 15 March 2011, 03:17

SEO URls are installed... rules are in htaccess using mod rewrite
osC Contributions I have published.

Note: Some I only provided minor changes, updates or additions!

#4 lebert

  • Community Member
  • 8 posts
  • Real Name:Albert

Posted 15 March 2011, 17:16

Thank you guys! You were right, my problem was in the .htaccess, I had to change the path in the mod rewrite since the website is in a different folder.

Thanks a lot for your help!

#5 lebert

  • Community Member
  • 8 posts
  • Real Name:Albert

Posted 15 March 2011, 20:44

I have another question:

In the same project, I have to do 2 more things with an infobox (I believe it's called new_products modul). Currently, it's showing on the home page 9 products.

- How can I change it to show only 6? 2 rows of 3 products.
- Also, how can I add a second infobox showing 6 products from another category?