Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New products - link


ErollorD

Recommended Posts

Posted

Hi

 

What do I need to do so that I also include category link into product link, for example. In box "New products for October" I have products with links -

 

shop/product_info.php/products_id/91 (I'm using SEO optimization)

 

Now how to get this link to be listed? -

 

shop/product_info.php/cPath/60/products_id/91

 

so that I include "cPath/60/"

 

??

Posted

does it work as desired when clicking the product in the small what new box in the left column - or when clicking something like the product in specials or reviews from the right column? -- if it works properly from any of those boxes, try to adopt the method used in those...

Posted

i don't know the contrib you using - i plan to test SEO urls out next week perhaps...

 

BUT

 

i had a simular problem with the version of sitemap contrib i used

 

> just to be clear

basically, the problem was that when linking to a sub-category the breadcrumb path in the navbar wouldn't display the parent category...

 

example - if i clicked the sub-category "black shoes"

it linked to "black shoes" ok, but the the navbar's path was:

 

home > black shoes

 

when it should read:

 

home > shoes > black shoes

 

is this effect of the problem you are having - if so you might be able to figure out a way to apply my fix...

 

where the link in the code was:

 

'<a title="'. $category['name'] . '" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">'

 

i changed it to:

 

'<a title="'. $category['name'] . '" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . ($parent_id > 0 ? $parent_id . '_' . $category_link : $category_link)) . '">'

 

adding the "IF/ELSE" statement

($parent_id > 0 ? $parent_id . '_' . $category_link : $category_link)

 

"$parent_id > 0" is the IF conditional

 

following the "?" is what to do if conditional is true

in my example this is "$parent_id . '_' . $category_link"

 

following the ":" is what to do if conditional is not true

in my example this is "$category_link"

 

so i imagine you'll want to do something simular...

 

if you need more help you can include the code in question here or perhaps better, see if the contrib has its own support thread and post your question there...

Archived

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

×
×
  • Create New...