Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    If you go to our pay an instalment page, here:

    http://www.silkblooms.co.uk/-p-1652.html

    Can anyone see a way of removing the text that says "Units: 0.01" and "Min: 0.01" from this page only? We used to hide the text with white .jpgs and some strategic positioning coordinates with CSS but cross browser compatibility was causing too many issues. Is there a way to simply remove it fro this page?

    I can't find the file that generates this. Ideally, we'd just have to give it a style tag so we can use display:none in the actual product page.

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    Actually, it looks like /includes/functions/functions_prices.php Line #428:

    PHP Code:
    $the_min_units .= ($the_min_units ' ' '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING ' ' $check_units
    Can anyone help with the syntax that would add a style to this so we can control it by CSS?

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    I tired giving it a style class in english.php but the display:none; CSS doesn't seem to control .instalmentUnits..... can anyone see a better way of doing this?

    PHP Code:
     define('PRODUCTS_QUANTITY_UNIT_TEXT_LISTING''<class="instalmentUnits">  Units: '); 

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    Getting somewhere with this:

    PHP Code:
      define('PRODUCTS_QUANTITY_UNIT_TEXT_LISTING''<h11>  Units: </h11>'); 
    h11{display:none;}

    However this only removes the "Units :" but leaves the 0.01 text.

    Anyone help?

  5. #5
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    I added this to functions_prices.php

    . '<span class="h11">'

    but it removes the add to cart button too

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

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    The text is generated in a function: zen_get_products_quantity_min_units_display() in /includes/functions/functions_prices.php.

    Find about line 438
    PHP Code:
        return $the_min_units
    Just above that, add a line
    PHP Code:
        if ($the_min_units != ''$the_min_units '<span class="minUnits">' $the_min_units '</span>'
    This will add the span only if text is output. You can style .minUnits{} as desired in your stylesheet. If you only want to hide this text for the one product, make a per-product stylesheet named like p_1652.css and put the rule in that.

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    I think I'm approaching this from the wrong angle! Is there a way to disable this when the product id=1652 ?

    PHP Code:
    // Return a products quantity minimum and units display
      
    function zen_get_products_quantity_min_units_display($product_id$include_break true$shopping_cart_msg false) {
        
    $check_min zen_get_products_quantity_order_min($product_id);
        
    $check_units zen_get_products_quantity_order_units($product_id);

        
    $the_min_units='';

        if (
    $check_min != or $check_units != 1) {
          if (
    $check_min != 1) {
            
    $the_min_units .= PRODUCTS_QUANTITY_MIN_TEXT_LISTING '&nbsp;' $check_min;
          }
          if (
    $check_units != 1) {
            
    $the_min_units .= ($the_min_units ' ' '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING '&nbsp;' $check_units;
          } 
    Maybe need to add an 'else' or something in there?

  8. #8
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    Quote Originally Posted by gjh42 View Post
    The text is generated in a function: zen_get_products_quantity_min_units_display() in /includes/functions/functions_prices.php.

    Find about line 438
    PHP Code:
        return $the_min_units
    Just above that, add a line
    PHP Code:
        if ($the_min_units != ''$the_min_units '<span class="minUnits">' $the_min_units '</span>'
    This will add the span only if text is output. You can style .minUnits{} as desired in your stylesheet. If you only want to hide this text for the one product, make a per-product stylesheet named like p_1652.css and put the rule in that.
    Thank you Glen! That works really well but I only need to disable this in product ID 1652 so I'll just add the css to the product description. Thank you!

    Another question though, the same annoying little blighters are on the bottom row of all the product listings, like this one for example:

    http://www.silkblooms.co.uk/enable-a...1_245_376.html

    How would you style it out of the listing pages? I still need to keep it in the product listing pages (other than 1652).

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,871
    Plugin Contributions
    96

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    You could also try this thread (http://www.zen-cart.com/showthread.p...roduct-Listing) where I included code to give each of the min/max/unit items a specific class so that you can hide them via "display: none;" if you choose.

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

    Default Re: Remove the "Units: 0.01 " and the "Min: 0.01" from a Particular Product Page

    Nice, and even more flexible than my code. I opted for the quick method:)

    To style the min/units in product listing pages, try
    Code:
    #productListing .instalmentsMinUnits {display: none;}
    If you only want to hide this text for the one product, make a per-product stylesheet named like p_1652.css and put the rule in that.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 how to remove text "Congratulations! You have..." from the "TEXT_MAIN"?
    By X-youth gone willd in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Dec 2014, 05:33 PM
  2. Need to remove "Units in Stock" from product page
    By kalastaja in forum Basic Configuration
    Replies: 3
    Last Post: 13 Apr 2010, 01:19 AM
  3. Removing "Units" and "Mix on/off" text from customer view?
    By InnaSky in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 8 Dec 2009, 08:31 PM
  4. how do I remove "x Units in Stock" and "Write a Review"?
    By n_kip in forum General Questions
    Replies: 1
    Last Post: 11 Jun 2008, 05:47 PM
  5. Replies: 3
    Last Post: 3 Jun 2008, 11:41 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