Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    red flag clickable links in main product listing page, possible?

    i want to remove the product info page but in the product listing page i need to make either some or all of the product description text or image into a link that would link to an external site

    what i am doing is building an affiliate site for a customer using zen cart as the base of the site
    take a look here http://www.the-highstreet.org/

    so i dont need most of the ecommerce features
    im using the products features to list the companies that he is advertising on his site so a product is really an advertiser
    but what my client insists on is for his customers to be able to just click on the product description on the product listing page and a new window open with the advertisers own website there

    does that make any sense?
    if not ask questions and i will try to clarify

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: clickable linbks in main product listing page, possible?

    Makes sense, but you don't want to do it (although I have to admit I'm not sure I understand why you want to use Zencart in the first place if you 'don't need the ecommerce features').

    Zencart isn't meant to be a backend cart script, and moving back and forth between Zencart and another site causes all manner of sessions problems.

  3. #3
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    Default Re: clickable links in main product listing page, possible?

    i do want to do it otherwise i wouldnt have asked lol

    session wont be a problem as the new site will open in a new window

    zencart made it easy to add and remove advertisers and the banner manager is perfect to easily administer the main page banners

    all i want to know is:
    1, is it possible
    2, how do i do it

    please bare in mind im not a good php coder but i can modify php fioles if there are clear enough instructions

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: clickable links in main product listing page, possible?

    The whole point of this site is apparently for finding advertisers, so the question is reasonable in that context.

    You can use HTML in product descriptions, so with a tiny tweak to /includes/modules/your_template/product_listing.php the listing description can have the external link. Find this section
    PHP Code:
            if (isset($_GET['manufacturers_id'])) {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>' ;
            } else {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>';
            } 
    and comment out zen_clean_html like this
    /*zen_clean_html*/
    in two places to get
    PHP Code:
            if (isset($_GET['manufacturers_id'])) {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>' ;
            } else {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>';
            } 

  5. #5
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    Default Re: clickable links in main product listing page, possible?

    Quote Originally Posted by gjh42 View Post
    The whole point of this site is apparently for finding advertisers, so the question is reasonable in that context.

    You can use HTML in product descriptions, so with a tiny tweak to /includes/modules/your_template/product_listing.php the listing description can have the external link. Find this section
    PHP Code:
            if (isset($_GET['manufacturers_id'])) {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>' ;
            } else {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>';
            } 
    and comment out zen_clean_html like this
    /*zen_clean_html*/
    in two places to get
    PHP Code:
            if (isset($_GET['manufacturers_id'])) {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>' ;
            } else {
              
    $lc_text .= '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $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>';
            } 
    your an absolute star this is exactly what i wanted
    thank you very much

 

 

Similar Threads

  1. v155 Clickable image on main page
    By HeleneWallis in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 14 Jul 2016, 02:22 AM
  2. Replies: 0
    Last Post: 6 Jul 2012, 08:52 PM
  3. Main Page Define - Product Listing above Main Text?
    By SaMortensen in forum Basic Configuration
    Replies: 22
    Last Post: 31 Jul 2009, 05:12 AM
  4. Insert clickable links in product description
    By liver_pudding in forum General Questions
    Replies: 6
    Last Post: 20 Mar 2008, 06:46 AM
  5. Header image with clickable links in it...possible?
    By shelbydesignshoppe in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Sep 2007, 08:24 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