Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Direct Links to Product Manufacturer & Category

    Quote Originally Posted by lat9 View Post
    Well, that's a bit more complicated, since (unless you're using the most-excellent SNAF plugin) the Specials, New, Advanced Search and Featured pages each have their own formatting scripts.

    The basic construct that you'll use on each of the pages is to gather each product's product_id and master_categories_id (present in the SQL data returned, in a page-specific database object variable) into variables of the same name and then:
    Code:
    $display_category_name = '<h4 class="product-cat"><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_product_path ($product_id)) . '">' . zen_get_category_name ($master_categories_id) . '</a></h4>';
    You'll then need to echo the $display_category_name variable where you want it in the output.
    OK, so I'm beginning to think this is out of my league. The alteration you supplied above makes the link disappear entirely and if I just use the href part, the link is still returning with no category ID, so I think I'll just settle for the category name with no link -- close enough is good enough, right?

    Thanks for your help, anyway

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,473
    Plugin Contributions
    88

    Default Re: Direct Links to Product Manufacturer & Category

    Did you copy the product's product_id and master_categories_id from the database object to those named variables?

  3. #13
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Direct Links to Product Manufacturer & Category

    Quote Originally Posted by lat9 View Post
    Did you copy the product's product_id and master_categories_id from the database object to those named variables?
    Sorry, you just lost me... Could I get you to spell that out in layman's terms please?

  4. #14
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Direct Links to Product Manufacturer & Category

    Quote Originally Posted by MortalWombat View Post
    Sorry, you just lost me... Could I get you to spell that out in layman's terms please?
    Those two variables need to be assgned the values that they seem to represent...somewhere/somehow (usually in the pages directory either header_php.php or main_template_vars.php) $master_categories_id = $sql_query->fields['master_categories_id'] as an example...

    Otherwise where you have $master_categories_id you could substitute:

    Code:
    zen_get_products_category_id((int)$_GET['products_id'])
    And for $product_id you can smply use

    Code:
    (int)$_GET['products_id']
    All a bit crude, but should work if you have been able to get that manufacturer id you were trying to pull from above.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #15
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    131
    Plugin Contributions
    0

    Default Re: Direct Links to Product Manufacturer & Category

    Quote Originally Posted by mc12345678 View Post
    Those two variables need to be assgned the values that they seem to represent...somewhere/somehow (usually in the pages directory either header_php.php or main_template_vars.php) $master_categories_id = $sql_query->fields['master_categories_id'] as an example...

    Otherwise where you have $master_categories_id you could substitute:

    Code:
    zen_get_products_category_id((int)$_GET['products_id'])
    And for $product_id you can smply use

    Code:
    (int)$_GET['products_id']
    All a bit crude, but should work if you have been able to get that manufacturer id you were trying to pull from above.
    Since I'm not entirely clear on what I'm doing, the above doesn't seem to have helped.

    Although I did successfully pull the manufacturer ID, that was on the product_info page, whereas this edit is all/featured/specials/new products listing pages.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Manufacturer image on product category page
    By bobdog in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 25 Jan 2010, 02:22 AM
  2. Have a problem with blank pages from product & category links
    By GoldBuckle in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jul 2009, 12:44 AM
  3. Need help with code for direct product links for iDevAffiliate
    By rlfreshwater in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 20 Jan 2009, 02:22 PM
  4. Sorting by Manufacturer and Product Category
    By youderian in forum General Questions
    Replies: 1
    Last Post: 16 May 2008, 10:46 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