UPS Rate Quote

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

UPS Rate Quote

Jonathan Schwarz
I have been using Larry Halff's TC_UPS_RateQuote for some time now. I am
looking into switching to the newer system that uses the updated XMML
system that was referenced in previous posts here.

In the meantime - I am trying to migrate several sites to a Lasso 8
server running on Win2k3 (were on LP6/Win2k) and I am getting errors on
TCP_UPS_RateQuote. Is there something I need to do to make this custom
tag work other than putting the file into the LassoStartup directory?

Is Larry Halff still coming in here? Larry?

Thank You,

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:09 AM
To: [hidden email]
Subject: Re: Redirect problem in Safari

> Redirect problem in Safari

Is there anything in that browser that does work?  ;)


Instead of redirecting, just serve the file virtually:

        Inline (sets username & password for file operations);
            Records;
                $writestuff += blaablaa;
            /Records;
        /Inline;
        File_Serve: $writestuff, -File='myfile.txt', -Type='text/plain';

Or if it's suppose to be served to Excel, you can do this:

        File_Serve: $writestuff, -File='myfile.txt',
-Type='application/vnd.ms-excel';



- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jussi Hirvi
Sent: Monday, January 23, 2006 7:19 AM
To: [hidden email]
Subject: Re: Redirect problem in Safari

Johan Solve ([hidden email]) kirjoitteli (23.1.2006 16:26):
> Redirect_rul should actually have a full url including hostname (a
> lesser known fact). Try that and see if it works any better for you.

I already have it that way. :-) The page structure is approximately as
follows. I have tried to tinker with the code (not methodically), but
the
problem persists. Maybe it's connected to Redirect_URL itself on
Safari??

Inline (sets username & password for file operations);
    Records;
        $writestuff += blaablaa;
    /Records;
    File_Write:'excel/MyFile.txt', $writeStuff, -FileOverwrite;
   
    If: (File_CurrentError) != (Error_NoError);
        'ERRORS OCCURRED: ' + (File_CurrentError);
    Else;
        Sleep:2000;
        $redirect = 'yes';
    /If;
/Inline;

    If: $redirect == 'yes';
Redirect_URL:'http://TheSameDomain.fi/museoliitto/museohistoria/excel/My
File
.txt';
    /If;

- Jussi H.



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Marc Pope-3
Maybe look at Adam's rate quote on Lasso Forge. I think it's a little more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Bil Corry
> Sent: Monday, January 23, 2006 11:09 AM
> To: [hidden email]
> Subject: Re: Redirect problem in Safari
>
>> Redirect problem in Safari
>
> Is there anything in that browser that does work?  ;)
>
>
> Instead of redirecting, just serve the file virtually:
>
> Inline (sets username & password for file operations);
>    Records;
>        $writestuff += blaablaa;
>    /Records;
> /Inline;
> File_Serve: $writestuff, -File='myfile.txt', -Type='text/plain';
>
> Or if it's suppose to be served to Excel, you can do this:
>
> File_Serve: $writestuff, -File='myfile.txt',
> -Type='application/vnd.ms-excel';
>
>
>
> - Bil
>
> ------
>
> Bil Corry
> [hidden email]
>
> Enterprise internet application development and security consulting
>   http://www.fivegeeks.com/
>
> Tools for Rapid Lasso Development
>   http://www.lassoware.com/
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of
> Jussi Hirvi
> Sent: Monday, January 23, 2006 7:19 AM
> To: [hidden email]
> Subject: Re: Redirect problem in Safari
>
> Johan Solve ([hidden email]) kirjoitteli (23.1.2006 16:26):
>> Redirect_rul should actually have a full url including hostname (a
>> lesser known fact). Try that and see if it works any better for you.
>
> I already have it that way. :-) The page structure is approximately as
> follows. I have tried to tinker with the code (not methodically), but
> the
> problem persists. Maybe it's connected to Redirect_URL itself on
> Safari??
>
> Inline (sets username & password for file operations);
>     Records;
>         $writestuff += blaablaa;
>     /Records;
>     File_Write:'excel/MyFile.txt', $writeStuff, -FileOverwrite;
>    
>     If: (File_CurrentError) != (Error_NoError);
>         'ERRORS OCCURRED: ' + (File_CurrentError);
>     Else;
>         Sleep:2000;
>         $redirect = 'yes';
>     /If;
> /Inline;
>
>     If: $redirect == 'yes';
> Redirect_URL:'http://TheSameDomain.fi/museoliitto/museohistoria/excel/My
> File
> .txt';
>     /If;
>
> - Jussi H.
>
>
>
> ============================================
> Attend the Lasso Summit
> February 17-19, 2006 in Fort Lauderdale, FL
> http://www.LassoSummit.com/
> ============================================



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Jonathan Schwarz
In reply to this post by Jonathan Schwarz
Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on

> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Bil Corry
> Sent: Monday, January 23, 2006 11:09 AM
> To: [hidden email]
> Subject: Re: Redirect problem in Safari
>
>> Redirect problem in Safari
>
> Is there anything in that browser that does work?  ;)
>
>
> Instead of redirecting, just serve the file virtually:
>
> Inline (sets username & password for file operations);
>    Records;
>        $writestuff += blaablaa;
>    /Records;
> /Inline;
> File_Serve: $writestuff, -File='myfile.txt', -Type='text/plain';
>
> Or if it's suppose to be served to Excel, you can do this:
>
> File_Serve: $writestuff, -File='myfile.txt',
> -Type='application/vnd.ms-excel';
>
>
>
> - Bil
>
> ------
>
> Bil Corry
> [hidden email]
>
> Enterprise internet application development and security consulting
>   http://www.fivegeeks.com/
>
> Tools for Rapid Lasso Development
>   http://www.lassoware.com/
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of
> Jussi Hirvi
> Sent: Monday, January 23, 2006 7:19 AM
> To: [hidden email]
> Subject: Re: Redirect problem in Safari
>
> Johan Solve ([hidden email]) kirjoitteli (23.1.2006 16:26):
>> Redirect_rul should actually have a full url including hostname (a
>> lesser known fact). Try that and see if it works any better for you.
>
> I already have it that way. :-) The page structure is approximately as
> follows. I have tried to tinker with the code (not methodically), but
> the
> problem persists. Maybe it's connected to Redirect_URL itself on
> Safari??
>
> Inline (sets username & password for file operations);
>     Records;
>         $writestuff += blaablaa;
>     /Records;
>     File_Write:'excel/MyFile.txt', $writeStuff, -FileOverwrite;
>    
>     If: (File_CurrentError) != (Error_NoError);
>         'ERRORS OCCURRED: ' + (File_CurrentError);
>     Else;
>         Sleep:2000;
>         $redirect = 'yes';
>     /If;
> /Inline;
>
>     If: $redirect == 'yes';
>
Redirect_URL:'http://TheSameDomain.fi/museoliitto/museohistoria/excel/My

> File
> .txt';
>     /If;
>
> - Jussi H.
>
>
>
> ============================================
> Attend the Lasso Summit
> February 17-19, 2006 in Fort Lauderdale, FL
> http://www.LassoSummit.com/
> ============================================



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Bil Corry
In reply to this post by Jonathan Schwarz
> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update it for
LP8.  If you post the code for the tag or post a link to it, I can tell you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Marc Pope-3
In reply to this post by Jonathan Schwarz
Lasso 6 was a little more forgiving on variable data types. My guess is that
the original data type might be declared something else which happens
frequently when calling remote calls (probably a net variable type). It
needs to be forced as a string. Do you have the source code? If you do, send
it to me off-list: [hidden email]  if you can't figure it out.

This same thing happened to me on a tag I wrote.

