Only show Alternate currency when it's selected.
Posted: Thu Oct 14, 2010 8:47 am
N.B. I think this is a bad idea as the Cart operates in your usual currency and that's what's passed to the PSP. Thus the following will not be supported.
If you still want to only show the alternate currency when one has been selected. I.e. hide the usual Catalog prices then read on.
The code that displays on Product pages is in norpricesupport.js.
Look for line:
And change to:
The formatting around the price is done by the lines:
So to remove the brackets, amend to be:
Also change the CSS in layout NorPrice Support which is currently:
To say
To fix the Cart display patches would be needed to ActinicOrder.pm
Look for
And change to:
If you still want to only show the alternate currency when one has been selected. I.e. hide the usual Catalog prices then read on.
The code that displays on Product pages is in norpricesupport.js.
Look for line:
Code: Select all
return val[1] + val[2] + val[3] + getalt(thisval, formatted) + val[4]; // return potentially converted text
Code: Select all
return getalt(thisval, formatted) + val[4]; // return potentially converted text
Code: Select all
if ( exchange > hidefraction )
{
return prefix + ' (' + optplus + CommaFormatted(Math.round(altprice)) + ' ' + isoname + ')' + suffix;
}
else
{
return prefix + ' (' + optplus + CommaFormatted(topounds(altprice)) + ' ' + isoname + ')' + suffix;
}
Code: Select all
if ( exchange > hidefraction )
{
return prefix + optplus + CommaFormatted(Math.round(altprice)) + ' ' + isoname + suffix;
}
else
{
return prefix + optplus + CommaFormatted(topounds(altprice)) + ' ' + isoname + suffix;
}
Code: Select all
.altprice {font-size: xx-small; color: blue;}
Code: Select all
.altprice {}
Look for
Code: Select all
if ( $exchange > '<actinic:variable name="HIDEFRACTIONRATE" />' )
{
$sFormattedPrice .= ' (' . CommaFormatted(int($nNorprice + .5 * ($nNorprice <=> 0))) . " $iso)";
}
else
{
$sFormattedPrice .= ' (' . CommaFormatted(sprintf("%1.2f", $nNorprice)) . " $iso)";
}
Code: Select all
if ( $exchange > '<actinic:variable name="HIDEFRACTIONRATE" />' )
{
$sFormattedPrice = CommaFormatted(int($nNorprice + .5 * ($nNorprice <=> 0))) . " $iso";
}
else
{
$sFormattedPrice = CommaFormatted(sprintf("%1.2f", $nNorprice)) . " $iso";
}