Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Which Function gerates the URL for a given product?

    Hi All,

    I've had a couple requests to add a feature to Easy Populate 4, one that give a product URL. Amazon want's this for their pay-per-click model, and apparently several other also.

    I've been poking around the code, but not striking gold! If someone could point me in the right direction, I'd really appreciate it!

    thanks!
    chadd

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Which Function gerates the URL for a given product?

    Have a look at Numinix's Google Merchant Centre feeder... This generates a product URL for parsing into the resultant XML file.
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Which Function gerates the URL for a given product?

    Sitemap XML mod also generates a product URL
    20 years a Zencart User

  4. #4
    Join Date
    Jan 2004
    Posts
    66,451
    Plugin Contributions
    81

    Default Re: Which Function gerates the URL for a given product?

    Code:
    $sql = "use a query that gets at least products_id and master_categories_id from the products table";
    $result = $db->Execute($sql);
    $prod_link = zen_href_link(zen_get_info_page($result->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($result->fields['master_categories_id']) . '&products_id=' . $result->fields['products_id']);
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Which Function gerates the URL for a given product?

    Quote Originally Posted by DrByte View Post
    Code:
    $sql = "use a query that gets at least products_id and master_categories_id from the products table";
    $result = $db->Execute($sql);
    $prod_link = zen_href_link(zen_get_info_page($result->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($result->fields['master_categories_id']) . '&products_id=' . $result->fields['products_id']);
    Thank you both for your replies.

    Doc, this looks like it will be very simple to implement in EP4.

    thanks!

    -chadd

 

 

Similar Threads

  1. v139h Counting the total number of reviews for a given product.
    By retched in forum Contribution-Writing Guidelines
    Replies: 1
    Last Post: 15 Feb 2012, 01:43 AM
  2. Returning product URL for a given product id
    By banjer in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 26 Sep 2011, 09:49 PM
  3. which function or class return the final price of a product?
    By weber in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Mar 2011, 11:58 PM
  4. Replies: 6
    Last Post: 19 Sep 2008, 04:08 AM
  5. getting a given URL's <title>
    By dtwist in forum General Questions
    Replies: 0
    Last Post: 26 Apr 2007, 08:19 AM

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