Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    61
    Plugin Contributions
    0

    Default Changing Units: X on product lisitng to custom text

    Hi Everyone,

    I will probably need an experienced zenner to answer this one.

    I have changed "Units:" in english.php to read "Order in:".

    I now need to add \'s after the $UnitQuantity in the code so that my listing read like this:

    Order in: 6's rather than Order in: 6

    I have searched the code and found this in functions_prices.php

    if ($check_units > 1) {

    $the_min_units .= ($the_min_units ? ' ' : '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING . ' ' . $check_units;

    }

    I think this is what I want, however no matter how i try adding 's or \'s to the end of $check_units it does not show on the product listing.

    How can I get that little old 's to show after my unit quantities?

    Many thanks.

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

    Default Re: Changing Units: X on product lisitng to custom text

    I don't believe the 6s own anything ... do you need that apostrophe?
    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!]
    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
    Dec 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: Changing Units: X on product lisitng to custom text

    Quote Originally Posted by Ajeh View Post
    I don't believe the 6s own anything ... do you need that apostrophe?
    Hi Ajeh,
    Thanks for the reply.
    Unfortunately, yes I do need to have the product info listing saying Order in: 3's (or 6's) rather than Order in: 3 (or 6).

    My alternative is "Order in multiples of: X" which would be ideal but is too long.

    Can you (or anybody else) think of a way of expressing this message?

    Whilst I'm on, I also wanted to add the word "each" after the price display.

    Sorry if I'm being a bit of a pain or sound pedantic, but it's for quite a big site and once the revenue arrives I will donate handsomely to the Zencart project.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Changing Units: X on product lisitng to custom text

    This appears to work fine:

    $the_min_units .= ($the_min_units ? ' ' : '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING . ' ' . $check_units . 's';
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: Changing Units: X on product lisitng to custom text

    Quote Originally Posted by DrByte View Post
    This appears to work fine:

    $the_min_units .= ($the_min_units ? ' ' : '' ) . PRODUCTS_QUANTITY_UNIT_TEXT_LISTING . ' ' . $check_units . 's';
    That is weird. That is exactly what I did 3 or 4 times before and yet I saw nothing.
    This time when I did it, it worked!

    Did you wave your magic 25,000+ posts wand Dr Byte? If so, thankyou very much!


 

 

Similar Threads

  1. Changing the text for "0 units in stock"
    By EmmaThePoly in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 16 Mar 2016, 05:39 AM
  2. Custom Text Below Featured Product on Home Page
    By susb8383 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 22 Feb 2011, 01:38 AM
  3. Product Listing Quantity and Custom Text
    By buildingblocks in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Jul 2010, 05:25 PM

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