-Marc



On 1/23/06 11:47 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> Marc,
>
> I am and do plan on using it - but right now I need to migrate
> several sites and just need to get the current stuff working - I don't
> have the luxury of the time budget needed to switch the UPS system over
> just yet. This tag worked great on LP6 - and is failing on LP8. Error
> message is very cryptic:
>
> Attempt to modify a frozen value. The value was "Commercial" of type
> "string". (Variant::operator=)
>
> Haven't changed the code any and it works on LP6....
>
> Thanks for the input.
>
> -Jon



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Fletcher Sandbeck
In reply to this post by Jonathan Schwarz
On 1/23/06 at 11:47 AM by [hidden email] (Jonathan Schwarz):

> I am and do plan on using it - but right now I need to migrate
>several sites and just need to get the current stuff working - I don't
>have the luxury of the time budget needed to switch the UPS system over
>just yet. This tag worked great on LP6 - and is failing on LP8. Error
>message is very cryptic:
>
>Attempt to modify a frozen value. The value was "Commercial" of type
>"string". (Variant::operator=)
>
>Haven't changed the code any and it works on LP6....

The issue is that LP8 allows parameters to be passed by-reference to the custom tag.  Many LP6 tags were written assuming that the parameters were passed by-value and in particular situations this can cause a problem when the tag is moved to LP8.

In the definition of the tag add -Copy after the specification for the "Commercial" parameter.  You might want to go ahead and add -Copy after each of the -Required and -Optional parameters.  This will ensure that all the parameters are copied, as they were in LP6.

Define_Tag: 'UPS',
    -Required='Commericial', -Copy,
    -Optional='OtherParam', -Copy;
  ...
/Define_Tag;

Hope this helps,

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Product Specialist              [hidden email]
OmniPilot Software, Inc.                http://www.omnipilot.com

============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Jonathan Schwarz
In reply to this post by Jonathan Schwarz
The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Bil Corry
In reply to this post by Jonathan Schwarz
> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Jonathan Schwarz
In reply to this post by Jonathan Schwarz
OK, thanks, now I have the following (still same error):

<?LassoScript

Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


        // Version: 1.0.1
        // Date: November, 11 2002
        // Author: Trigger Consulting
        // URL: http://www.trigger.biz/
        //
        // This tag retrieves a rate quote from UPS's depricated quick
quote
        // CGI.
        //  
        // Required Parameters:
        //
        // -FromPostal: The postal code from whcih you are shipping.
        //
        // -ToPostal: The postal code to which you are shipping.
        //
        // -Weight: Package weight in lbs.
        //
        // -ServiceLevel: Specifies the shipping service. Options are:
        //
        //     1DM for Next Day Early AM
        //     1DA for Next Day Air
        //     1DAPI for Next Day Air Intra (Puerto Rico)
        //     1DP for Next Day Air Saver
        //     2DM for 2nd Day Air AM
        //     2DA for 2nd Day Air
        //     3DS for 3 Day Select
        //     GND for Ground
        //     STD for Canada Standard
        //     XPR for Worldwide Express
        //     XDM for Worldwide Express Plus
        //     XPD for Worldwide Expedited
        //
        // Optional Parameters:
        //
        // -FromCountry: Either US or PR, for Puerto Rico. Default is
US.
        //
        // -ToCity: The city to which you are shipping.
        //
        // -ToCountry: The code for the country to which you are
shipping.
        //     Default is US.
        //
        // -PackagingType: Specifies the packaging type: Options are:
        //
        //     00 for Your Packaging (Default)
        //     01 for UPS Letter Envelope
        //     03 for UPS Tube
        //     21 for UPS Express Box
        //     24 for UPS Worldwide 25KG Box
        //     25 for UPS Worldwide 10KG Box
        //
        // -RateChart: Package handling information. Options are:
        //
        //     Regular Daily Pickup (Default)
        //     One Time Pickup
        //     Customer Counter
        //     On Call Air
        //     Letter Center
        //
        // -DeliveryType: Specifies delivery destination. Options are:
        //
        //     Residential (Default)
        //     Commercial
        //
        // Returns:
        //
        // This tag returns a map with the following keys: Success,
Service,
        //     FromCountry, FromPostal, ToCountry, ToPostal, ToZone,
Weight,
        //     BaseCharge, OptionalCharge, Charge, GuaranteedBy, Error,
        //     ErrorCode
        //
        // Example:
        //
        // [TC_UPS_RateQuote: -FromPostal='94102', -ToPostal='94107',
-Weight='5',
        //   -DeliveryType='Residential', -ServiceLevel='1DM']
        //
        // Disclaimer:
        // While Trigger Consulting has made every effort to deliver a
high
        // quality product, we do not guarantee that this product is
free from
        // defects.  The software is provided "as is," and you use the
software
        // at your own risk. Trigger Consulting makes no warranties as
to
        // performance, merchantability, fitness for a particular
purpose, or
        // any other warranties whether expressed or implied. No oral or
written
        // communication from or information provided by Trigger
Consulting
        // shall create a warranty. Under no circumstances shall Trigger

        // Consulting be liable for direct, indirect, special,
incidental, or
        // consequential damages resulting from the use, misuse, or
inability to
        // use this software, even if Trigger Consulting has been
advised of the
        // possibility of such damages. These exclusions and limitations
may not
        // apply in all jurisdictions. You may have additional rights
and some
        // of these limitations may not apply to you.
        //
        // AuthorizeNet_ADC_Direct is in the public domain and free for
your
        // use. Obviously, Trigger Consulting would appreciate credit
where
        // credit is due.
        //
        // UPS is a trademark of the United Parcel Service of America,
Inc.
       
        Local: 'RateChart';
        Local: 'FromCountry';
        Local: 'ToCountry';
        Local: 'PackagingType';
        Local: 'DeliveryType';
       
        Local: 'theURL';
        Local: 'theResponseString';
        Local: 'theResponseArray' = (Array);
        Local: 'theResponseMap' = (Map);
       
       
        // Set RateChart variable
       
        If: (Named_Param: '-RateChart') == 'One Time Pickup';
       
                #RateChart = 'One+Time+Pickup';
               
        Else: (Named_Param: '-RateChart') == 'Customer Counter';
       
                #RateChart = 'Customer+Counter';
               
        Else: (Named_Param: '-RateChart') == 'On Call Air';
       
                #RateChart = 'On+Call+Air';
               
        Else: (Named_Param: '-RateChart') == 'Letter Center';
       
                #RateChart = 'Letter+Center';
               
        Else;
       
                #RateChart = 'Regular+Daily+Pickup';
               
        /If;
       
       
        // Set FromCountry variable
       
        If: (Named_Param: '-FromCountry') == 'PR';
       
                #FromCountry = 'PR';
               
        Else;
       
                #FromCountry = 'US';
       
        /If;
       
       
        // Set ToCountry variable
       
        If: (Named_Param: '-ToCountry') == '';
       
                #ToCountry = 'US';
       
        /If;
       
        // Set PackagingType variable
       
        If: (Named_Param: '-PackagingType') == '';
       
                #PackagingType = '00';
       
        /If;
       
       
        // Set DeliveryType variable
       
        If: (Named_Param: '-DeliveryType') == 'Commercial';
       
                #DeliveryType = 'Commercial';
               
        Else;
       
                #DeliveryType = 'Residential';
       
        /If;
       
       
        // Build the URL
       
        Local: 'theURL' =
