Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jun 2004
    Location
    Northern Rivers, NSW
    Posts
    159
    Plugin Contributions
    0

    Default Strange Line Break issue

    I'm running the featured products on my index page (without header text) and for some reason, the free product's price that is featured seems to have an extra line break in the code somewhere. It sits lower on the product page as well.
    To view it, go to Shop Wicked

    I tried editing includes>modules>MY_TEMPLATE>featured_products.php but when I remove the <br /> between the product name and the product price, all the other prices move up next to the name, while the free product goes into the correct position.
    I also tried editing out breaks from includes>template>MY_TEMPLATE>templates>tpl_modules_products_featured_listing.ph p but that didn't change anything - which I assumed it wouldn't as I figure that is the listing page.

    So I am stumped as to where this extra line break might be hiding. Does anyone know where I might look? I have tried all the files that the Developers Toolkit gave me when I searched 'Free' (which was a lot LOL).

    For clarity, I have edited 'It's Free!' to show as '$0.00' on my store.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,965
    Plugin Contributions
    96

    Default Re: Strange Line Break issue

    You could edit /includes/templates/Wicked21/css/stylesheet.css to add:
    Code:
    #featuredProducts > .WickedOne br+br { display: none; }

  3. #3
    Join Date
    Jun 2004
    Location
    Northern Rivers, NSW
    Posts
    159
    Plugin Contributions
    0

    Default Re: Strange Line Break issue

    Thank you, that did the trick. Didn't even dawn on me! Looking at it for too long LOL

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,965
    Plugin Contributions
    96

    Default Re: Strange Line Break issue

    You're very welcome.

  5. #5
    Join Date
    Jun 2004
    Location
    Northern Rivers, NSW
    Posts
    159
    Plugin Contributions
    0

    Default Re: Strange Line Break issue

    Unfortunately it didn't change the same problem on the product page. It's really got me wondering where the extra line break is to affect both.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,965
    Plugin Contributions
    96

    Default Re: Strange Line Break issue

    For both cases, the price is being generated by the zen_get_products_display_price function in /includes/functions/functions_prices.php. When the price is free, it's adding an extra <br /> before the price
    Code:
        // If Free, Show it
        if ($product_check->fields['product_is_free'] == '1') {
          if (OTHER_IMAGE_PRICE_IS_FREE_ON=='0') {
            $free_tag = '<br />' . PRODUCTS_PRICE_IS_FREE_TEXT;
          } else {
            $free_tag = '<br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_PRICE_IS_FREE, PRODUCTS_PRICE_IS_FREE_TEXT);
          }
        }
    Although you could change this core file to remove those br tags that you don't want, I'd suggest simply adding to the stylesheet definition:
    Code:
    #featuredProducts > .WickedOne br+br, #productprices > br { display: none; }

 

 

Similar Threads

  1. Line break
    By Soniccc in forum General Questions
    Replies: 9
    Last Post: 10 Jun 2011, 10:43 AM
  2. line break..
    By Soniccc in forum General Questions
    Replies: 8
    Last Post: 9 Mar 2011, 09:47 PM
  3. Line Break, and how
    By jorsara in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 22 Nov 2009, 02:48 PM
  4. Line Break in EZ-Pages
    By fightthefourwalls in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Sep 2008, 10:14 PM
  5. Line break
    By ABLT Supplies in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 Jun 2008, 11:42 AM

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