Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Help to remove unwanted break tags

    Hi

    On my product listing page are 2 break tags that I would like to remove that do not appear in includes/modules/product_listing.php.

    <div class="product_image"><a href="http://www.handcoded.co.uk/barn/petzl-basic-p-445.html"><img src="images/BASIC.jpg" alt="Petzl Basic" title=" Petzl Basic " width="130" height="130" class="listingProductImage"></a></div><br>

    <div class="product_name"><a href="http://www.handcoded.co.uk/barn/petzl-basic-p-445.html">Petzl Basic...</a></div><br>

    Example page = http://goo.gl/R6M7Hj

    Thanks
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  2. #2
    Join Date
    Jul 2012
    Posts
    16,751
    Plugin Contributions
    17

    Default Re: Help to remove unwanted break tags

    Quote Originally Posted by longstockings View Post
    Hi

    On my product listing page are 2 break tags that I would like to remove that do not appear in includes/modules/product_listing.php.

    <div class="product_image"><a href="http://www.handcoded.co.uk/barn/petzl-basic-p-445.html"><img src="images/BASIC.jpg" alt="Petzl Basic" title=" Petzl Basic " width="130" height="130" class="listingProductImage"></a></div><br>

    <div class="product_name"><a href="http://www.handcoded.co.uk/barn/petzl-basic-p-445.html">Petzl Basic...</a></div><br>

    Example page = http://goo.gl/R6M7Hj

    Thanks
    You say not in modules/product_listing, but what about in the applicable tpl file? Tpl_product_listing? Located either in your template/templates folder or in the template_default/templates folder.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,629
    Plugin Contributions
    88

    Default Re: Help to remove unwanted break tags

    Add to the bottom of your stylesheet.css:
    Code:
    #productListing .product_image+br { display: none; }
    That styling says that within the element with an id of productListing (on the product listing page only), don't display any br's that directly follow something with a class of product_image.

  4. #4
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Help to remove unwanted break tags

    Quote Originally Posted by lat9 View Post
    Add to the bottom of your stylesheet.css:
    Code:
    #productListing .product_image+br { display: none; }
    That styling says that within the element with an id of productListing (on the product listing page only), don't display any br's that directly follow something with a class of product_image.
    This worked perfectly. Thanks very much
    UK based Zen Cart Web Designer here www.handcoded.co.uk

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

    Default Re: Help to remove unwanted break tags

    Your template appears to use the "what's new" centerbox code for the product listing pages, customized some from the original version of that file, as the original has <br /> instead of the not-strictly-HTML-valid <br> in yours.

    Look at /includes/modules/your_template/new_products.php. The original at /includes/modules/new_products.php has
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' $productsInCategory[$new_products->fields['products_id']] . '&products_id=' $new_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' $productsInCategory[$new_products->fields['products_id']] . '&products_id=' $new_products->fields['products_id']) . '">' $new_products->fields['products_name'] . '</a><br />' $products_price); 
    Yo mention /includes/modules/product_listing.php, but do you have a file at /includes/modules/your_template/product_listing.php?
    It is possible that the template maker just substituted the what's new code for some of the original code in product_listing.php, and if so, they should have put the edited file in a template override folder.

    Look in admin > Tools > Developers Toolkit for centerBoxContentsNew which is in the source of your product listing page. Paste centerBoxContentsNew in the lower left box, select "all files" and search. This will show you all places where the text is used.

 

 

Similar Threads

  1. Unwanted page break in featured products on main page
    By jnspire in forum General Questions
    Replies: 2
    Last Post: 31 Jul 2011, 07:38 AM
  2. Help Remove line breaks! <br> tags
    By KThompson in forum General Questions
    Replies: 3
    Last Post: 24 Aug 2008, 03:13 PM
  3. Where are these break tags?
    By GrandmaJ in forum General Questions
    Replies: 6
    Last Post: 19 Mar 2007, 10:18 PM
  4. please help me remove an unwanted link
    By totorox in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Jul 2006, 04:17 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR