I will check with the valid and cost methods and report back. Thanks Scott
On Mar 13, 10:00 pm, Scott <[email protected]> wrote: > Hi Rick, > > So far so good. For starters, instead of using the dummy module, I > made a duplicate copy of the module "Tiered Weight", as this can > possibly accomplish what I want without a lot of hassle. Instead of > weight however, I removed most references to weight with the exception > of checking to see if the item actually has a weight (in my store, > products all have the same weight and set to 1). > > I also added the Zone object too, as I need this to make a check for > which country belongs to which zone. The models have been synced > successfully, and I can add pricing tiers to specific zones > (international and domestic), however even when attempting to purchase > as an international user, say from Austria for example, at checkout I > am given the pricing tier from a different zone. > > I think there still needs to be some validation in place, and would > like some advice on how to proceed from here. > > Many thanks, > Scott > > On Mar 8, 7:08 pm, Ricko <[email protected]> wrote: > > > OK, so you have the module installed, good! > > > So each shipping module will have two important methods, 'valid' and > > 'cost'. The valid method returns a boolean indicating if that module > > is a valid shipping module given the parameters of the order. So for > > you, you would need 2 modules, one based on the tiered shipping, one > > based on the flat shipping. In each 'valid' method you simply write > > some code to determine if the order is foreign or domestic. The > > 'valid' method passes in the order as a parameter, so you can get the > > details from that object instance. Only modules returning True will be > > displayed and used as a shipping method to the user. > > > For the pricing, your 'cost' method will handle that, the flat > > international will be easy, the domestic will be based on the tiered > > module already existing in Satchmo. You set up the tiering in the > > admin page. > > > Hope this helps, > > > RIck > > > On Mar 7, 4:51 pm, Scott <[email protected]> wrote: > > > > Hi Ricko, > > > > Sorry about that, yes, I can get Django to recognise the new shipping > > > module but being a complete newbie to Satchmo I'm not sure how what to > > > include. I know that it should determine a zone or multiplezones, and > > > then assign thosezonesone shipping option, while giving the > > > exclusive domestic zone (UK) one shipping option also. > > > > At this stage it is simply structured-english, but I really would > > > appreciate to spend some time with a seasoned Satchmo developer and > > > learn how to do it. > > > > Scott > > > > On Mar 7, 6:00 pm, Ricko <[email protected]> wrote: > > > > > Hi Scott, > > > > > You'll have to explain a bit more about why you can't get your module > > > > to work. Can you just not get django to recognise your module, or you > > > > haven't written one yet? > > > > > Cheers > > > > Rick > > > > > On Mar 6, 6:21 pm, Scott <[email protected]> wrote: > > > > > > Hi, > > > > > > I really need help with implementing a custom shipping module. I tried > > > > > following the Satchmo documentation but I can't get what I need. Zone > > > > > based shipping doesn't work on it's own. In my setup, a selected > > > > > country can still choose shipping options from that of another zone > > > > > that is doesn't belong to. > > > > > > I would like to have 2 shipping modules: a tiered weight for domestic > > > > > shipping, and a flat rate international price for international > > > > > shipping. International customers shouldn't be able to choose domestic > > > > > shipping from the UK and vice versa. > > > > > > Where do I begin? > > > > > > Thanks, > > > > > Scott -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
