Page 1 of 1

Price Problem

Posted: Thu Apr 07, 2011 4:53 pm
by ham
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 :)

Re: Price Problem

Posted: Thu Apr 07, 2011 8:17 pm
by SXGuy
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.

Re: Price Problem

Posted: Mon Apr 11, 2011 9:13 pm
by ham
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. :)