Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / Changing Units: X on product lisitng to custom text

Changing Units: X on product lisitng to custom text

Locked

Started by chris_parker on 3 Jan 2008, 2:46 AM · Views: 942

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
3 Jan 2008, 2:46 AM
#1
chris_parker avatar

chris_parker

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

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.

3 Jan 2008, 4:32 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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

I don't believe the 6s own anything ... do you need that apostrophe? :unsure:

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 Jan 2008, 7:12 AM
#3
chris_parker avatar

chris_parker

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

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

Ajeh:

I don't believe the 6s own anything ... do you need that apostrophe? :unsure:

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. :smile:

3 Jan 2008, 7:24 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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.

3 Jan 2008, 8:29 AM
#5
chris_parker avatar

chris_parker

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

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

DrByte:

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!

:blush: