Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    137
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: function to get cPath by passing the products_id?

    There is a function for this in the functions_categories.php
    Code:
    ////
    // Construct a category path to the product
    // TABLES: products_to_categories
      function zen_get_product_path($products_id) {
    Do you use Linked Products?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Aug 2009
    Posts
    137
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. v150 how to get the subcategories linkage or ID by built in function?
    By loafer in forum General Questions
    Replies: 3
    Last Post: 21 May 2012, 06:28 AM
  2. How to get cPath from a product id?
    By Cindy2010 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Jan 2012, 02:32 AM
  3. Get current cpath
    By foteek in forum General Questions
    Replies: 2
    Last Post: 31 Aug 2008, 03:59 AM
  4. function to get the total weight?
    By bangsters in forum General Questions
    Replies: 2
    Last Post: 8 Nov 2007, 02:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR