Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: [mv] Forcing new shipping selection



******    message to minivend-users from Michael James <mwjames@ak.planet.gen.nz>     ******

Hi,

Is the standard checkout page method not sufficient.
Being in NZ instead of the US I added a some countries called NZAK, NZNI 
and NZSI to the country.asc file plus shipping costs to shipping.asc
Carefully replaced US with NZAK and the appropriate ship mode in the 
beginning of checkout.html
Down at the select section of the page I played around with the if 
statement for the select list without any luck. I could not successfully 
change the short list which had US and CA to NZAK, NZNI and NZSI. So have 
just got the full country list with NZAK as default.

[if !value country]
	Set country to: [value name=country set="NZAK"]
	Set save_country to: [value name=save_country set="NZAK"]
	Set mv_shipmode to: [value name=mv_shipmode set="surf_NZAK"]
[elsif type=explicit
		compare="[calc]
					q{[value country]} ne q{[value save_country]}
				[/calc]"]
	Set saved country to: [value name=save_country set="[value country]"]
	Set shipmode to:
		[value name=mv_shipmode
				set="[calc]
						$mode = q{[data
										table=country
										col=shipmodes
										key='[value country]'
										]};
						$mode =~ s/\s.*//;
						return $mode;
					[/calc]"
				]
[/elsif]
[/if]

<snip>
Deleted the IF statement and left this.

		<SELECT MV="loop"
			MV.PREPEND="[sort country:name]"
			MV.SEARCH="ra=yes/fi=country.asc/ml=1000"
			onChange="this.form.submit()"
			MV.OPTION="country"
			NAME="country">
			<OPTION VALUE="[loop-code]"> [loop-data country name]
		</SELECT>

Michael

Planet Communications,  mwjames Consulting,  Pacific Consultants,
mwjames@pl.net , mike@pacificconsult.co.nz
Tel (09) 629 0617
Fax (09) 629 0616
Mob 021 708 460


The construction of the select list was solved by the usertag as now
only valid shipping codes are presented.  But as the customer hasn't
actually selected the code yet, the value of Shipping displayed the
first time the checkout page is displayed is wrong.

I have a bit of Perl to calculate the correct value for mv_shipmode, but
how do I assign it.  I tried [value name=mv_shipmode
set="[calc]...[/calc]"] but that didn't seem to work. It just displayed
the correct code on the page.

To make the assignment directly from perl i.e. in the calc what do I do.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen Eustace, on behalf of
GodZone Internet Services, a division of AGRE Enterprises Limited.
P.O. Box 8020, Palmerston North, New Zealand
Ph: +64 6 356 2562, Fax: +64 6 357 0271, Mobile: 021 424 015,
http://WWW.GodZone.Net.NZ

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to 
Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: