Page 1 of 1

Upgrade to 7.0.4.0.0.0.FEVA

Posted: Thu May 19, 2005 2:17 pm
by Guest
Hi,
I upgraded to version 7.0.4.0.0.0.FEVA. 2 files were modified ActinicOrder.pm and CartManager.pl. Actinic Order.pm:
Differences between old script and user modified script
User inserted lines 6501 to 6547 in user-modified script before line 6500 in original script.
The lines of code:

Code: Select all

#
	# START	Norcat see if dynamic currency is required.
	#
	my $sCookies = $::ENV{'HTTP_COOKIE'};			# try to retrieve the cookie
	$sCookies =~ m/destcurr=(.*?)(;|$)/;			# look for our info
	if ( $1 )
		{
                my $currbits = $1;
	        $currbits =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
		$currbits =~ m/(.*):(.*):(.*)/;
		my $iso = $1;
                my $base = $2;
		my $selected = $3;
 		if ( ($selected > 0) && ($iso ne 'CUSTOMVAR:MAINCURRENCY') && ($iso ne 'CUSTOMVAR:ALTCURRENCY') )
			{
  			my $exchange = $base / $selected;
        		my $nNorprice;
        		#
        		# calculate the other currency price
        		#
        		$nNorprice = $nPrice * $exchange;
        		#
        		# round the price
        		#
        		$nNorprice = RoundTax($nNorprice, $ActinicOrder::SCIENTIFIC_NORMAL) / 100;
        		#
        		# format the price
        		#
        		#
        		# format the other currency prices
        		#
			if ( $exchange > CUSTOMVAR:HIDEFRACTIONRATE )
				{
				$nNorprice = int($nNorprice + .5 * ($nNorprice <=> 0));
				$sFormattedPrice .= sprintf(" (%d $iso)", $nNorprice);
				}
			else
				{
        			$sFormattedPrice .= sprintf(" (%1.2f $iso)", $nNorprice);
				}
			}
		}
	#
	# END Norcat see if dynamic currency is required.
	#

	return ($::SUCCESS, '', $sFormattedPrice, 0);
	}
Do I just copy this code to the new file?

Also CartManager.pl:
Differences between old script and user modified script
User changed line 274 in original script to lines 274 to 275 in user-modified script.

Code: Select all

		}
$sHTML = "<Script Language='JavaScript'>document.location.replace('$sURL');</Script>" . $sHTML;
Same thing?
Thanks

Posted: Thu May 19, 2005 2:18 pm
by tdw
Didn't log me in when I posted message.

Posted: Thu May 19, 2005 8:36 pm
by norman
Whoops. I didn't know there WAS a 7.0.4 yet. I'll be posting ready-to-use patches as soon as possible.

If you want to do it yourself (back up the files first). The additional code for ActinicOrder.pm is completely self-contained and can be dropped in (just before that return ($::SUCCESS, '', $sFormattedPrice, 0); line).

The CartManager.pl mod isn't from NorPrice so you should look to other mods for that one.

Posted: Thu May 19, 2005 10:14 pm
by norman
I've downloaded V704 now.

The files ActinicOrder.pm hasn't changed since V7.0.3 so it's OK to replace the one in Site1 with the one from the V7.0.3 NorPrice download zipfile. That's all you'll need to do to keep NorPrice working.

In summary: Upgrade Actinic to 7.0.4. Then run Actinic and let the SIte Upgrader do its stuff. Finally overwrite ActinicOrder.pm (in Site1) with the one from your 7.0.3 Norprice zipfile.