Zen Cart Logo
Forums / General Questions / function to get cPath by passing the products_id?

function to get cPath by passing the products_id?

Locked

Views: 2,905

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Aug 2009, 11:52 AM
#1
rajoo_sharma avatar

rajoo_sharma

Zen Follower

Join Date:
Aug 2009
Posts:
137
Plugin Contributions:
0

function to get cPath by passing the products_id?

Hi,

I wonder if there exists a function that can return the proper cPath if I pass the products_id to it?

I have created a custom sidebox that displays a few products, the problem is I'm not able to pass the cPath to the products_info page, it works fine without cPath but inside the products_info page when the link to the category does not work.Please let me know how to fix it?

Its looks something like this:
$content .= '<li><a href="' . zen_href_link(zen_get_info_page($check_tpl_our_magazines->fields['products_id']), 'cPath=' . HOW TO GET THIS CATEGORY PATH . '&products_id=' . $check_tpl_our_magazines->fields['products_id']) . '">';

Regards

13 Aug 2009, 4:10 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: function to get cPath by passing the products_id?

There is a function for this in the functions_categories.php

////
// Construct a category path to the product
// TABLES: products_to_categories
  function zen_get_product_path($products_id) {

Do you use Linked Products?

14 Aug 2009, 6:09 AM
#3
rajoo_sharma avatar

rajoo_sharma

Zen Follower

Join Date:
Aug 2009
Posts:
137
Plugin Contributions:
0

Re: function to get cPath by passing the products_id?

Hey thank you so much, this is the one I really asked for.

Thanks again.
Regards