[ic] Shipping tag with cascading methods in shipping.asc

Rick Bragg lists at gmnet.net
Fri Aug 20 23:01:11 UTC 2010


Hi;

My overall objective is to offer Ground, 3 Day service, and free
shipping on carts that total $200.  But also, since some items are very
large, I wrote a tag that looks at each item in the cart and applies an
additional cost for some items...  Also, I wrote another tag that tests
to see if there is an item in the cart that is "not allowed" to be
shipped by a particular method.  This tag returns 0 if an items is not
allowed, and 1 if there are no problems with the cart, then forwards to
a weight based system.  This works no problems, however, if I forward to
a price based system first to see if the cart is over 200, then forward
again to the final weight based system there are problems.


In country.txt for US, I have the following:
 free_z1 ups_ground_res_z1 ups_3day_z1


Here is my shipping.asc:

ups_3day_z1:   UPS 3 Day Select test - Zone 1
        criteria        [noship_item method=ups_3day_z1]
        min             0
        max             0
        cost            e Can not ship item by UPS 3 Day Select - Zone 1.
        min             1
        max             1
        cost    >>ups_3day_z1_weight

ups_3day_z1_weight: UPS 3 Day Select test2 - Zone 1
	criteria	weight
	min		0
	max		4
	cost 		f 19 + [shipping_cost method='ups_3day_z1' mode='none']
	min		4
	max		15
	cost 		f 25 + [shipping_cost method='ups_3day_z1' mode='none']
	min		15
	max		25
	cost 		f 45 + [shipping_cost method='ups_3day_z1' mode='none']
	min		25
	max		9999999
	cost		e Will quote shipping cost.



ups_ground_res_z1:   UPS Ground - Zone 1
        criteria        [noship_item method=ups_ground_res_z1]
        min             1
        max             1
        cost            e Can not ship item by UPS Ground - Zone 1.
        min             2
        max             2
        cost    >>ups_ground_res_z1_price
        
ups_ground_res_z1_price:	UPS Ground P - Zone 1
	criteria	price
	min		0
	max		200
	cost		>>ups_ground_res_z1_weight
	min		200
	max		9999999
	cost		>>free_z1_price
	
ups_ground_res_z1_weight: UPS Ground - Zone 1
	criteria	weight
	min		0
	max		70
	cost 		f 8.50 + [shipping_cost method='ups_ground_res_z1' mode='none']
	min		70
	max		9999999
	cost		e Will quote shipping cost.



free_z1:   Free Shipping!
        criteria        [noship_item method=free_z1]
        min             1
        max             1
        cost            e Can not ship item by Free Shipping.
        min             2
        max             2
        cost    >>free_z1_price

free_z1_price:	Free Shipping!
	criteria	price
	min		0
	max		200
	cost		e Spend $200 or more and get Free Shipping (on most items.)
	min		200
	max		9999999
	cost	f 0 + [shipping_cost method='ups_ground_res_z1' mode='none']
	free	on most items.


The shipping tag used in Vermont US now generates the following:

shipping = 
<select name="mv_shipmode">
    <option value="ups_ground_res_z1_price">UPS Ground - Zone 1 (&#36;8.50) <<<<<------- the problem... Value should be "ups_ground_res_z1"
    <option value="ups_3day_z1">UPS 3 Day Select - Zone 1 (&#36;19.00)
</select>


Aha, Notice the value = "ups_ground_res_z1_price"

This breaks the form and causes $0 shipping charge!

It seems as if you can only "forward" once.  If I forward the cost again
to another method, it sets the form value to the prior method, (which is
not in the country.txt file) when it should set the value to the overall
parent method.  

Also, if there are any errors, I would rather it didn't allow for a
checkout at all and instead returned an error notice/page...

Has anyone come across this before? and/or fixed it? Or maybe there is a
totally new way to do shipping on the way?

Thanks!
Rick










More information about the interchange-users mailing list