Website Idea

Shipping zones are a pain to figure out. I’m surprised there isn’t a shipping-zones.com kind of website plastered with ads like the “what time is it” sites.

I should make one in my free time, along with some calculators that integrate with UPS/FedEx/USPS

Why? I need to build a shipping table / zone table for Anuva anyways.

Zone
Number

State
FK Zone

ShippingTable
FK Zone
1 – $x
2 – $y
3 – $z

state = State.objects.get(code=OR)
state.zone.shippingtable_set.get(zone=state.zone).filter(qty<=4).reverse()[0]?

That sounds like a terrible way to go.

Filter the price list by qty so you only see the right prices, reverse them to make [0] the last item, and take that item?

(1 or more, 2 or more, 3 or more, 4 or more)
Filter by at <= 2
(1 or more, 2 or more)
reverse
(2 or more, 1 or more)
[0]
2 or more = price / bottle

Works.. but seems dirty.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s