Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1st of subdirectory redirect to index...


g6pilot

Recommended Posts

Hi guys

 

I need some help please.

 

I've created some subdirectories for some products but the first subdirectory always send to index, here are some examples:

 

http://www.holws.com/index.php?cPath=27

 

The "Floratonic" subdirectory doesn't send me to a Cpath but instead to the index...

 

Here's another example:

 

http://www.holws.com/index.php?cPath=36

 

The "Adapter" subdirectory will send me to index, the rest will send me to Cpath however it skips, so the "Blower" will send me to the "Adapter" Cpath... This is very strange..

 

Please see for yourself and see if there's away that I could correct this.

 

Thanks

Regards

Peter

Link to comment
Share on other sites

Check your file catalog/index.php in section after

 

 if ($category_depth == 'nested') {

 

The links to subcategories are probably missing the $cPath info, so the go to plain FILENAME_DEFAULT and that is the frontpage

Link to comment
Share on other sites

No, it's not correct

 

The variable $cPath_new is set after the links are created, so, it's always empty when creating the links

 

  $cPath_new = tep_get_path($categories['categories_id']);

 

You need to set this before you create the links.

 

For more details best is you contact the template seller

 

Is there any reason by the way why you start a new store based on an outdate osCommerce version?

Link to comment
Share on other sites

No, it's not correct

 

The variable $cPath_new is set after the links are created, so, it's always empty when creating the links

 

$cPath_new = tep_get_path($categories['categories_id']);

 

You need to set this before you create the links.

 

For more details best is you contact the template seller

 

Is there any reason by the way why you start a new store based on an outdate osCommerce version?

 

The person who did the template for me only charged for the template adn the installation fee.. I've been familiar with some of the OScommerce basic code editing but I've never ran into this problem. I don't want to have to bring a web designer into this, it's going to cost me an arm and leg.

Link to comment
Share on other sites

Well, it looks like the person who did the template sold you an outdated version of osCommerce

 

Beside any design and other issues you need first of all to apply any security patches/fixes/measures -> read here

 

Next thing is that earlier or later you'll need to upgrade the whole site to be php 5.3 compatible, the site will stop working the moment your host upgrade the php version, this could be tomorrow morning or in 6 months or anything

 

After this is done, back to your issue: The person sold you something that don't work, did you ask for a solution? Or for your money back?

 

Or did they send you to the forum to let you troubleshoot their product? It looks like this

 

Anyway

 

In your index.php

 

FIND

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';


  $rows++;
  $cPath_new = tep_get_path($categories['categories_id']);

 

Replace with

$cPath_new = tep_get_path($categories['categories_id']);
$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';


  $rows++;

 

Best advice: Delete what you have and start over with a new and secure osCommerce store, you'll have only problems with this

Link to comment
Share on other sites

Well, it looks like the person who did the template sold you an outdated version of osCommerce

 

Beside any design and other issues you need first of all to apply any security patches/fixes/measures -> read here

 

Next thing is that earlier or later you'll need to upgrade the whole site to be php 5.3 compatible, the site will stop working the moment your host upgrade the php version, this could be tomorrow morning or in 6 months or anything

 

After this is done, back to your issue: The person sold you something that don't work, did you ask for a solution? Or for your money back?

 

Or did they send you to the forum to let you troubleshoot their product? It looks like this

 

Anyway

 

In your index.php

 

FIND

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';


$rows++;
$cPath_new = tep_get_path($categories['categories_id']);

 

Replace with

$cPath_new = tep_get_path($categories['categories_id']);
$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';


$rows++;

 

Best advice: Delete what you have and start over with a new and secure osCommerce store, you'll have only problems with this

 

That actually did the trick George, thanks you very much!

 

I am very interested in the version 3+ but at this moment, this template will be used temporary. I am looking to upgrade along the line once we have made some money for a nicer updated template.

 

Thanks again Multimixer

 

Have a great day!!!

 

Regards

Peter

Link to comment
Share on other sites

Some day in the future for sure. There will be first a 2.3.4 as the end (?) of the 2.3 series, then a 2.4 then probably the 3

 

Anyway, you don't need "some templates" but a proper working store. Functionality and security are more important than the a nice look.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...