Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default hyperlink from product list

    Hi,

    I have a main site that lists various restaurants. Each restaurant is created as a product within a category. Each restaurant has its' own site (a subdomain of the main site.)

    I put the site URL in "Product URL" in the product description and of course it works if I click there.

    How can I have the URL active on the Product Listing Screen and eliminate the need to go to the product detail page?

    The test site is here:
    http://werdna.catplaques.com/index.p...=index&cPath=2
    Each of these 2 restaurants has a link to a new ZC site.

    I don't think it matters, but this is set up using the multisite module.

    Thanks,
    Jeff

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: hyperlink from product list

    You will have to copy the product info code for productInfoLink and work it into the "array" for the product listing. Arrays are for me difficult to manage but that is where it needs to be
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default Re: hyperlink from product list

    Thanks Kobra,

    You put me in the right direction.

    I don't know php so I am doing by example. I've got it partially working.

    I took the link code from tpl_product_info_display.php

    PHP Code:
    <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATIONzen_href_link (FILENAME_REDIRECT'action=url&goto=' urlencode($products_url), 'NONSSL'truefalse)); ?></p>
    I then changed (hacked) the line in product_listing.php and ended up with this:

    PHP Code:
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link FILENAME_REDIRECT'action=url&goto=' urlencode($products_url), 'NONSSL'truefalse) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'
    When I hover over the Description, the link shows up to the url&goto=, but the url is missing.

    Any suggestions why or how to properly define the $products_url? I think that missing definition is the problem.

    Thanks again,
    Jeff

  4. #4
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default PHP Help Needed on this PLEASE

    With Kobra's suggestion, and after much searching of the forums, I believe what I said in my last post to be correct.

    As I suspected the $products_url is not valid/defined in product_listing.php.

    A very old post suggests (for a similar problem) to "add a function to do this look up", but offers no example on how to write the function.

    Any help here would be greatly appreciated!

    Thanks again,
    Jeff

 

 

Similar Threads

  1. Remove/change hyperlink from Product Imagees when in the actual cart
    By raphael in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Sep 2014, 01:53 PM
  2. New Product list is different from regular product list
    By elite supplement in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Sep 2012, 12:43 AM
  3. Remove featured product from new product list
    By bamsik in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 22 Feb 2009, 09:19 PM
  4. Remove hyperlink from Product Image
    By KiwiBrian in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Jul 2008, 03:29 AM
  5. Trying to clean up hyperlink decorations from images
    By dbrewster in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Feb 2008, 06:34 PM

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