[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
How do I use variables passed in shipping.asc?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hopefully, a simple question:
When you pass variables to a perl subroutine in shipping.asc, how do you use
them in your subroutine? It seems to pass a multidimensional hash, but I can't
quite figure out how to get the stuff out of it I want.
Here is what I have in shipping.asc:
multiitem Multiple Item Surcharge quantity 0 999999 s
calc_item quantity,weight
What I hope to accomplish is simply to multiply the total weight (I was going
to simply iterate over the weight values and total them), and multiply it by
.05. Then, I am going to multiply that by the (total quantity - 1). Do I need
to iterate over the quantities, too? What is the name of the hash?
Thanks in advance to any answers. This is my ugly hack to the problem of
shipping large items, and coming up with a surcharge that covers the extra cost
of shipping each item separately. I'd be happy to post what I come up with when
I'm finished.
- --
- ------------------------------------------------------------------------
Brian Knotts bknotts@europa.com
Webmaster/Developer/Portland SysAdmin (503) 222-9508
Europa/NWLink Fax: (503) 796-9134
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.7 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE4D01DKV5kReY9sP8RAs/1AJ9pLKILNSlVM7mVCBdoQITyBIW/XwCgqWOl
w1h9u4v0v0ZJO491Btb/NWU=
=1cOn
-----END PGP SIGNATURE-----