Post by ham » Thu Apr 07, 2011 4:53 pm

Hi everyone,
i am new to open cart and just learning how to use it so go easy on me please.

i have a problem where i want to display alphabetic characters for a product instead of numeric.
i have tried just entering the letters but it just sets the price to £0.00

for example: instead of a product displaying at £10.00 i want it to display POR (price on request) or any other letters i wish to display?

does anyone have any suggestions?

i have using version Version 1.4.9.1

thanks in advance :)

ham
Newbie

Posts

Joined
Sat Mar 19, 2011 2:57 am

Post by SXGuy » Thu Apr 07, 2011 8:17 pm

you cant change the amount of a product to a word or use letters, doesnt work that way.

what you can do is modify the files so it shows price on request instead of a price.

1. EDIT: system/library/currency.php (or system/helper/currency.php for certain versions)

2. FIND:

Code: Select all

$string = '';
3. BEFORE, ADD:

Code: Select all

if ($format && (float)$value == 0) {
   return 'Price on Request';
}
So any products which are £0 will display price on request instead.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by ham » Mon Apr 11, 2011 9:13 pm

SXGuy that code did the trick, however a slight problem is that it shows the same response on the admin home screen, for total number of sales.

i know it wont be a problem when a sale is made, i just thought i would point it out. :)

ham
Newbie

Posts

Joined
Sat Mar 19, 2011 2:57 am
Who is online

Users browsing this forum: No registered users and 124 guests