Page 4 of 4

not display options values instead of to display text in pro

Posted: Fri Dec 05, 2014 11:12 pm
by gowri
how do to this concept? i want to show the text in product page instead of options values how do display product description pls help me anybody knows this concept?

Re: [Mod]Displaying something other than $0 if no price is given

Posted: Thu Jun 20, 2019 6:22 pm
by swiftelec
I'm not sure if this board is still open.

I'm trying to adapt this code for 1.5.5.1

if ($format && (float)$value == 0) {
$trace = debug_backtrace();
if (isset($trace[1]['class']) && $trace[1]['class'] != 'ControllerModuleCart') {
return 'FREE';
}
}

The problem I'm having is that I would like to add multiple controllers within this code. I have noticed that the home delivery calculator returns the wording "FREE" too and another module I have installed in the admin side which has a 0.00 figure is also FREE.

I have tried coding an array() but I'm not getting anywhere with the code.

Any help would be great.

Re: [Mod]Displaying something other than $0 if no price is given

Posted: Sun Jun 14, 2020 1:32 pm
by arcovirtual
swiftelec wrote:
Thu Jun 20, 2019 6:22 pm
I'm not sure if this board is still open.

I'm trying to adapt this code for 1.5.5.1

if ($format && (float)$value == 0) {
$trace = debug_backtrace();
if (isset($trace[1]['class']) && $trace[1]['class'] != 'ControllerModuleCart') {
return 'FREE';
}
}

The problem I'm having is that I would like to add multiple controllers within this code. I have noticed that the home delivery calculator returns the wording "FREE" too and another module I have installed in the admin side which has a 0.00 figure is also FREE.

I have tried coding an array() but I'm not getting anywhere with the code.

Any help would be great.
I have tried everything, for OC2.3 but nothing works :( Did someone manage to do it in OC2.3?

Re: [Mod]Displaying something other than $0 if no price is given

Posted: Sun Jun 14, 2020 3:20 pm
by cyclops12
arcovirtual wrote:
Sun Jun 14, 2020 1:32 pm


I have tried everything, for OC2.3 but nothing works :( Did someone manage to do it in OC2.3?
Instead of

Code: Select all

if ($format && (float)$value == 0) {
	return 'FREE';
}
Try this for 2.3

Code: Select all

if ((float)$number == 0 && ($format)) {
               return 'FREE';
             }