'http://www.ups.com/using/services/rave/qcostcgi.cgi?';
       
        #theURL += 'accept_UPS_license_agreement=yes';
        #theURL += '&AppVersion=1.2';
        #theURL += '&ActionCode=3';
       
        #theURL += '&ShipperPostalCode=' + (Named_Param: '-FromPostal');
        #theURL += '&ShipperCountry=' + #FromCountry;
        #theURL += '&ConsigneePostalCode=' + (Named_Param: '-ToPostal');
        #theURL += '&ConsigneeCountry=' + #ToCountry;
       
        #theURL += '&PackageActualWeight=' + (Named_Param: '-Weight');
        #theURL += '&PackagingType=' + #PackagingType;
        #theURL += '&RateChart=' + #RateChart;
        #theURL += '&ResidentialInd=' + #DeliveryType;
    #theURL += '&ServiceLevelCode=' + (Named_Param: '-ServiceLevel');
       
        If: (Named_Param: '-ToCity') != '';
       
                #theURL += '&ConsigneeCity=' + (Named_Param: '-ToCity');
               
        /If;
       
       
        // Get the quote
       
        #theResponseString = (Include_URL: #theURL);
       
        // Split the quote components into an array
       
        #theResponseArray = #theResponseString->(Split: '%');
       
        // Parse the quote components and build map
       
        If: #theResponseArray->(Get: 1) == 'UPSOnLine3';
       
                #theResponseMap->(Insert: 'Success' = true);
                #theResponseMap->(Insert: 'Service' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'FromPostal' =
#theResponseArray->(Get: 3));
                #theResponseMap->(Insert: 'FromCountry' =
#theResponseArray->(Get: 4));
                #theResponseMap->(Insert: 'ToPostal' =
#theResponseArray->(Get: 5));
                #theResponseMap->(Insert: 'ToCountry' =
#theResponseArray->(Get: 6));
                #theResponseMap->(Insert: 'ToZone' =
#theResponseArray->(Get: 7));
                #theResponseMap->(Insert: 'Weight' =
#theResponseArray->(Get: 8));
                #theResponseMap->(Insert: 'BaseCharge' =
#theResponseArray->(Get: 9));
                #theResponseMap->(Insert: 'OptionalCharge' =
#theResponseArray->(Get: 10));
                #theResponseMap->(Insert: 'Charge' =
#theResponseArray->(Get: 11));
                #theResponseMap->(Insert: 'GuaranteedBy' =
#theResponseArray->(Get: 12));
                #theResponseMap->(Insert: 'Error' = '');
                #theResponseMap->(Insert: 'ErrorCode' = '');
       
        Else;
       
                #theResponseMap->(Insert: 'Success' = false);
                #theResponseMap->(Insert: 'Service' = '');
                #theResponseMap->(Insert: 'FromPostal' = '');
                #theResponseMap->(Insert: 'FromCountry' = '');
                #theResponseMap->(Insert: 'ToPostal' = '');
                #theResponseMap->(Insert: 'ToCountry' = '');
                #theResponseMap->(Insert: 'ToZone' = '');
                #theResponseMap->(Insert: 'Weight' = '');
                #theResponseMap->(Insert: 'BaseCharge' = '');
                #theResponseMap->(Insert: 'OptionalCharge' = '');
                #theResponseMap->(Insert: 'Charge' = '');
                #theResponseMap->(Insert: 'GuaranteedBy' = '');
                #theResponseMap->(Insert: 'Error' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'ErrorCode' = (Integer:
