Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1st of subdirectory redirect to index...


g6pilot

Recommended Posts

Posted

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

Posted

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?

Posted

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.

Posted

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

Posted

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

Posted

Oh I see

 

Will there be a 3 version for commercial use in the future? By that time I probably would've save up some money to purchase some templates.

 

Thanks again for your help. :)

Posted

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.

Archived

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

×
×
  • Create New...