Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2011
    Posts
    15
    Plugin Contributions
    0

    Default On 'product list page' I need an extra icon to appear when the product has an url.

    On the 'product list page' I need an extra icon to appear over a products image when the product has a "product url".

    I thought it would be something like:
    <?php
    if ($products_url !== "") {
    echo '<img src="images/dm.gif">';
    };
    ?>

    Any ideas?
    Regards,
    Carlos.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    20,981
    Plugin Contributions
    25

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    $products_url is not used in product_listing.php. I don't have time at the moment to see if it is available from upstream - have you checked this? If it is available, your code looks good. If not, you would have to add that to the list of fields retrieved from the db upstream and put it into the appropriate array.

  3. #3
    Join Date
    Dec 2011
    Posts
    15
    Plugin Contributions
    0

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    Sorry, I'm not that experienced, is there anybody that knows how to do it?

  4. #4
    Join Date
    Dec 2011
    Posts
    15
    Plugin Contributions
    0

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    Do you know where I can find the specific list of field?

  5. #5
    Join Date
    Feb 2010
    Location
    New York
    Posts
    969
    Plugin Contributions
    3

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    you need to add (pd.products_url) to your /includes/index_filters/YOUR_TEMPLATE/default_filter.php file in 4 different places

    look for something that starts like this:
    // We are asked to show only a specific category
    $listing_sql = "select " . $select_column_list . " p.products_id,

    ADD:
    pd.products_url,

    you will need to do this in 4 places in that file

    then in /includes/modules/YOUR_TEMPLATE/product_listing.php

    Find:
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? 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']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';

    ADD after it:

    if (zen_not_null($listing->fields['products_url'])) {
    $lc_text .= zen_image(DIR_WS_IMAGES . 'dm.gif', 'ADD_IMAGE_ALT_HERE', 'ADD_IMAGE_WIDTH_HERE','ADD_IMAGE_HEIGHT_HERE', 'class="imageOverlay"');
    }

    but before:
    }
    }
    break;
    Last edited by rbarbour; 20 Apr 2012 at 05:43 PM.

  6. #6
    Join Date
    Dec 2011
    Posts
    15
    Plugin Contributions
    0

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    Dear rbarbour,

    Thank you so much for helping me out!!

  7. #7
    Join Date
    Feb 2010
    Location
    New York
    Posts
    969
    Plugin Contributions
    3

    Default Re: On 'product list page' I need an extra icon to appear when the product has an url

    np, glad I could help!

 

 

Similar Threads

  1. Product List Columns - Extra Rows
    By coxdabd in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Nov 2010, 03:41 PM
  2. Removing category icon/product main image on product info page
    By cochlear in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 28 Oct 2010, 04:42 AM
  3. I have created a product list and can't find the URL to link to the products.
    By upperRoomTickets in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 14 Mar 2010, 09:37 PM
  4. How would I change Product URL in Product Type Info Page to a different name
    By wtashby in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Nov 2008, 11:11 PM
  5. Add to cart in the product list takes me to the product info page
    By misspot in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 May 2007, 12:42 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
  •