Results 1 to 7 of 7
  1. #1
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default how to add div to free shipping image in productListing?

    I've tried probably for a couple of days to add a div to this piece of code in includes/modules/product_listing.php

    $lc_text .= (zen_get_show_product_switch($listing->fields['products_id'],
    'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON_PRODUCTLISTING . '' : '') : '');
    It's near to impossible. I managed to put a div that wraps around the free shipping image but it encapsulates the entire product listing image as well. It seems adding a div is not possible the normal way with this piece of code. I need to be able to close the div statement before it encapsulates the product listing image.

    Anyone whose run into trouble with this one ?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how to add div to free shipping image in productListing?

    How are you adding the <div> to that?

    Have you an URL that shows this issue?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: how to add div to free shipping image in productListing?

    I think I've tried every possible combination that I can come up with, without hitting the right spot. I'm using Dr.Byte's Column Layout Grid for my site. Sometimes when I paste the div's they're distorting the entire page lay-out. And sometimes the free shipping image appears on every product without this setting being invoked from the admin ..

    Site link: http://test.soundfactory.nu/index.ph...ndex&cPath=270

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how to add div to free shipping image in productListing?

    Have you tried adding it to the define for the free shipping icon in the:
    /includes/languages/english/extra_definitions/product_free_shipping.php

    with something like:
    Code:
    switch (true) {
      case ($_GET['main_page'] == 'index'):
        define('TEXT_PRODUCT_FREE_SHIPPING_ICON', '<div class="freeshipping-products_listing">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping') . '</div>'); // for an image or comment out to use another
        break;
      case ($_GET['main_page'] == 'specials'):
        define('TEXT_PRODUCT_FREE_SHIPPING_ICON', '<div class="freeshipping-specials">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping') . '</div>'); // for an image or comment out to use another
        break;
      default:
        define('TEXT_PRODUCT_FREE_SHIPPING_ICON', '<div class="freeshipping-default">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping') . '</div>'); // for an image or comment out to use another
      break;
    }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: how to add div to free shipping image in productListing?

    Man how did you do that??? It works GREAT! I would never have come up with this solution myself ..

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how to add div to free shipping image in productListing?

    Trickie eh? Amaze myself sometimes ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: how to add div to free shipping image in productListing?

    Thanks :)

 

 

Similar Threads

  1. Making entire productListing div clickable
    By pricediscrimination in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 3 Mar 2015, 04:44 PM
  2. Replies: 5
    Last Post: 28 Feb 2014, 12:30 PM
  3. how to add free-shipping image for every products for the product list page
    By vanson in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Feb 2010, 03:36 PM
  4. Div For Free Shipping Image in product_listing
    By bumba000 in forum General Questions
    Replies: 1
    Last Post: 17 May 2008, 01:25 AM
  5. add a div for a stretching BG image ?
    By atracksler in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Dec 2006, 12:57 AM

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