#theResponseArray->(Get: 3)));
               
        /If;
       
        // Return the map
       
        Return: (#theResponseMap);
       
/Define_Tag;

?>



-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 1:26 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance
is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Bil Corry
In reply to this post by Jonathan Schwarz
> (still same error):

> (still same error)

Hmmm.  Then it probably needs a more thorough re-write (or more effort to track
the issue down).  My suggestion would be to instead create vars out of every
param you're passing in that gives an error.  So instead of this:

        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType='Commercial';

Do this:


        var;'deliverytype' = 'commercial';
        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType=$deliverytype;




- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 10:39 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

OK, thanks, now I have the following (still same error):

<?LassoScript

Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


        // Version: 1.0.1
        // Date: November, 11 2002
        // Author: Trigger Consulting
        // URL: http://www.trigger.biz/
        //
        // This tag retrieves a rate quote from UPS's depricated quick
quote
        // CGI.
        //  
        // Required Parameters:
        //
        // -FromPostal: The postal code from whcih you are shipping.
        //
        // -ToPostal: The postal code to which you are shipping.
        //
        // -Weight: Package weight in lbs.
        //
        // -ServiceLevel: Specifies the shipping service. Options are:
        //
        //     1DM for Next Day Early AM
        //     1DA for Next Day Air
        //     1DAPI for Next Day Air Intra (Puerto Rico)
        //     1DP for Next Day Air Saver
        //     2DM for 2nd Day Air AM
        //     2DA for 2nd Day Air
        //     3DS for 3 Day Select
        //     GND for Ground
        //     STD for Canada Standard
        //     XPR for Worldwide Express
        //     XDM for Worldwide Express Plus
        //     XPD for Worldwide Expedited
        //
        // Optional Parameters:
        //
        // -FromCountry: Either US or PR, for Puerto Rico. Default is
US.
        //
        // -ToCity: The city to which you are shipping.
        //
        // -ToCountry: The code for the country to which you are
shipping.
        //     Default is US.
        //
        // -PackagingType: Specifies the packaging type: Options are:
        //
        //     00 for Your Packaging (Default)
        //     01 for UPS Letter Envelope
        //     03 for UPS Tube
        //     21 for UPS Express Box
        //     24 for UPS Worldwide 25KG Box
        //     25 for UPS Worldwide 10KG Box
        //
        // -RateChart: Package handling information. Options are:
        //
        //     Regular Daily Pickup (Default)
        //     One Time Pickup
        //     Customer Counter
        //     On Call Air
        //     Letter Center
        //
        // -DeliveryType: Specifies delivery destination. Options are:
        //
        //     Residential (Default)
        //     Commercial
        //
        // Returns:
        //
        // This tag returns a map with the following keys: Success,
Service,
        //     FromCountry, FromPostal, ToCountry, ToPostal, ToZone,
Weight,
        //     BaseCharge, OptionalCharge, Charge, GuaranteedBy, Error,
        //     ErrorCode
        //
        // Example:
        //
        // [TC_UPS_RateQuote: -FromPostal='94102', -ToPostal='94107',
-Weight='5',
        //   -DeliveryType='Residential', -ServiceLevel='1DM']
        //
        // Disclaimer:
        // While Trigger Consulting has made every effort to deliver a
high
        // quality product, we do not guarantee that this product is
free from
        // defects.  The software is provided "as is," and you use the
software
        // at your own risk. Trigger Consulting makes no warranties as
to
        // performance, merchantability, fitness for a particular
purpose, or
        // any other warranties whether expressed or implied. No oral or
written
        // communication from or information provided by Trigger
Consulting
        // shall create a warranty. Under no circumstances shall Trigger

        // Consulting be liable for direct, indirect, special,
incidental, or
        // consequential damages resulting from the use, misuse, or
inability to
        // use this software, even if Trigger Consulting has been
advised of the
        // possibility of such damages. These exclusions and limitations
may not
        // apply in all jurisdictions. You may have additional rights
and some
        // of these limitations may not apply to you.
        //
        // AuthorizeNet_ADC_Direct is in the public domain and free for
your
        // use. Obviously, Trigger Consulting would appreciate credit
where
        // credit is due.
        //
        // UPS is a trademark of the United Parcel Service of America,
Inc.
       
        Local: 'RateChart';
        Local: 'FromCountry';
        Local: 'ToCountry';
        Local: 'PackagingType';
        Local: 'DeliveryType';
       
        Local: 'theURL';
        Local: 'theResponseString';
        Local: 'theResponseArray' = (Array);
        Local: 'theResponseMap' = (Map);
       
       
        // Set RateChart variable
       
        If: (Named_Param: '-RateChart') == 'One Time Pickup';
       
                #RateChart = 'One+Time+Pickup';
               
        Else: (Named_Param: '-RateChart') == 'Customer Counter';
       
                #RateChart = 'Customer+Counter';
               
        Else: (Named_Param: '-RateChart') == 'On Call Air';
       
                #RateChart = 'On+Call+Air';
               
        Else: (Named_Param: '-RateChart') == 'Letter Center';
       
                #RateChart = 'Letter+Center';
               
        Else;
       
                #RateChart = 'Regular+Daily+Pickup';
               
        /If;
       
       
        // Set FromCountry variable
       
        If: (Named_Param: '-FromCountry') == 'PR';
       
                #FromCountry = 'PR';
               
        Else;
       
                #FromCountry = 'US';
       
        /If;
       
       
        // Set ToCountry variable
       
        If: (Named_Param: '-ToCountry') == '';
       
                #ToCountry = 'US';
       
        /If;
       
        // Set PackagingType variable
       
        If: (Named_Param: '-PackagingType') == '';
       
                #PackagingType = '00';
       
        /If;
       
       
        // Set DeliveryType variable
       
        If: (Named_Param: '-DeliveryType') == 'Commercial';
       
                #DeliveryType = 'Commercial';
               
        Else;
       
                #DeliveryType = 'Residential';
       
        /If;
       
       
        // Build the URL
       
        Local: 'theURL' =
'http://www.ups.com/using/services/rave/qcostcgi.cgi?';
       
        #theURL += 'accept_UPS_license_agreement=yes';
        #theURL += '&AppVersion=1.2';
        #theURL += '&ActionCode=3';
       
        #theURL += '&ShipperPostalCode=' + (Named_Param: '-FromPostal');
        #theURL += '&ShipperCountry=' + #FromCountry;
        #theURL += '&ConsigneePostalCode=' + (Named_Param: '-ToPostal');
        #theURL += '&ConsigneeCountry=' + #ToCountry;
       
        #theURL += '&PackageActualWeight=' + (Named_Param: '-Weight');
        #theURL += '&PackagingType=' + #PackagingType;
        #theURL += '&RateChart=' + #RateChart;
        #theURL += '&ResidentialInd=' + #DeliveryType;
    #theURL += '&ServiceLevelCode=' + (Named_Param: '-ServiceLevel');
       
        If: (Named_Param: '-ToCity') != '';
       
                #theURL += '&ConsigneeCity=' + (Named_Param: '-ToCity');
               
        /If;
       
       
        // Get the quote
       
        #theResponseString = (Include_URL: #theURL);
       
        // Split the quote components into an array
       
        #theResponseArray = #theResponseString->(Split: '%');
       
        // Parse the quote components and build map
       
        If: #theResponseArray->(Get: 1) == 'UPSOnLine3';
       
                #theResponseMap->(Insert: 'Success' = true);
                #theResponseMap->(Insert: 'Service' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'FromPostal' =
#theResponseArray->(Get: 3));
                #theResponseMap->(Insert: 'FromCountry' =
#theResponseArray->(Get: 4));
                #theResponseMap->(Insert: 'ToPostal' =
#theResponseArray->(Get: 5));
                #theResponseMap->(Insert: 'ToCountry' =
#theResponseArray->(Get: 6));
                #theResponseMap->(Insert: 'ToZone' =
#theResponseArray->(Get: 7));
                #theResponseMap->(Insert: 'Weight' =
#theResponseArray->(Get: 8));
                #theResponseMap->(Insert: 'BaseCharge' =
#theResponseArray->(Get: 9));
                #theResponseMap->(Insert: 'OptionalCharge' =
#theResponseArray->(Get: 10));
                #theResponseMap->(Insert: 'Charge' =
#theResponseArray->(Get: 11));
                #theResponseMap->(Insert: 'GuaranteedBy' =
#theResponseArray->(Get: 12));
                #theResponseMap->(Insert: 'Error' = '');
                #theResponseMap->(Insert: 'ErrorCode' = '');
       
        Else;
       
                #theResponseMap->(Insert: 'Success' = false);
                #theResponseMap->(Insert: 'Service' = '');
                #theResponseMap->(Insert: 'FromPostal' = '');
                #theResponseMap->(Insert: 'FromCountry' = '');
                #theResponseMap->(Insert: 'ToPostal' = '');
                #theResponseMap->(Insert: 'ToCountry' = '');
                #theResponseMap->(Insert: 'ToZone' = '');
                #theResponseMap->(Insert: 'Weight' = '');
                #theResponseMap->(Insert: 'BaseCharge' = '');
                #theResponseMap->(Insert: 'OptionalCharge' = '');
                #theResponseMap->(Insert: 'Charge' = '');
                #theResponseMap->(Insert: 'GuaranteedBy' = '');
                #theResponseMap->(Insert: 'Error' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'ErrorCode' = (Integer:
#theResponseArray->(Get: 3)));
               
        /If;
       
        // Return the map
       
        Return: (#theResponseMap);
       
/Define_Tag;

?>



-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 1:26 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance
is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Jonathan Schwarz
In reply to this post by Jonathan Schwarz
Bil,

        That fixed it... can you explain why using a var rather than the
text value would do that?

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 2:04 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> (still same error):

> (still same error)

Hmmm.  Then it probably needs a more thorough re-write (or more effort
to track
the issue down).  My suggestion would be to instead create vars out of
every
param you're passing in that gives an error.  So instead of this:

        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType='Commercial';

Do this:


        var;'deliverytype' = 'commercial';
        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType=$deliverytype;




- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 10:39 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

OK, thanks, now I have the following (still same error):

<?LassoScript

Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


        // Version: 1.0.1
        // Date: November, 11 2002
        // Author: Trigger Consulting
        // URL: http://www.trigger.biz/
        //
        // This tag retrieves a rate quote from UPS's depricated quick
quote
        // CGI.
        //  
        // Required Parameters:
        //
        // -FromPostal: The postal code from whcih you are shipping.
        //
        // -ToPostal: The postal code to which you are shipping.
        //
        // -Weight: Package weight in lbs.
        //
        // -ServiceLevel: Specifies the shipping service. Options are:
        //
        //     1DM for Next Day Early AM
        //     1DA for Next Day Air
        //     1DAPI for Next Day Air Intra (Puerto Rico)
        //     1DP for Next Day Air Saver
        //     2DM for 2nd Day Air AM
        //     2DA for 2nd Day Air
        //     3DS for 3 Day Select
        //     GND for Ground
        //     STD for Canada Standard
        //     XPR for Worldwide Express
        //     XDM for Worldwide Express Plus
        //     XPD for Worldwide Expedited
        //
        // Optional Parameters:
        //
        // -FromCountry: Either US or PR, for Puerto Rico. Default is
US.
        //
        // -ToCity: The city to which you are shipping.
        //
        // -ToCountry: The code for the country to which you are
shipping.
        //     Default is US.
        //
        // -PackagingType: Specifies the packaging type: Options are:
        //
        //     00 for Your Packaging (Default)
        //     01 for UPS Letter Envelope
        //     03 for UPS Tube
        //     21 for UPS Express Box
        //     24 for UPS Worldwide 25KG Box
        //     25 for UPS Worldwide 10KG Box
        //
        // -RateChart: Package handling information. Options are:
        //
        //     Regular Daily Pickup (Default)
        //     One Time Pickup
        //     Customer Counter
        //     On Call Air
        //     Letter Center
        //
        // -DeliveryType: Specifies delivery destination. Options are:
        //
        //     Residential (Default)
        //     Commercial
        //
        // Returns:
        //
        // This tag returns a map with the following keys: Success,
Service,
        //     FromCountry, FromPostal, ToCountry, ToPostal, ToZone,
Weight,
        //     BaseCharge, OptionalCharge, Charge, GuaranteedBy, Error,
        //     ErrorCode
        //
        // Example:
        //
        // [TC_UPS_RateQuote: -FromPostal='94102', -ToPostal='94107',
-Weight='5',
        //   -DeliveryType='Residential', -ServiceLevel='1DM']
        //
        // Disclaimer:
        // While Trigger Consulting has made every effort to deliver a
high
        // quality product, we do not guarantee that this product is
free from
        // defects.  The software is provided "as is," and you use the
software
        // at your own risk. Trigger Consulting makes no warranties as
to
        // performance, merchantability, fitness for a particular
purpose, or
        // any other warranties whether expressed or implied. No oral or
written
        // communication from or information provided by Trigger
Consulting
        // shall create a warranty. Under no circumstances shall Trigger

        // Consulting be liable for direct, indirect, special,
incidental, or
        // consequential damages resulting from the use, misuse, or
inability to
        // use this software, even if Trigger Consulting has been
advised of the
        // possibility of such damages. These exclusions and limitations
may not
        // apply in all jurisdictions. You may have additional rights
and some
        // of these limitations may not apply to you.
        //
        // AuthorizeNet_ADC_Direct is in the public domain and free for
your
        // use. Obviously, Trigger Consulting would appreciate credit
where
        // credit is due.
        //
        // UPS is a trademark of the United Parcel Service of America,
Inc.
       
        Local: 'RateChart';
        Local: 'FromCountry';
        Local: 'ToCountry';
        Local: 'PackagingType';
        Local: 'DeliveryType';
       
        Local: 'theURL';
        Local: 'theResponseString';
        Local: 'theResponseArray' = (Array);
        Local: 'theResponseMap' = (Map);
       
       
        // Set RateChart variable
       
        If: (Named_Param: '-RateChart') == 'One Time Pickup';
       
                #RateChart = 'One+Time+Pickup';
               
        Else: (Named_Param: '-RateChart') == 'Customer Counter';
       
                #RateChart = 'Customer+Counter';
               
        Else: (Named_Param: '-RateChart') == 'On Call Air';
       
                #RateChart = 'On+Call+Air';
               
        Else: (Named_Param: '-RateChart') == 'Letter Center';
       
                #RateChart = 'Letter+Center';
               
        Else;
       
                #RateChart = 'Regular+Daily+Pickup';
               
        /If;
       
       
        // Set FromCountry variable
       
        If: (Named_Param: '-FromCountry') == 'PR';
       
                #FromCountry = 'PR';
               
        Else;
       
                #FromCountry = 'US';
       
        /If;
       
       
        // Set ToCountry variable
       
        If: (Named_Param: '-ToCountry') == '';
       
                #ToCountry = 'US';
       
        /If;
       
        // Set PackagingType variable
       
        If: (Named_Param: '-PackagingType') == '';
       
                #PackagingType = '00';
       
        /If;
       
       
        // Set DeliveryType variable
       
        If: (Named_Param: '-DeliveryType') == 'Commercial';
       
                #DeliveryType = 'Commercial';
               
        Else;
       
                #DeliveryType = 'Residential';
       
        /If;
       
       
        // Build the URL
       
        Local: 'theURL' =
'http://www.ups.com/using/services/rave/qcostcgi.cgi?';
       
        #theURL += 'accept_UPS_license_agreement=yes';
        #theURL += '&AppVersion=1.2';
        #theURL += '&ActionCode=3';
       
        #theURL += '&ShipperPostalCode=' + (Named_Param: '-FromPostal');
        #theURL += '&ShipperCountry=' + #FromCountry;
        #theURL += '&ConsigneePostalCode=' + (Named_Param: '-ToPostal');
        #theURL += '&ConsigneeCountry=' + #ToCountry;
       
        #theURL += '&PackageActualWeight=' + (Named_Param: '-Weight');
        #theURL += '&PackagingType=' + #PackagingType;
        #theURL += '&RateChart=' + #RateChart;
        #theURL += '&ResidentialInd=' + #DeliveryType;
    #theURL += '&ServiceLevelCode=' + (Named_Param: '-ServiceLevel');
       
        If: (Named_Param: '-ToCity') != '';
       
                #theURL += '&ConsigneeCity=' + (Named_Param: '-ToCity');
               
        /If;
       
       
        // Get the quote
       
        #theResponseString = (Include_URL: #theURL);
       
        // Split the quote components into an array
       
        #theResponseArray = #theResponseString->(Split: '%');
       
        // Parse the quote components and build map
       
        If: #theResponseArray->(Get: 1) == 'UPSOnLine3';
       
                #theResponseMap->(Insert: 'Success' = true);
                #theResponseMap->(Insert: 'Service' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'FromPostal' =
#theResponseArray->(Get: 3));
                #theResponseMap->(Insert: 'FromCountry' =
#theResponseArray->(Get: 4));
                #theResponseMap->(Insert: 'ToPostal' =
#theResponseArray->(Get: 5));
                #theResponseMap->(Insert: 'ToCountry' =
#theResponseArray->(Get: 6));
                #theResponseMap->(Insert: 'ToZone' =
#theResponseArray->(Get: 7));
                #theResponseMap->(Insert: 'Weight' =
#theResponseArray->(Get: 8));
                #theResponseMap->(Insert: 'BaseCharge' =
#theResponseArray->(Get: 9));
                #theResponseMap->(Insert: 'OptionalCharge' =
#theResponseArray->(Get: 10));
                #theResponseMap->(Insert: 'Charge' =
#theResponseArray->(Get: 11));
                #theResponseMap->(Insert: 'GuaranteedBy' =
#theResponseArray->(Get: 12));
                #theResponseMap->(Insert: 'Error' = '');
                #theResponseMap->(Insert: 'ErrorCode' = '');
       
        Else;
       
                #theResponseMap->(Insert: 'Success' = false);
                #theResponseMap->(Insert: 'Service' = '');
                #theResponseMap->(Insert: 'FromPostal' = '');
                #theResponseMap->(Insert: 'FromCountry' = '');
                #theResponseMap->(Insert: 'ToPostal' = '');
                #theResponseMap->(Insert: 'ToCountry' = '');
                #theResponseMap->(Insert: 'ToZone' = '');
                #theResponseMap->(Insert: 'Weight' = '');
                #theResponseMap->(Insert: 'BaseCharge' = '');
                #theResponseMap->(Insert: 'OptionalCharge' = '');
                #theResponseMap->(Insert: 'Charge' = '');
                #theResponseMap->(Insert: 'GuaranteedBy' = '');
                #theResponseMap->(Insert: 'Error' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'ErrorCode' = (Integer:
#theResponseArray->(Get: 3)));
               
        /If;
       
        // Return the map
       
        Return: (#theResponseMap);
       
/Define_Tag;

?>



-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 1:26 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance
is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage


============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Bil Corry
In reply to this post by Jonathan Schwarz
> can you explain why using a var rather than the
> text value would do that?

As Fletcher mentioned, params in LP8 are passed in by reference instead of
copied (unless you explicitly tell it to make a copy).  So when you pass in a
literal value such as 'commercial', you're in fact doing this:

        'commercial' = 'some value set within the ctag';

Since 'commercial' is just a literal string, you can't overwrite it with another
value.  So by passing in a var, it is instead doing this:

        $myvar = 'some value set within the ctag';

Which is valid.


That's the short answer, a more involved one would provide examples and perhaps
an explanation about pointers.  And if you haven't already, be sure to read the
chapter on custom tags in the manual.



- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 11:18 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Bil,

        That fixed it... can you explain why using a var rather than the
text value would do that?

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 2:04 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> (still same error):

> (still same error)

Hmmm.  Then it probably needs a more thorough re-write (or more effort
to track
the issue down).  My suggestion would be to instead create vars out of
every
param you're passing in that gives an error.  So instead of this:

        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType='Commercial';

Do this:


        var;'deliverytype' = 'commercial';
        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType=$deliverytype;




- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 10:39 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

OK, thanks, now I have the following (still same error):

<?LassoScript

Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


        // Version: 1.0.1
        // Date: November, 11 2002
        // Author: Trigger Consulting
        // URL: http://www.trigger.biz/
        //
        // This tag retrieves a rate quote from UPS's depricated quick
quote
        // CGI.
        //  
        // Required Parameters:
        //
        // -FromPostal: The postal code from whcih you are shipping.
        //
        // -ToPostal: The postal code to which you are shipping.
        //
        // -Weight: Package weight in lbs.
        //
        // -ServiceLevel: Specifies the shipping service. Options are:
        //
        //     1DM for Next Day Early AM
        //     1DA for Next Day Air
        //     1DAPI for Next Day Air Intra (Puerto Rico)
        //     1DP for Next Day Air Saver
        //     2DM for 2nd Day Air AM
        //     2DA for 2nd Day Air
        //     3DS for 3 Day Select
        //     GND for Ground
        //     STD for Canada Standard
        //     XPR for Worldwide Express
        //     XDM for Worldwide Express Plus
        //     XPD for Worldwide Expedited
        //
        // Optional Parameters:
        //
        // -FromCountry: Either US or PR, for Puerto Rico. Default is
US.
        //
        // -ToCity: The city to which you are shipping.
        //
        // -ToCountry: The code for the country to which you are
shipping.
        //     Default is US.
        //
        // -PackagingType: Specifies the packaging type: Options are:
        //
        //     00 for Your Packaging (Default)
        //     01 for UPS Letter Envelope
        //     03 for UPS Tube
        //     21 for UPS Express Box
        //     24 for UPS Worldwide 25KG Box
        //     25 for UPS Worldwide 10KG Box
        //
        // -RateChart: Package handling information. Options are:
        //
        //     Regular Daily Pickup (Default)
        //     One Time Pickup
        //     Customer Counter
        //     On Call Air
        //     Letter Center
        //
        // -DeliveryType: Specifies delivery destination. Options are:
        //
        //     Residential (Default)
        //     Commercial
        //
        // Returns:
        //
        // This tag returns a map with the following keys: Success,
Service,
        //     FromCountry, FromPostal, ToCountry, ToPostal, ToZone,
Weight,
        //     BaseCharge, OptionalCharge, Charge, GuaranteedBy, Error,
        //     ErrorCode
        //
        // Example:
        //
        // [TC_UPS_RateQuote: -FromPostal='94102', -ToPostal='94107',
-Weight='5',
        //   -DeliveryType='Residential', -ServiceLevel='1DM']
        //
        // Disclaimer:
        // While Trigger Consulting has made every effort to deliver a
high
        // quality product, we do not guarantee that this product is
free from
        // defects.  The software is provided "as is," and you use the
software
        // at your own risk. Trigger Consulting makes no warranties as
to
        // performance, merchantability, fitness for a particular
purpose, or
        // any other warranties whether expressed or implied. No oral or
written
        // communication from or information provided by Trigger
Consulting
        // shall create a warranty. Under no circumstances shall Trigger

        // Consulting be liable for direct, indirect, special,
incidental, or
        // consequential damages resulting from the use, misuse, or
inability to
        // use this software, even if Trigger Consulting has been
advised of the
        // possibility of such damages. These exclusions and limitations
may not
        // apply in all jurisdictions. You may have additional rights
and some
        // of these limitations may not apply to you.
        //
        // AuthorizeNet_ADC_Direct is in the public domain and free for
your
        // use. Obviously, Trigger Consulting would appreciate credit
where
        // credit is due.
        //
        // UPS is a trademark of the United Parcel Service of America,
Inc.
       
        Local: 'RateChart';
        Local: 'FromCountry';
        Local: 'ToCountry';
        Local: 'PackagingType';
        Local: 'DeliveryType';
       
        Local: 'theURL';
        Local: 'theResponseString';
        Local: 'theResponseArray' = (Array);
        Local: 'theResponseMap' = (Map);
       
       
        // Set RateChart variable
       
        If: (Named_Param: '-RateChart') == 'One Time Pickup';
       
                #RateChart = 'One+Time+Pickup';
               
        Else: (Named_Param: '-RateChart') == 'Customer Counter';
       
                #RateChart = 'Customer+Counter';
               
        Else: (Named_Param: '-RateChart') == 'On Call Air';
       
                #RateChart = 'On+Call+Air';
               
        Else: (Named_Param: '-RateChart') == 'Letter Center';
       
                #RateChart = 'Letter+Center';
               
        Else;
       
                #RateChart = 'Regular+Daily+Pickup';
               
        /If;
       
       
        // Set FromCountry variable
       
        If: (Named_Param: '-FromCountry') == 'PR';
       
                #FromCountry = 'PR';
               
        Else;
       
                #FromCountry = 'US';
       
        /If;
       
       
        // Set ToCountry variable
       
        If: (Named_Param: '-ToCountry') == '';
       
                #ToCountry = 'US';
       
        /If;
       
        // Set PackagingType variable
       
        If: (Named_Param: '-PackagingType') == '';
       
                #PackagingType = '00';
       
        /If;
       
       
        // Set DeliveryType variable
       
        If: (Named_Param: '-DeliveryType') == 'Commercial';
       
                #DeliveryType = 'Commercial';
               
        Else;
       
                #DeliveryType = 'Residential';
       
        /If;
       
       
        // Build the URL
       
        Local: 'theURL' =
'http://www.ups.com/using/services/rave/qcostcgi.cgi?';
       
        #theURL += 'accept_UPS_license_agreement=yes';
        #theURL += '&AppVersion=1.2';
        #theURL += '&ActionCode=3';
       
        #theURL += '&ShipperPostalCode=' + (Named_Param: '-FromPostal');
        #theURL += '&ShipperCountry=' + #FromCountry;
        #theURL += '&ConsigneePostalCode=' + (Named_Param: '-ToPostal');
        #theURL += '&ConsigneeCountry=' + #ToCountry;
       
        #theURL += '&PackageActualWeight=' + (Named_Param: '-Weight');
        #theURL += '&PackagingType=' + #PackagingType;
        #theURL += '&RateChart=' + #RateChart;
        #theURL += '&ResidentialInd=' + #DeliveryType;
    #theURL += '&ServiceLevelCode=' + (Named_Param: '-ServiceLevel');
       
        If: (Named_Param: '-ToCity') != '';
       
                #theURL += '&ConsigneeCity=' + (Named_Param: '-ToCity');
               
        /If;
       
       
        // Get the quote
       
        #theResponseString = (Include_URL: #theURL);
       
        // Split the quote components into an array
       
        #theResponseArray = #theResponseString->(Split: '%');
       
        // Parse the quote components and build map
       
        If: #theResponseArray->(Get: 1) == 'UPSOnLine3';
       
                #theResponseMap->(Insert: 'Success' = true);
                #theResponseMap->(Insert: 'Service' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'FromPostal' =
#theResponseArray->(Get: 3));
                #theResponseMap->(Insert: 'FromCountry' =
#theResponseArray->(Get: 4));
                #theResponseMap->(Insert: 'ToPostal' =
#theResponseArray->(Get: 5));
                #theResponseMap->(Insert: 'ToCountry' =
#theResponseArray->(Get: 6));
                #theResponseMap->(Insert: 'ToZone' =
#theResponseArray->(Get: 7));
                #theResponseMap->(Insert: 'Weight' =
#theResponseArray->(Get: 8));
                #theResponseMap->(Insert: 'BaseCharge' =
#theResponseArray->(Get: 9));
                #theResponseMap->(Insert: 'OptionalCharge' =
#theResponseArray->(Get: 10));
                #theResponseMap->(Insert: 'Charge' =
#theResponseArray->(Get: 11));
                #theResponseMap->(Insert: 'GuaranteedBy' =
#theResponseArray->(Get: 12));
                #theResponseMap->(Insert: 'Error' = '');
                #theResponseMap->(Insert: 'ErrorCode' = '');
       
        Else;
       
                #theResponseMap->(Insert: 'Success' = false);
                #theResponseMap->(Insert: 'Service' = '');
                #theResponseMap->(Insert: 'FromPostal' = '');
                #theResponseMap->(Insert: 'FromCountry' = '');
                #theResponseMap->(Insert: 'ToPostal' = '');
                #theResponseMap->(Insert: 'ToCountry' = '');
                #theResponseMap->(Insert: 'ToZone' = '');
                #theResponseMap->(Insert: 'Weight' = '');
                #theResponseMap->(Insert: 'BaseCharge' = '');
                #theResponseMap->(Insert: 'OptionalCharge' = '');
                #theResponseMap->(Insert: 'Charge' = '');
                #theResponseMap->(Insert: 'GuaranteedBy' = '');
                #theResponseMap->(Insert: 'Error' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'ErrorCode' = (Integer:
#theResponseArray->(Get: 3)));
               
        /If;
       
        // Return the map
       
        Return: (#theResponseMap);
       
/Define_Tag;

?>



-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 1:26 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance
is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage


============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: UPS Rate Quote

Jonathan Schwarz
In reply to this post by Jonathan Schwarz
Thanks Bil and the rest of you for your help on this!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 2:43 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> can you explain why using a var rather than the
> text value would do that?

As Fletcher mentioned, params in LP8 are passed in by reference instead
of
copied (unless you explicitly tell it to make a copy).  So when you pass
in a
literal value such as 'commercial', you're in fact doing this:

        'commercial' = 'some value set within the ctag';

Since 'commercial' is just a literal string, you can't overwrite it with
another
value.  So by passing in a var, it is instead doing this:

        $myvar = 'some value set within the ctag';

Which is valid.


That's the short answer, a more involved one would provide examples and
perhaps
an explanation about pointers.  And if you haven't already, be sure to
read the
chapter on custom tags in the manual.



- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 11:18 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Bil,

        That fixed it... can you explain why using a var rather than the
text value would do that?

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 2:04 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> (still same error):

> (still same error)

Hmmm.  Then it probably needs a more thorough re-write (or more effort
to track
the issue down).  My suggestion would be to instead create vars out of
every
param you're passing in that gives an error.  So instead of this:

        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType='Commercial';

Do this:


        var;'deliverytype' = 'commercial';
        TC_UPS_RateQuote:
                -FromPostal='99999',
                ...
                -DeliveryType=$deliverytype;




- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 10:39 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

OK, thanks, now I have the following (still same error):

<?LassoScript

Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


        // Version: 1.0.1
        // Date: November, 11 2002
        // Author: Trigger Consulting
        // URL: http://www.trigger.biz/
        //
        // This tag retrieves a rate quote from UPS's depricated quick
quote
        // CGI.
        //  
        // Required Parameters:
        //
        // -FromPostal: The postal code from whcih you are shipping.
        //
        // -ToPostal: The postal code to which you are shipping.
        //
        // -Weight: Package weight in lbs.
        //
        // -ServiceLevel: Specifies the shipping service. Options are:
        //
        //     1DM for Next Day Early AM
        //     1DA for Next Day Air
        //     1DAPI for Next Day Air Intra (Puerto Rico)
        //     1DP for Next Day Air Saver
        //     2DM for 2nd Day Air AM
        //     2DA for 2nd Day Air
        //     3DS for 3 Day Select
        //     GND for Ground
        //     STD for Canada Standard
        //     XPR for Worldwide Express
        //     XDM for Worldwide Express Plus
        //     XPD for Worldwide Expedited
        //
        // Optional Parameters:
        //
        // -FromCountry: Either US or PR, for Puerto Rico. Default is
US.
        //
        // -ToCity: The city to which you are shipping.
        //
        // -ToCountry: The code for the country to which you are
shipping.
        //     Default is US.
        //
        // -PackagingType: Specifies the packaging type: Options are:
        //
        //     00 for Your Packaging (Default)
        //     01 for UPS Letter Envelope
        //     03 for UPS Tube
        //     21 for UPS Express Box
        //     24 for UPS Worldwide 25KG Box
        //     25 for UPS Worldwide 10KG Box
        //
        // -RateChart: Package handling information. Options are:
        //
        //     Regular Daily Pickup (Default)
        //     One Time Pickup
        //     Customer Counter
        //     On Call Air
        //     Letter Center
        //
        // -DeliveryType: Specifies delivery destination. Options are:
        //
        //     Residential (Default)
        //     Commercial
        //
        // Returns:
        //
        // This tag returns a map with the following keys: Success,
Service,
        //     FromCountry, FromPostal, ToCountry, ToPostal, ToZone,
Weight,
        //     BaseCharge, OptionalCharge, Charge, GuaranteedBy, Error,
        //     ErrorCode
        //
        // Example:
        //
        // [TC_UPS_RateQuote: -FromPostal='94102', -ToPostal='94107',
-Weight='5',
        //   -DeliveryType='Residential', -ServiceLevel='1DM']
        //
        // Disclaimer:
        // While Trigger Consulting has made every effort to deliver a
high
        // quality product, we do not guarantee that this product is
free from
        // defects.  The software is provided "as is," and you use the
software
        // at your own risk. Trigger Consulting makes no warranties as
to
        // performance, merchantability, fitness for a particular
purpose, or
        // any other warranties whether expressed or implied. No oral or
written
        // communication from or information provided by Trigger
Consulting
        // shall create a warranty. Under no circumstances shall Trigger

        // Consulting be liable for direct, indirect, special,
incidental, or
        // consequential damages resulting from the use, misuse, or
inability to
        // use this software, even if Trigger Consulting has been
advised of the
        // possibility of such damages. These exclusions and limitations
may not
        // apply in all jurisdictions. You may have additional rights
and some
        // of these limitations may not apply to you.
        //
        // AuthorizeNet_ADC_Direct is in the public domain and free for
your
        // use. Obviously, Trigger Consulting would appreciate credit
where
        // credit is due.
        //
        // UPS is a trademark of the United Parcel Service of America,
Inc.
       
        Local: 'RateChart';
        Local: 'FromCountry';
        Local: 'ToCountry';
        Local: 'PackagingType';
        Local: 'DeliveryType';
       
        Local: 'theURL';
        Local: 'theResponseString';
        Local: 'theResponseArray' = (Array);
        Local: 'theResponseMap' = (Map);
       
       
        // Set RateChart variable
       
        If: (Named_Param: '-RateChart') == 'One Time Pickup';
       
                #RateChart = 'One+Time+Pickup';
               
        Else: (Named_Param: '-RateChart') == 'Customer Counter';
       
                #RateChart = 'Customer+Counter';
               
        Else: (Named_Param: '-RateChart') == 'On Call Air';
       
                #RateChart = 'On+Call+Air';
               
        Else: (Named_Param: '-RateChart') == 'Letter Center';
       
                #RateChart = 'Letter+Center';
               
        Else;
       
                #RateChart = 'Regular+Daily+Pickup';
               
        /If;
       
       
        // Set FromCountry variable
       
        If: (Named_Param: '-FromCountry') == 'PR';
       
                #FromCountry = 'PR';
               
        Else;
       
                #FromCountry = 'US';
       
        /If;
       
       
        // Set ToCountry variable
       
        If: (Named_Param: '-ToCountry') == '';
       
                #ToCountry = 'US';
       
        /If;
       
        // Set PackagingType variable
       
        If: (Named_Param: '-PackagingType') == '';
       
                #PackagingType = '00';
       
        /If;
       
       
        // Set DeliveryType variable
       
        If: (Named_Param: '-DeliveryType') == 'Commercial';
       
                #DeliveryType = 'Commercial';
               
        Else;
       
                #DeliveryType = 'Residential';
       
        /If;
       
       
        // Build the URL
       
        Local: 'theURL' =
'http://www.ups.com/using/services/rave/qcostcgi.cgi?';
       
        #theURL += 'accept_UPS_license_agreement=yes';
        #theURL += '&AppVersion=1.2';
        #theURL += '&ActionCode=3';
       
        #theURL += '&ShipperPostalCode=' + (Named_Param: '-FromPostal');
        #theURL += '&ShipperCountry=' + #FromCountry;
        #theURL += '&ConsigneePostalCode=' + (Named_Param: '-ToPostal');
        #theURL += '&ConsigneeCountry=' + #ToCountry;
       
        #theURL += '&PackageActualWeight=' + (Named_Param: '-Weight');
        #theURL += '&PackagingType=' + #PackagingType;
        #theURL += '&RateChart=' + #RateChart;
        #theURL += '&ResidentialInd=' + #DeliveryType;
    #theURL += '&ServiceLevelCode=' + (Named_Param: '-ServiceLevel');
       
        If: (Named_Param: '-ToCity') != '';
       
                #theURL += '&ConsigneeCity=' + (Named_Param: '-ToCity');
               
        /If;
       
       
        // Get the quote
       
        #theResponseString = (Include_URL: #theURL);
       
        // Split the quote components into an array
       
        #theResponseArray = #theResponseString->(Split: '%');
       
        // Parse the quote components and build map
       
        If: #theResponseArray->(Get: 1) == 'UPSOnLine3';
       
                #theResponseMap->(Insert: 'Success' = true);
                #theResponseMap->(Insert: 'Service' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'FromPostal' =
#theResponseArray->(Get: 3));
                #theResponseMap->(Insert: 'FromCountry' =
#theResponseArray->(Get: 4));
                #theResponseMap->(Insert: 'ToPostal' =
#theResponseArray->(Get: 5));
                #theResponseMap->(Insert: 'ToCountry' =
#theResponseArray->(Get: 6));
                #theResponseMap->(Insert: 'ToZone' =
#theResponseArray->(Get: 7));
                #theResponseMap->(Insert: 'Weight' =
#theResponseArray->(Get: 8));
                #theResponseMap->(Insert: 'BaseCharge' =
#theResponseArray->(Get: 9));
                #theResponseMap->(Insert: 'OptionalCharge' =
#theResponseArray->(Get: 10));
                #theResponseMap->(Insert: 'Charge' =
#theResponseArray->(Get: 11));
                #theResponseMap->(Insert: 'GuaranteedBy' =
#theResponseArray->(Get: 12));
                #theResponseMap->(Insert: 'Error' = '');
                #theResponseMap->(Insert: 'ErrorCode' = '');
       
        Else;
       
                #theResponseMap->(Insert: 'Success' = false);
                #theResponseMap->(Insert: 'Service' = '');
                #theResponseMap->(Insert: 'FromPostal' = '');
                #theResponseMap->(Insert: 'FromCountry' = '');
                #theResponseMap->(Insert: 'ToPostal' = '');
                #theResponseMap->(Insert: 'ToCountry' = '');
                #theResponseMap->(Insert: 'ToZone' = '');
                #theResponseMap->(Insert: 'Weight' = '');
                #theResponseMap->(Insert: 'BaseCharge' = '');
                #theResponseMap->(Insert: 'OptionalCharge' = '');
                #theResponseMap->(Insert: 'Charge' = '');
                #theResponseMap->(Insert: 'GuaranteedBy' = '');
                #theResponseMap->(Insert: 'Error' =
#theResponseArray->(Get: 2));
                #theResponseMap->(Insert: 'ErrorCode' = (Integer:
#theResponseArray->(Get: 3)));
               
        /If;
       
        // Return the map
       
        Return: (#theResponseMap);
       
/Define_Tag;

?>



-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 1:26 PM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Let me know what you think needs changing, thanks!

Ugh, the whole tag.  Named_param has been deprecated, it's performance
is poor.
But to patch it up, try replacing this:

        Define_Tag: 'TC_UPS_RateQuote';

with this:

        Define_Tag: 'TC_UPS_RateQuote',
                -required='FromPostal', -copy,
                -required='ToPostal', -copy,
                -required='Weight', -copy,
                -required='ServiceLevel', -copy,
                -optional='FromCountry', -copy,
                -optional='ToCity', -copy,
                -optional='ToCountry', -copy,
                -optional='PackagingType', -copy,
                -optional='RateChart', -copy,
                -optional='DeliveryType', -copy;


(which is what Fletcher was talking about)


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 9:43 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

The tag is freely available at
http://www.lassoscripts.com/view_script.lasso?sid=e80a87bc46f5e8ae&tc=sc

Let me know what you think needs changing, thanks!

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bil Corry
Sent: Monday, January 23, 2006 11:53 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

> Haven't changed the code any and it works on LP6....

There's a change to how parameters are handled.  You'll need to update
it for
LP8.  If you post the code for the tag or post a link to it, I can tell
you what
needs to be modified in order to make it work.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of
Jonathan Schwarz
Sent: Monday, January 23, 2006 8:47 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Marc,

        I am and do plan on using it - but right now I need to migrate
several sites and just need to get the current stuff working - I don't
have the luxury of the time budget needed to switch the UPS system over
just yet. This tag worked great on LP6 - and is failing on LP8. Error
message is very cryptic:

Attempt to modify a frozen value. The value was "Commercial" of type
"string". (Variant::operator=)

Haven't changed the code any and it works on LP6....

        Thanks for the input.

-Jon

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Marc Pope
Sent: Monday, January 23, 2006 11:34 AM
To: [hidden email]
Subject: Re: UPS Rate Quote

Maybe look at Adam's rate quote on Lasso Forge. I think it's a little
more
up to date than Larry's...

http://www.lassoforge.net/projects.lasso?PR=38

Marc


On 1/23/06 11:17 AM, "Jonathan Schwarz" <[hidden email]>
wrote:

> I have been using Larry Halff's TC_UPS_RateQuote for some time now. I
am
> looking into switching to the newer system that uses the updated XMML
> system that was referenced in previous posts here.
>
> In the meantime - I am trying to migrate several sites to a Lasso 8
> server running on Win2k3 (were on LP6/Win2k) and I am getting errors
on
> TCP_UPS_RateQuote. Is there something I need to do to make this custom
> tag work other than putting the file into the LassoStartup directory?
>
> Is Larry Halff still coming in here? Larry?
>
> Thank You,
>
> -Jon
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage


============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage