List Available Shipping Methods
Thank you Bruce for searching for my problem's solution,
I've tried it, but the MvDo command fails to open for example [flatrate.mvc]
I copied the file into [modules/util/] folder and even then It fails to
execute
"ShippingModule_Shipping_Methods" method.
"File is either corrupt or not a valid compiled Miva Script file"
<MvDO FILE = "flatrate.mvc" NAME = "l.methods" VALUE = "{
ShippingModule_Shipping_Methods() }">
When I experiment with buying a product the methods are displayed correctly.
I suppose that using MvDO command over the compiled file raises the error.
All the best,
Svetoslav
----- Original Message -----
From: "Bruce - Phosphor Media" <[email protected]>
To: <[email protected]>
Sent: Friday, October 22, 2004 7:20 PM
Subject: RE: [mrc] List Available Shipping Methods
> You want this code (from MMUI.mv)
>
> <SELECT NAME = "ShippingMethod">
> <MvASSIGN NAME = "l.totalmethods" VALUE = 0>
> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
> StoreModule_FindFirst_Type( 'SHIPPING' ) }">
> <MvASSIGN NAME = "l.ship_module_last" VALUE = "0">
> <MvWHILE EXPR = "{ l.found }">
> <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.methods"
> VALUE = "{
> ShippingModule_Shipping_Methods() }">
> <MvASSIGN NAME = "l.pos" VALUE = 1>
> <MvASSIGN NAME = "l.method" VALUE = "{ ltrim( rtrim( gettoken( l.methods,
> ',',
> l.pos ) ) ) }">
> <MvIF EXPR = "{ len( l.method ) }">
> <MvASSIGN NAME = "l.ship_module_last" VALUE = "{ l.ship_module_last +
> 1 }">
> <MvASSIGN NAME = "l.ship_module" INDEX = "{ l.ship_module_last }" VALUE =
> "{
> Modules.d.module }">
> </MvIF>
> <MvWHILE EXPR = "{ len( l.method ) }">
> <MvASSIGN NAME = "l.totalmethods" VALUE = "{ l.totalmethods + 1 }">
> <MvASSIGN NAME = "l.code" VALUE = "{ substring( l.method, 1, ( ':' IN
> l.method ) -
> 1 ) }">
> <MvASSIGN NAME = "l.name" VALUE = "{ substring( l.method, ( ':' IN
> l.method ) + 1,
> len( l.method ) - ( ':' IN l.method ) ) }">
> <OPTION VALUE = "{ encodeentities( Modules.d.code ) $ ':' $
> encodeentities(
> l.code ) }"><MvEVAL EXPR = "{ l.name }"></OPTION>
> <MvASSIGN NAME = "l.pos" VALUE = "{ l.pos + 1 }">
> <MvASSIGN NAME = "l.method" VALUE = "{ ltrim( rtrim( gettoken( l.methods,
> ',',
> l.pos ) ) ) }">
> </MvWHILE>
> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
> StoreModule_FindNext_Type( 'SHIPPING' ) }">
> </MvWHILE>
>
> <MvIF EXPR = "{ l.totalmethods EQ 0 }">
> No Methods Found
> </OPTION>
> </MvIF>
> </SELECT>
>
>
> -Bruce
> PHOSPHOR Media
> www.phosphormedia.com
>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]]On Behalf Of Svetoslav
>> Sent: Friday, October 22, 2004 5:50 AM
>> To: [email protected]
>> Subject: [mrc] List Available Shipping Methods
>>
>>
>> Hi to all,
>>
>> I need to list available shipping methods in my miva file.
>> My module is a storeutil type.
>>
>> I am trying:
>>
>> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
>> StoreModule_FindFirst_Type( 'SHIPPING' ) }">
>>
>> <Option selected>
>> <MvDO FILE = "{g.Module_Root $ Modules.d.module}" NAME =
>> "l.methods"
>> VALUE = "{ ShippingModule_Shipping_Methods() }">
>> </Option>
>>
>> Error: Unable to open file or the file is corrupt.
>>
>> Does anyone knows how to list them correctly?
>>
>> All the best,
>> Svetoslav
>> ---
>> Incoming mail is certified Virus Free.
>> Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
>> Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/04
>>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
> Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/04
>
>
Announcement
Collapse
No announcement yet.
List Available Shipping Methods
Collapse
X
-
Guest replied
-
Guest repliedList Available Shipping Methods
You want this code (from MMUI.mv)
<SELECT NAME = "ShippingMethod">
<MvASSIGN NAME = "l.totalmethods" VALUE = 0>
<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
StoreModule_FindFirst_Type( 'SHIPPING' ) }">
<MvASSIGN NAME = "l.ship_module_last" VALUE = "0">
<MvWHILE EXPR = "{ l.found }">
<MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.methods" VALUE = "{
ShippingModule_Shipping_Methods() }">
<MvASSIGN NAME = "l.pos" VALUE = 1>
<MvASSIGN NAME = "l.method" VALUE = "{ ltrim( rtrim( gettoken( l.methods, ',',
l.pos ) ) ) }">
<MvIF EXPR = "{ len( l.method ) }">
<MvASSIGN NAME = "l.ship_module_last" VALUE = "{ l.ship_module_last + 1 }">
<MvASSIGN NAME = "l.ship_module" INDEX = "{ l.ship_module_last }" VALUE = "{
Modules.d.module }">
</MvIF>
<MvWHILE EXPR = "{ len( l.method ) }">
<MvASSIGN NAME = "l.totalmethods" VALUE = "{ l.totalmethods + 1 }">
<MvASSIGN NAME = "l.code" VALUE = "{ substring( l.method, 1, ( ':' IN l.method ) -
1 ) }">
<MvASSIGN NAME = "l.name" VALUE = "{ substring( l.method, ( ':' IN l.method ) + 1,
len( l.method ) - ( ':' IN l.method ) ) }">
<OPTION VALUE = "{ encodeentities( Modules.d.code ) $ ':' $ encodeentities(
l.code ) }"><MvEVAL EXPR = "{ l.name }"></OPTION>
<MvASSIGN NAME = "l.pos" VALUE = "{ l.pos + 1 }">
<MvASSIGN NAME = "l.method" VALUE = "{ ltrim( rtrim( gettoken( l.methods, ',',
l.pos ) ) ) }">
</MvWHILE>
<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
StoreModule_FindNext_Type( 'SHIPPING' ) }">
</MvWHILE>
<MvIF EXPR = "{ l.totalmethods EQ 0 }">
No Methods Found
</OPTION>
</MvIF>
</SELECT>
-Bruce
PHOSPHOR Media
www.phosphormedia.com
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Svetoslav
> Sent: Friday, October 22, 2004 5:50 AM
> To: [email protected]
> Subject: [mrc] List Available Shipping Methods
>
>
> Hi to all,
>
> I need to list available shipping methods in my miva file.
> My module is a storeutil type.
>
> I am trying:
>
> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{
> StoreModule_FindFirst_Type( 'SHIPPING' ) }">
>
> <Option selected>
> <MvDO FILE = "{g.Module_Root $ Modules.d.module}" NAME = "l.methods"
> VALUE = "{ ShippingModule_Shipping_Methods() }">
> </Option>
>
> Error: Unable to open file or the file is corrupt.
>
> Does anyone knows how to list them correctly?
>
> All the best,
> Svetoslav
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
> Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/04
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/04
Leave a comment:
-
Guest started a topic List Available Shipping MethodsList Available Shipping Methods
------=_NextPart_000_0060_01C4B84E.D8001360
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi to all,
I need to list available shipping methods in my miva file.
My module is a storeutil type.
I am trying:
<MvDO FILE =3D "{ g.Module_Library_DB }" NAME =3D "l.found" VALUE =
=3D "{ StoreModule_FindFirst_Type( 'SHIPPING' ) }">
<Option selected>
<MvDO FILE =3D "{g.Module_Root $ Modules.d.module}" NAME =3D =
"l.methods" VALUE =3D "{ ShippingModule_Shipping_Methods() }">
</Option>
Error: Unable to open file or the file is corrupt.
Does anyone knows how to list them correctly?
All the best,
Svetoslav
------=_NextPart_000_0060_01C4B84E.D8001360--
Tags: None
Leave a comment: