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

Changing Units: X on product lisitng to custom text

Locked

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:

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,513
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'**;

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: