Flat Rate Shipping

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


So with the payment processor I was working on, finally completed, I
moved over to the shipping. I want to use flat rate shipping for now.
When I install it however, there is no way of setting the values for
it, and even when I purchase a shippable object, the shipping is still
0 on checkout.

I started looking around, and I found that the Flat Rate Shipping has
no config page.

My question is this: Has anyone successfully used flat rate shipping
on GetPaid, and if so, how?

Thanks guys
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Juan Carlos Coruña :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had the same problem and didn't found the solution. some people already reported this.

I tried to add a plugin to getpaid.flatrateshipping in order to get the config panel, without success.

Finally, I decided to go with IShippingRateService (look at getpaid.ups for an example) instead of IShippingMethod.

2009/6/4 hannesc <hannesc@...>

So with the payment processor I was working on, finally completed, I
moved over to the shipping. I want to use flat rate shipping for now.
When I install it however, there is no way of setting the values for
it, and even when I purchase a shippable object, the shipping is still
0 on checkout.

I started looking around, and I found that the Flat Rate Shipping has
no config page.

My question is this: Has anyone successfully used flat rate shipping
on GetPaid, and if so, how?

Thanks guys



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Do you make a difference between shipment and shipping ?
shipping being related to a cart (as a collection of items to be
shipped to anybody, anywhere), shipment to an order (labelled goods to
be received somewhere by somebody that would be charged for); indeed
how can you price a shipment if you don't know the destination of the
goods (if the client did not give the necessary informations in
"completing a bit" an order?)
Why in cart.py shipping and shipment are mixed ?
   def getShippingCost( self ):
        if not interfaces.IShipment.providedBy( self ):
            return 0
        return decimal.Decimal( str( self.shipping_cost ) )
I'm really confused...
2009/6/4 Juan Carlos Coruña <oggers@...>:

> I had the same problem and didn't found the solution. some people already
> reported this.
>
> I tried to add a plugin to getpaid.flatrateshipping in order to get the
> config panel, without success.
>
> Finally, I decided to go with IShippingRateService (look at getpaid.ups for
> an example) instead of IShippingMethod.
>
> 2009/6/4 hannesc <hannesc@...>
>>
>> So with the payment processor I was working on, finally completed, I
>> moved over to the shipping. I want to use flat rate shipping for now.
>> When I install it however, there is no way of setting the values for
>> it, and even when I purchase a shippable object, the shipping is still
>> 0 on checkout.
>>
>> I started looking around, and I found that the Flat Rate Shipping has
>> no config page.
>>
>> My question is this: Has anyone successfully used flat rate shipping
>> on GetPaid, and if so, how?
>>
>> Thanks guys
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I require is some way of just charging a flat fee for any order to be shipped to anyone. As the client will only be shipping locally, he decided to just charge a single amount for every order.

Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(

2009/6/5 danielle davout <danielle.davout@...>

Do you make a difference between shipment and shipping ?
shipping being related to a cart (as a collection of items to be
shipped to anybody, anywhere), shipment to an order (labelled goods to
be received somewhere by somebody that would be charged for); indeed
how can you price a shipment if you don't know the destination of the
goods (if the client did not give the necessary informations in
"completing a bit" an order?)
Why in cart.py shipping and shipment are mixed ?
  def getShippingCost( self ):
       if not interfaces.IShipment.providedBy( self ):
           return 0
       return decimal.Decimal( str( self.shipping_cost ) )
I'm really confused...
2009/6/4 Juan Carlos Coruña <oggers@...>:
> I had the same problem and didn't found the solution. some people already
> reported this.
>
> I tried to add a plugin to getpaid.flatrateshipping in order to get the
> config panel, without success.
>
> Finally, I decided to go with IShippingRateService (look at getpaid.ups for
> an example) instead of IShippingMethod.
>
> 2009/6/4 hannesc <hannesc@...>
>>
>> So with the payment processor I was working on, finally completed, I
>> moved over to the shipping. I want to use flat rate shipping for now.
>> When I install it however, there is no way of setting the values for
>> it, and even when I purchase a shippable object, the shipping is still
>> 0 on checkout.
>>
>> I started looking around, and I found that the Flat Rate Shipping has
>> no config page.
>>
>> My question is this: Has anyone successfully used flat rate shipping
>> on GetPaid, and if so, how?
>>
>> Thanks guys
>>
>
>
> >
>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


For me, today and as far as I "know" :
FlatRateShippping doesn't work out of the box fault of the missing
admin plugin, but if  one follows the example of getpaid.ups as
Hannesc (or I did ) to make it, it is functional :
a selection of the shipping methods is proposed to the client via a form,
the shipping_cost of the order is computed (once a  order is created =
self.createTransientOrder())
the problem is that getpaid.core.cart.CartItemTotals object has not
the right interface IShippableOrder when
the Shipping Price is wanted in the form cart-listing.....


On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:

> What I require is some way of just charging a flat fee for any order to be
> shipped to anyone. As the client will only be shipping locally, he decided
> to just charge a single amount for every order.
>
> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>
> 2009/6/5 danielle davout <danielle.davout@...>
>>
>> Do you make a difference between shipment and shipping ?
>> shipping being related to a cart (as a collection of items to be
>> shipped to anybody, anywhere), shipment to an order (labelled goods to
>> be received somewhere by somebody that would be charged for); indeed
>> how can you price a shipment if you don't know the destination of the
>> goods (if the client did not give the necessary informations in
>> "completing a bit" an order?)
>> Why in cart.py shipping and shipment are mixed ?
>>   def getShippingCost( self ):
>>        if not interfaces.IShipment.providedBy( self ):
>>            return 0
>>        return decimal.Decimal( str( self.shipping_cost ) )
>> I'm really confused...
>> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> > I had the same problem and didn't found the solution. some people
>> > already
>> > reported this.
>> >
>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
>> > config panel, without success.
>> >
>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
>> > for
>> > an example) instead of IShippingMethod.
>> >
>> > 2009/6/4 hannesc <hannesc@...>
>> >>
>> >> So with the payment processor I was working on, finally completed, I
>> >> moved over to the shipping. I want to use flat rate shipping for now.
>> >> When I install it however, there is no way of setting the values for
>> >> it, and even when I purchase a shippable object, the shipping is still
>> >> 0 on checkout.
>> >>
>> >> I started looking around, and I found that the Flat Rate Shipping has
>> >> no config page.
>> >>
>> >> My question is this: Has anyone successfully used flat rate shipping
>> >> on GetPaid, and if so, how?
>> >>
>> >> Thanks guys
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


as Juan Carlos did :)

On Fri, Jun 5, 2009 at 11:12 AM, danielle
davout<danielle.davout@...> wrote:

> For me, today and as far as I "know" :
> FlatRateShippping doesn't work out of the box fault of the missing
> admin plugin, but if  one follows the example of getpaid.ups as
> Hannesc (or I did ) to make it, it is functional :
> a selection of the shipping methods is proposed to the client via a form,
> the shipping_cost of the order is computed (once a  order is created =
> self.createTransientOrder())
> the problem is that getpaid.core.cart.CartItemTotals object has not
> the right interface IShippableOrder when
> the Shipping Price is wanted in the form cart-listing.....
>
>
> On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:
>> What I require is some way of just charging a flat fee for any order to be
>> shipped to anyone. As the client will only be shipping locally, he decided
>> to just charge a single amount for every order.
>>
>> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>>
>> 2009/6/5 danielle davout <danielle.davout@...>
>>>
>>> Do you make a difference between shipment and shipping ?
>>> shipping being related to a cart (as a collection of items to be
>>> shipped to anybody, anywhere), shipment to an order (labelled goods to
>>> be received somewhere by somebody that would be charged for); indeed
>>> how can you price a shipment if you don't know the destination of the
>>> goods (if the client did not give the necessary informations in
>>> "completing a bit" an order?)
>>> Why in cart.py shipping and shipment are mixed ?
>>>   def getShippingCost( self ):
>>>        if not interfaces.IShipment.providedBy( self ):
>>>            return 0
>>>        return decimal.Decimal( str( self.shipping_cost ) )
>>> I'm really confused...
>>> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>>> > I had the same problem and didn't found the solution. some people
>>> > already
>>> > reported this.
>>> >
>>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
>>> > config panel, without success.
>>> >
>>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
>>> > for
>>> > an example) instead of IShippingMethod.
>>> >
>>> > 2009/6/4 hannesc <hannesc@...>
>>> >>
>>> >> So with the payment processor I was working on, finally completed, I
>>> >> moved over to the shipping. I want to use flat rate shipping for now.
>>> >> When I install it however, there is no way of setting the values for
>>> >> it, and even when I purchase a shippable object, the shipping is still
>>> >> 0 on checkout.
>>> >>
>>> >> I started looking around, and I found that the Flat Rate Shipping has
>>> >> no config page.
>>> >>
>>> >> My question is this: Has anyone successfully used flat rate shipping
>>> >> on GetPaid, and if so, how?
>>> >>
>>> >> Thanks guys
>>> >>
>>> >
>>> >
>>> > >
>>> >
>>>
>>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks for the feedback. Is there anyway that either of you might post
your working copy somewhere for me to have a look at? I am struggling
to get it working, and my client is in a bit of a rush. O.o

Thanks :)

On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:

> as Juan Carlos did :)
>
> On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> davout<danielle.dav...@...> wrote:
> > For me, today and as far as I "know" :
> > FlatRateShippping doesn't work out of the box fault of the missing
> > admin plugin, but if  one follows the example of getpaid.ups as
> > Hannesc (or I did ) to make it, it is functional :
> > a selection of the shipping methods is proposed to the client via a form,
> > the shipping_cost of the order is computed (once a  order is created =
> > self.createTransientOrder())
> > the problem is that getpaid.core.cart.CartItemTotals object has not
> > the right interface IShippableOrder when
> > the Shipping Price is wanted in the form cart-listing.....
>
> > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...> wrote:
> >> What I require is some way of just charging a flat fee for any order to be
> >> shipped to anyone. As the client will only be shipping locally, he decided
> >> to just charge a single amount for every order.
>
> >> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>
> >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> >>> Do you make a difference between shipment and shipping ?
> >>> shipping being related to a cart (as a collection of items to be
> >>> shipped to anybody, anywhere), shipment to an order (labelled goods to
> >>> be received somewhere by somebody that would be charged for); indeed
> >>> how can you price a shipment if you don't know the destination of the
> >>> goods (if the client did not give the necessary informations in
> >>> "completing a bit" an order?)
> >>> Why in cart.py shipping and shipment are mixed ?
> >>>   def getShippingCost( self ):
> >>>        if not interfaces.IShipment.providedBy( self ):
> >>>            return 0
> >>>        return decimal.Decimal( str( self.shipping_cost ) )
> >>> I'm really confused...
> >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> >>> > I had the same problem and didn't found the solution. some people
> >>> > already
> >>> > reported this.
>
> >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
> >>> > config panel, without success.
>
> >>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
> >>> > for
> >>> > an example) instead of IShippingMethod.
>
> >>> > 2009/6/4 hannesc <hann...@...>
>
> >>> >> So with the payment processor I was working on, finally completed, I
> >>> >> moved over to the shipping. I want to use flat rate shipping for now.
> >>> >> When I install it however, there is no way of setting the values for
> >>> >> it, and even when I purchase a shippable object, the shipping is still
> >>> >> 0 on checkout.
>
> >>> >> I started looking around, and I found that the Flat Rate Shipping has
> >>> >> no config page.
>
> >>> >> My question is this: Has anyone successfully used flat rate shipping
> >>> >> on GetPaid, and if so, how?
>
> >>> >> Thanks guys
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Matt Barkau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1
Also, can anyone explain the syntax of context.context, in vocabularies.py ?:
def ShippingMethods( context ):
    adapters = component.getAdapters( (context.context,), interfaces.IShippingMethod )
Thanks!


On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hannesc@...> wrote:

Thanks for the feedback. Is there anyway that either of you might post
your working copy somewhere for me to have a look at? I am struggling
to get it working, and my client is in a bit of a rush. O.o

Thanks :)

On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
> as Juan Carlos did :)
>
> On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> davout<danielle.dav...@...> wrote:
> > For me, today and as far as I "know" :
> > FlatRateShippping doesn't work out of the box fault of the missing
> > admin plugin, but if  one follows the example of getpaid.ups as
> > Hannesc (or I did ) to make it, it is functional :
> > a selection of the shipping methods is proposed to the client via a form,
> > the shipping_cost of the order is computed (once a  order is created =
> > self.createTransientOrder())
> > the problem is that getpaid.core.cart.CartItemTotals object has not
> > the right interface IShippableOrder when
> > the Shipping Price is wanted in the form cart-listing.....
>
> > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...> wrote:
> >> What I require is some way of just charging a flat fee for any order to be
> >> shipped to anyone. As the client will only be shipping locally, he decided
> >> to just charge a single amount for every order.
>
> >> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>
> >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> >>> Do you make a difference between shipment and shipping ?
> >>> shipping being related to a cart (as a collection of items to be
> >>> shipped to anybody, anywhere), shipment to an order (labelled goods to
> >>> be received somewhere by somebody that would be charged for); indeed
> >>> how can you price a shipment if you don't know the destination of the
> >>> goods (if the client did not give the necessary informations in
> >>> "completing a bit" an order?)
> >>> Why in cart.py shipping and shipment are mixed ?
> >>>   def getShippingCost( self ):
> >>>        if not interfaces.IShipment.providedBy( self ):
> >>>            return 0
> >>>        return decimal.Decimal( str( self.shipping_cost ) )
> >>> I'm really confused...
> >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> >>> > I had the same problem and didn't found the solution. some people
> >>> > already
> >>> > reported this.
>
> >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
> >>> > config panel, without success.
>
> >>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
> >>> > for
> >>> > an example) instead of IShippingMethod.
>
> >>> > 2009/6/4 hannesc <hann...@...>
>
> >>> >> So with the payment processor I was working on, finally completed, I
> >>> >> moved over to the shipping. I want to use flat rate shipping for now.
> >>> >> When I install it however, there is no way of setting the values for
> >>> >> it, and even when I purchase a shippable object, the shipping is still
> >>> >> 0 on checkout.
>
> >>> >> I started looking around, and I found that the Flat Rate Shipping has
> >>> >> no config page.
>
> >>> >> My question is this: Has anyone successfully used flat rate shipping
> >>> >> on GetPaid, and if so, how?
>
> >>> >> Thanks guys



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


OK, so I got the admin part working. Now just to get the actual
shipping calculated.

When checking out, I get the following error:

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
  Module getpaid.wizard._wizard, line 38, in __call__
  Module getpaid.wizard._wizard, line 28, in update
  Module getpaid.wizard._wizard, line 263, in update
  Module Products.PloneGetPaid.browser.checkout, line 743, in update
  Module Products.PloneGetPaid.browser.checkout, line 729, in
setupShippingOptions
  Module getpaid.flatrateshipping2.rates, line 33, in getRates
AttributeError: 'InterfaceClass' object has no attribute
'flatrate_option'

I had a look at the files, and I can't quite figure out what is wrong:

 getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429

The highlighted line is where the problem occurs. I went and had a
look, but *sigh* I don't know what the heck is wrong.

 getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430

There is probably a simple solution to my problem, but I don't know
what it is. Anyone have any ideas?

Thanks
Hannes

On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:

> +1
> Also, can anyone explain the syntax of context.context, in vocabularies.py
> ?:
> def ShippingMethods( context ):
>     adapters = component.getAdapters( (context.context,),
> interfaces.IShippingMethod )
> Thanks!
>
> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>
> > Thanks for the feedback. Is there anyway that either of you might post
> > your working copy somewhere for me to have a look at? I am struggling
> > to get it working, and my client is in a bit of a rush. O.o
>
> > Thanks :)
>
> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
> > > as Juan Carlos did :)
>
> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> > > davout<danielle.dav...@...> wrote:
> > > > For me, today and as far as I "know" :
> > > > FlatRateShippping doesn't work out of the box fault of the missing
> > > > admin plugin, but if  one follows the example of getpaid.ups as
> > > > Hannesc (or I did ) to make it, it is functional :
> > > > a selection of the shipping methods is proposed to the client via a
> > form,
> > > > the shipping_cost of the order is computed (once a  order is created =
> > > > self.createTransientOrder())
> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
> > > > the right interface IShippableOrder when
> > > > the Shipping Price is wanted in the form cart-listing.....
>
> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
> > wrote:
> > > >> What I require is some way of just charging a flat fee for any order
> > to be
> > > >> shipped to anyone. As the client will only be shipping locally, he
> > decided
> > > >> to just charge a single amount for every order.
>
> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
> > work. :(
>
> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> > > >>> Do you make a difference between shipment and shipping ?
> > > >>> shipping being related to a cart (as a collection of items to be
> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
> > to
> > > >>> be received somewhere by somebody that would be charged for); indeed
> > > >>> how can you price a shipment if you don't know the destination of the
> > > >>> goods (if the client did not give the necessary informations in
> > > >>> "completing a bit" an order?)
> > > >>> Why in cart.py shipping and shipment are mixed ?
> > > >>>   def getShippingCost( self ):
> > > >>>        if not interfaces.IShipment.providedBy( self ):
> > > >>>            return 0
> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
> > > >>> I'm really confused...
> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> > > >>> > I had the same problem and didn't found the solution. some people
> > > >>> > already
> > > >>> > reported this.
>
> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
> > the
> > > >>> > config panel, without success.
>
> > > >>> > Finally, I decided to go with IShippingRateService (look at
> > getpaid.ups
> > > >>> > for
> > > >>> > an example) instead of IShippingMethod.
>
> > > >>> > 2009/6/4 hannesc <hann...@...>
>
> > > >>> >> So with the payment processor I was working on, finally completed,
> > I
> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
> > now.
> > > >>> >> When I install it however, there is no way of setting the values
> > for
> > > >>> >> it, and even when I purchase a shippable object, the shipping is
> > still
> > > >>> >> 0 on checkout.
>
> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
> > has
> > > >>> >> no config page.
>
> > > >>> >> My question is this: Has anyone successfully used flat rate
> > shipping
> > > >>> >> on GetPaid, and if so, how?
>
> > > >>> >> Thanks guys
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Lucie Lejard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


well, does the interface IFlatRateSettings have an attribute called
flatrate_option ?
--
S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
Phone: +1 (317) 861-5948 x605
ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12, 2009
http://www.sixfeetup.com/immerse



On Thu, Jun 11, 2009 at 1:17 AM, hannesc<hannesc@...> wrote:

>
> OK, so I got the admin part working. Now just to get the actual
> shipping calculated.
>
> When checking out, I get the following error:
>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 119, in publish
>  Module ZPublisher.mapply, line 88, in mapply
>  Module ZPublisher.Publish, line 42, in call_object
>  Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
>  Module getpaid.wizard._wizard, line 38, in __call__
>  Module getpaid.wizard._wizard, line 28, in update
>  Module getpaid.wizard._wizard, line 263, in update
>  Module Products.PloneGetPaid.browser.checkout, line 743, in update
>  Module Products.PloneGetPaid.browser.checkout, line 729, in
> setupShippingOptions
>  Module getpaid.flatrateshipping2.rates, line 33, in getRates
> AttributeError: 'InterfaceClass' object has no attribute
> 'flatrate_option'
>
> I had a look at the files, and I can't quite figure out what is wrong:
>
>  getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429
>
> The highlighted line is where the problem occurs. I went and had a
> look, but *sigh* I don't know what the heck is wrong.
>
>  getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430
>
> There is probably a simple solution to my problem, but I don't know
> what it is. Anyone have any ideas?
>
> Thanks
> Hannes
>
> On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
>> +1
>> Also, can anyone explain the syntax of context.context, in vocabularies.py
>> ?:
>> def ShippingMethods( context ):
>>     adapters = component.getAdapters( (context.context,),
>> interfaces.IShippingMethod )
>> Thanks!
>>
>> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>>
>> > Thanks for the feedback. Is there anyway that either of you might post
>> > your working copy somewhere for me to have a look at? I am struggling
>> > to get it working, and my client is in a bit of a rush. O.o
>>
>> > Thanks :)
>>
>> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
>> > > as Juan Carlos did :)
>>
>> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>>
>> > > davout<danielle.dav...@...> wrote:
>> > > > For me, today and as far as I "know" :
>> > > > FlatRateShippping doesn't work out of the box fault of the missing
>> > > > admin plugin, but if  one follows the example of getpaid.ups as
>> > > > Hannesc (or I did ) to make it, it is functional :
>> > > > a selection of the shipping methods is proposed to the client via a
>> > form,
>> > > > the shipping_cost of the order is computed (once a  order is created =
>> > > > self.createTransientOrder())
>> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
>> > > > the right interface IShippableOrder when
>> > > > the Shipping Price is wanted in the form cart-listing.....
>>
>> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
>> > wrote:
>> > > >> What I require is some way of just charging a flat fee for any order
>> > to be
>> > > >> shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > > >> to just charge a single amount for every order.
>>
>> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
>> > work. :(
>>
>> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>>
>> > > >>> Do you make a difference between shipment and shipping ?
>> > > >>> shipping being related to a cart (as a collection of items to be
>> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
>> > to
>> > > >>> be received somewhere by somebody that would be charged for); indeed
>> > > >>> how can you price a shipment if you don't know the destination of the
>> > > >>> goods (if the client did not give the necessary informations in
>> > > >>> "completing a bit" an order?)
>> > > >>> Why in cart.py shipping and shipment are mixed ?
>> > > >>>   def getShippingCost( self ):
>> > > >>>        if not interfaces.IShipment.providedBy( self ):
>> > > >>>            return 0
>> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
>> > > >>> I'm really confused...
>> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
>> > > >>> > I had the same problem and didn't found the solution. some people
>> > > >>> > already
>> > > >>> > reported this.
>>
>> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
>> > the
>> > > >>> > config panel, without success.
>>
>> > > >>> > Finally, I decided to go with IShippingRateService (look at
>> > getpaid.ups
>> > > >>> > for
>> > > >>> > an example) instead of IShippingMethod.
>>
>> > > >>> > 2009/6/4 hannesc <hann...@...>
>>
>> > > >>> >> So with the payment processor I was working on, finally completed,
>> > I
>> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
>> > now.
>> > > >>> >> When I install it however, there is no way of setting the values
>> > for
>> > > >>> >> it, and even when I purchase a shippable object, the shipping is
>> > still
>> > > >>> >> 0 on checkout.
>>
>> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
>> > has
>> > > >>> >> no config page.
>>
>> > > >>> >> My question is this: Has anyone successfully used flat rate
>> > shipping
>> > > >>> >> on GetPaid, and if so, how?
>>
>> > > >>> >> Thanks guys
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Either I am understanding the entire process completely wrong, or yes it does, as displayed in the highlighted line here: http://paste.plone.org/28458

2009/6/11 Lucie Lejard <lucielejard@...>

well, does the interface IFlatRateSettings have an attribute called
flatrate_option ?
--
S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
Phone: +1 (317) 861-5948 x605
ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12, 2009
http://www.sixfeetup.com/immerse



On Thu, Jun 11, 2009 at 1:17 AM, hannesc<hannesc@...> wrote:
>
> OK, so I got the admin part working. Now just to get the actual
> shipping calculated.
>
> When checking out, I get the following error:
>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 119, in publish
>  Module ZPublisher.mapply, line 88, in mapply
>  Module ZPublisher.Publish, line 42, in call_object
>  Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
>  Module getpaid.wizard._wizard, line 38, in __call__
>  Module getpaid.wizard._wizard, line 28, in update
>  Module getpaid.wizard._wizard, line 263, in update
>  Module Products.PloneGetPaid.browser.checkout, line 743, in update
>  Module Products.PloneGetPaid.browser.checkout, line 729, in
> setupShippingOptions
>  Module getpaid.flatrateshipping2.rates, line 33, in getRates
> AttributeError: 'InterfaceClass' object has no attribute
> 'flatrate_option'
>
> I had a look at the files, and I can't quite figure out what is wrong:
>
>  getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429
>
> The highlighted line is where the problem occurs. I went and had a
> look, but *sigh* I don't know what the heck is wrong.
>
>  getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430
>
> There is probably a simple solution to my problem, but I don't know
> what it is. Anyone have any ideas?
>
> Thanks
> Hannes
>
> On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
>> +1
>> Also, can anyone explain the syntax of context.context, in vocabularies.py
>> ?:
>> def ShippingMethods( context ):
>>     adapters = component.getAdapters( (context.context,),
>> interfaces.IShippingMethod )
>> Thanks!
>>
>> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>>
>> > Thanks for the feedback. Is there anyway that either of you might post
>> > your working copy somewhere for me to have a look at? I am struggling
>> > to get it working, and my client is in a bit of a rush. O.o
>>
>> > Thanks :)
>>
>> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
>> > > as Juan Carlos did :)
>>
>> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>>
>> > > davout<danielle.dav...@...> wrote:
>> > > > For me, today and as far as I "know" :
>> > > > FlatRateShippping doesn't work out of the box fault of the missing
>> > > > admin plugin, but if  one follows the example of getpaid.ups as
>> > > > Hannesc (or I did ) to make it, it is functional :
>> > > > a selection of the shipping methods is proposed to the client via a
>> > form,
>> > > > the shipping_cost of the order is computed (once a  order is created =
>> > > > self.createTransientOrder())
>> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
>> > > > the right interface IShippableOrder when
>> > > > the Shipping Price is wanted in the form cart-listing.....
>>
>> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
>> > wrote:
>> > > >> What I require is some way of just charging a flat fee for any order
>> > to be
>> > > >> shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > > >> to just charge a single amount for every order.
>>
>> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
>> > work. :(
>>
>> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>>
>> > > >>> Do you make a difference between shipment and shipping ?
>> > > >>> shipping being related to a cart (as a collection of items to be
>> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
>> > to
>> > > >>> be received somewhere by somebody that would be charged for); indeed
>> > > >>> how can you price a shipment if you don't know the destination of the
>> > > >>> goods (if the client did not give the necessary informations in
>> > > >>> "completing a bit" an order?)
>> > > >>> Why in cart.py shipping and shipment are mixed ?
>> > > >>>   def getShippingCost( self ):
>> > > >>>        if not interfaces.IShipment.providedBy( self ):
>> > > >>>            return 0
>> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
>> > > >>> I'm really confused...
>> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
>> > > >>> > I had the same problem and didn't found the solution. some people
>> > > >>> > already
>> > > >>> > reported this.
>>
>> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
>> > the
>> > > >>> > config panel, without success.
>>
>> > > >>> > Finally, I decided to go with IShippingRateService (look at
>> > getpaid.ups
>> > > >>> > for
>> > > >>> > an example) instead of IShippingMethod.
>>
>> > > >>> > 2009/6/4 hannesc <hann...@...>
>>
>> > > >>> >> So with the payment processor I was working on, finally completed,
>> > I
>> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
>> > now.
>> > > >>> >> When I install it however, there is no way of setting the values
>> > for
>> > > >>> >> it, and even when I purchase a shippable object, the shipping is
>> > still
>> > > >>> >> 0 on checkout.
>>
>> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
>> > has
>> > > >>> >> no config page.
>>
>> > > >>> >> My question is this: Has anyone successfully used flat rate
>> > shipping
>> > > >>> >> on GetPaid, and if so, how?
>>
>> > > >>> >> Thanks guys
> >
>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sorry, I was out of reach of a connexion for several days and now I've
only one minute ..
here what I've got

On Fri, Jun 12, 2009 at 6:09 AM, Hannes Calitz<hannesc@...> wrote:

> Either I am understanding the entire process completely wrong, or yes it
> does, as displayed in the highlighted line here:
> http://paste.plone.org/28458
>
> 2009/6/11 Lucie Lejard <lucielejard@...>
>>
>> well, does the interface IFlatRateSettings have an attribute called
>> flatrate_option ?
>> --
>> S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
>> Phone: +1 (317) 861-5948 x605
>> ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12,
>> 2009
>> http://www.sixfeetup.com/immerse
>>
>>
>>
>> On Thu, Jun 11, 2009 at 1:17 AM, hannesc<hannesc@...> wrote:
>> >
>> > OK, so I got the admin part working. Now just to get the actual
>> > shipping calculated.
>> >
>> > When checking out, I get the following error:
>> >
>> > Traceback (innermost last):
>> >  Module ZPublisher.Publish, line 119, in publish
>> >  Module ZPublisher.mapply, line 88, in mapply
>> >  Module ZPublisher.Publish, line 42, in call_object
>> >  Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
>> >  Module getpaid.wizard._wizard, line 38, in __call__
>> >  Module getpaid.wizard._wizard, line 28, in update
>> >  Module getpaid.wizard._wizard, line 263, in update
>> >  Module Products.PloneGetPaid.browser.checkout, line 743, in update
>> >  Module Products.PloneGetPaid.browser.checkout, line 729, in
>> > setupShippingOptions
>> >  Module getpaid.flatrateshipping2.rates, line 33, in getRates
>> > AttributeError: 'InterfaceClass' object has no attribute
>> > 'flatrate_option'
>> >
>> > I had a look at the files, and I can't quite figure out what is wrong:
>> >
>> >  getpaid.flatrateshipping2.rates looks as follows:
>> > http://paste.plone.org/28429
>> >
>> > The highlighted line is where the problem occurs. I went and had a
>> > look, but *sigh* I don't know what the heck is wrong.
>> >
>> >  getpaid.flatrateshipping2.interfaces looks as follows:
>> > http://paste.plone.org/28430
>> >
>> > There is probably a simple solution to my problem, but I don't know
>> > what it is. Anyone have any ideas?
>> >
>> > Thanks
>> > Hannes
>> >
>> > On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
>> >> +1
>> >> Also, can anyone explain the syntax of context.context, in
>> >> vocabularies.py
>> >> ?:
>> >> def ShippingMethods( context ):
>> >>     adapters = component.getAdapters( (context.context,),
>> >> interfaces.IShippingMethod )
>> >> Thanks!
>> >>
>> >> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>> >>
>> >> > Thanks for the feedback. Is there anyway that either of you might
>> >> > post
>> >> > your working copy somewhere for me to have a look at? I am struggling
>> >> > to get it working, and my client is in a bit of a rush. O.o
>> >>
>> >> > Thanks :)
>> >>
>> >> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...>
>> >> > wrote:
>> >> > > as Juan Carlos did :)
>> >>
>> >> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>> >>
>> >> > > davout<danielle.dav...@...> wrote:
>> >> > > > For me, today and as far as I "know" :
>> >> > > > FlatRateShippping doesn't work out of the box fault of the
>> >> > > > missing
>> >> > > > admin plugin, but if  one follows the example of getpaid.ups as
>> >> > > > Hannesc (or I did ) to make it, it is functional :
>> >> > > > a selection of the shipping methods is proposed to the client via
>> >> > > > a
>> >> > form,
>> >> > > > the shipping_cost of the order is computed (once a  order is
>> >> > > > created =
>> >> > > > self.createTransientOrder())
>> >> > > > the problem is that getpaid.core.cart.CartItemTotals object has
>> >> > > > not
>> >> > > > the right interface IShippableOrder when
>> >> > > > the Shipping Price is wanted in the form cart-listing.....
>> >>
>> >> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
>> >> > wrote:
>> >> > > >> What I require is some way of just charging a flat fee for any
>> >> > > >> order
>> >> > to be
>> >> > > >> shipped to anyone. As the client will only be shipping locally,
>> >> > > >> he
>> >> > decided
>> >> > > >> to just charge a single amount for every order.
>> >>
>> >> > > >> Flat Rate shipping seemed like the solution, but alas, it
>> >> > > >> doesn't
>> >> > work. :(
>> >>
>> >> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>> >>
>> >> > > >>> Do you make a difference between shipment and shipping ?
>> >> > > >>> shipping being related to a cart (as a collection of items to
>> >> > > >>> be
>> >> > > >>> shipped to anybody, anywhere), shipment to an order (labelled
>> >> > > >>> goods
>> >> > to
>> >> > > >>> be received somewhere by somebody that would be charged for);
>> >> > > >>> indeed
>> >> > > >>> how can you price a shipment if you don't know the destination
>> >> > > >>> of the
>> >> > > >>> goods (if the client did not give the necessary informations in
>> >> > > >>> "completing a bit" an order?)
>> >> > > >>> Why in cart.py shipping and shipment are mixed ?
>> >> > > >>>   def getShippingCost( self ):
>> >> > > >>>        if not interfaces.IShipment.providedBy( self ):
>> >> > > >>>            return 0
>> >> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
>> >> > > >>> I'm really confused...
>> >> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
>> >> > > >>> > I had the same problem and didn't found the solution. some
>> >> > > >>> > people
>> >> > > >>> > already
>> >> > > >>> > reported this.
>> >>
>> >> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order
>> >> > > >>> > to get
>> >> > the
>> >> > > >>> > config panel, without success.
>> >>
>> >> > > >>> > Finally, I decided to go with IShippingRateService (look at
>> >> > getpaid.ups
>> >> > > >>> > for
>> >> > > >>> > an example) instead of IShippingMethod.
>> >>
>> >> > > >>> > 2009/6/4 hannesc <hann...@...>
>> >>
>> >> > > >>> >> So with the payment processor I was working on, finally
>> >> > > >>> >> completed,
>> >> > I
>> >> > > >>> >> moved over to the shipping. I want to use flat rate shipping
>> >> > > >>> >> for
>> >> > now.
>> >> > > >>> >> When I install it however, there is no way of setting the
>> >> > > >>> >> values
>> >> > for
>> >> > > >>> >> it, and even when I purchase a shippable object, the
>> >> > > >>> >> shipping is
>> >> > still
>> >> > > >>> >> 0 on checkout.
>> >>
>> >> > > >>> >> I started looking around, and I found that the Flat Rate
>> >> > > >>> >> Shipping
>> >> > has
>> >> > > >>> >> no config page.
>> >>
>> >> > > >>> >> My question is this: Has anyone successfully used flat rate
>> >> > shipping
>> >> > > >>> >> on GetPaid, and if so, how?
>> >>
>> >> > > >>> >> Thanks guys
>> > >
>> >
>>
>>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


from urllib2 import Request, urlopen, URLError
import logging
import elementtree.ElementTree as etree

from zope import interface, schema, component
from zope.app.container.contained import Contained
from persistent import Persistent
from zope.app.interface import queryType, providedBy

from Products.CMFCore.utils import getToolByName

from getpaid.core.interfaces import IShippableLineItem, IStoreSettings, IShippingMethodRate, IOriginRouter,IStore
from spirlux.sandbox.interfaces import IMyShippingRateService
import interfaces
from getpaid.flatrateshipping.flatrate import FlatRateShippingAdapter


log = logging.getLogger("spirlux.sandbox")
class MyResponse:
    """An object representing a response from me...mimic ups ... will contain status/error info and possibly a list of
shipments"""
    shipments = []
    error = None


class MyShippingRateService ( Persistent, Contained ):
    """
    cf rates.py ups
    """
    interface.implements(interfaces.IMyShippingRateService, interfaces.MySettings)

    def __init__( self ):
        # initialize defaults from schema
        for name, field in schema.getFields( interfaces.MySettings ).items():
            field.set( self, field.query( self, field.default ) )
        super( MyShippingRateService, self).__init__()


    def getRates( self, order ):
        """
        given an order object, return a set of shipping method rate objects
        for available shipping options, on error raises an exception.
        """
        # ick.. get a hold of the store
        # this is a little gross, we need some access to context
        context = component.queryUtility( IStore )
        if context is None:
            from Products.CMFCore.utils import getToolByName
            ob = None
            for i in order.shopping_cart.values():
                if IShippableLineItem.providedBy( i ):
                    ob = i.resolve()
            if ob is None:
                raise AttributeError("can't get store, TODO - please switch processors settings to utility adapters")
            context = getToolByName( ob, 'portal_url').getPortalObject()


        FRSRA = FlatRateShippingAdapter(context)
        FRSRA.settings.flatrate_option = "Percentage"

        print FRSRA.settings        
        # <getpaid.core.options.FlatRateShippingSettings object at 0xc95a40c>
        print list(providedBy(FRSRA.settings))
        #[<InterfaceClass getpaid.flatrateshipping.interfaces.IFlatRateShippingSettings>, <InterfaceClass
        # getpaid.core.interfaces.IPersistentOptions>]

        shipments = []  # only one for me
        shipment = ShippingMethodRate() # ShippingMethodRate a definir separement
        shipment.service_code = "01"
        shipment.service = "next-day-air"
        shipment.currency = "Euro"

        shipment.cost = FRSRA.getCost(order) #

        shipments.append( shipment )
        my_response = MyResponse()
        my_response.shipments = shipments
        return my_response

    def getMethodName(self, method_id ):
        """
        given a shipping method id, return the name of the method name
        """
        term = interfaces.MY_SERVICES.getTerm( method_id )
        return term.title

    def getTrackingUrl( self, track_number ):
        """
        given a track number this should return, if available for this service
        a url that can be used to track the shipment
        """
        return None


class ShippingMethodRate( object ):
    """A Shipment Option and Price"""
    interface.implements( IShippingMethodRate )

    service_code = ""
    service = ""
    currency = ""
    cost = 10

    def __repr__( self ):
        return  "<My Shipping Method %s>"%(str(self.__dict__))




Re: Flat Rate Shipping

by Matt Barkau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hannes, as a test, what happens if you change rates.py line 33 from IFlatRateSettings to IFlatRateShippingSettings ?


On Thu, Jun 11, 2009 at 12:17 AM, hannesc <hannesc@...> wrote:

OK, so I got the admin part working. Now just to get the actual
shipping calculated.

When checking out, I get the following error:

Traceback (innermost last):
 Module ZPublisher.Publish, line 119, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 42, in call_object
 Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
 Module getpaid.wizard._wizard, line 38, in __call__
 Module getpaid.wizard._wizard, line 28, in update
 Module getpaid.wizard._wizard, line 263, in update
 Module Products.PloneGetPaid.browser.checkout, line 743, in update
 Module Products.PloneGetPaid.browser.checkout, line 729, in
setupShippingOptions
 Module getpaid.flatrateshipping2.rates, line 33, in getRates
AttributeError: 'InterfaceClass' object has no attribute
'flatrate_option'

I had a look at the files, and I can't quite figure out what is wrong:

 getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429

The highlighted line is where the problem occurs. I went and had a
look, but *sigh* I don't know what the heck is wrong.

 getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430

There is probably a simple solution to my problem, but I don't know
what it is. Anyone have any ideas?

Thanks
Hannes

On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
> +1
> Also, can anyone explain the syntax of context.context, in vocabularies.py
> ?:
> def ShippingMethods( context ):
>     adapters = component.getAdapters( (context.context,),
> interfaces.IShippingMethod )
> Thanks!
>
> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>
> > Thanks for the feedback. Is there anyway that either of you might post
> > your working copy somewhere for me to have a look at? I am struggling
> > to get it working, and my client is in a bit of a rush. O.o
>
> > Thanks :)
>
> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
> > > as Juan Carlos did :)
>
> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> > > davout<danielle.dav...@...> wrote:
> > > > For me, today and as far as I "know" :
> > > > FlatRateShippping doesn't work out of the box fault of the missing
> > > > admin plugin, but if  one follows the example of getpaid.ups as
> > > > Hannesc (or I did ) to make it, it is functional :
> > > > a selection of the shipping methods is proposed to the client via a
> > form,
> > > > the shipping_cost of the order is computed (once a  order is created =
> > > > self.createTransientOrder())
> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
> > > > the right interface IShippableOrder when
> > > > the Shipping Price is wanted in the form cart-listing.....
>
> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
> > wrote:
> > > >> What I require is some way of just charging a flat fee for any order
> > to be
> > > >> shipped to anyone. As the client will only be shipping locally, he
> > decided
> > > >> to just charge a single amount for every order.
>
> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
> > work. :(
>
> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> > > >>> Do you make a difference between shipment and shipping ?
> > > >>> shipping being related to a cart (as a collection of items to be
> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
> > to
> > > >>> be received somewhere by somebody that would be charged for); indeed
> > > >>> how can you price a shipment if you don't know the destination of the
> > > >>> goods (if the client did not give the necessary informations in
> > > >>> "completing a bit" an order?)
> > > >>> Why in cart.py shipping and shipment are mixed ?
> > > >>>   def getShippingCost( self ):
> > > >>>        if not interfaces.IShipment.providedBy( self ):
> > > >>>            return 0
> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
> > > >>> I'm really confused...
> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> > > >>> > I had the same problem and didn't found the solution. some people
> > > >>> > already
> > > >>> > reported this.
>
> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
> > the
> > > >>> > config panel, without success.
>
> > > >>> > Finally, I decided to go with IShippingRateService (look at
> > getpaid.ups
> > > >>> > for
> > > >>> > an example) instead of IShippingMethod.
>
> > > >>> > 2009/6/4 hannesc <hann...@...>
>
> > > >>> >> So with the payment processor I was working on, finally completed,
> > I
> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
> > now.
> > > >>> >> When I install it however, there is no way of setting the values
> > for
> > > >>> >> it, and even when I purchase a shippable object, the shipping is
> > still
> > > >>> >> 0 on checkout.
>
> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
> > has
> > > >>> >> no config page.
>
> > > >>> >> My question is this: Has anyone successfully used flat rate
> > shipping
> > > >>> >> on GetPaid, and if so, how?
>
> > > >>> >> Thanks guys



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Matt Barkau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Also, can you paste the relevant portion of your configure.zcml?  Thanks.

On Mon, Jun 15, 2009 at 4:05 AM, Matt Barkau <rmattb1@...> wrote:
Hannes, as a test, what happens if you change rates.py line 33 from IFlatRateSettings to IFlatRateShippingSettings ?


On Thu, Jun 11, 2009 at 12:17 AM, hannesc <hannesc@...> wrote:

OK, so I got the admin part working. Now just to get the actual
shipping calculated.

When checking out, I get the following error:

Traceback (innermost last):
 Module ZPublisher.Publish, line 119, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 42, in call_object
 Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
 Module getpaid.wizard._wizard, line 38, in __call__
 Module getpaid.wizard._wizard, line 28, in update
 Module getpaid.wizard._wizard, line 263, in update
 Module Products.PloneGetPaid.browser.checkout, line 743, in update
 Module Products.PloneGetPaid.browser.checkout, line 729, in
setupShippingOptions
 Module getpaid.flatrateshipping2.rates, line 33, in getRates
AttributeError: 'InterfaceClass' object has no attribute
'flatrate_option'

I had a look at the files, and I can't quite figure out what is wrong:

 getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429

The highlighted line is where the problem occurs. I went and had a
look, but *sigh* I don't know what the heck is wrong.

 getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430

There is probably a simple solution to my problem, but I don't know
what it is. Anyone have any ideas?

Thanks
Hannes

On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
> +1
> Also, can anyone explain the syntax of context.context, in vocabularies.py
> ?:
> def ShippingMethods( context ):
>     adapters = component.getAdapters( (context.context,),
> interfaces.IShippingMethod )
> Thanks!
>
> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>
> > Thanks for the feedback. Is there anyway that either of you might post
> > your working copy somewhere for me to have a look at? I am struggling
> > to get it working, and my client is in a bit of a rush. O.o
>
> > Thanks :)
>
> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
> > > as Juan Carlos did :)
>
> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> > > davout<danielle.dav...@...> wrote:
> > > > For me, today and as far as I "know" :
> > > > FlatRateShippping doesn't work out of the box fault of the missing
> > > > admin plugin, but if  one follows the example of getpaid.ups as
> > > > Hannesc (or I did ) to make it, it is functional :
> > > > a selection of the shipping methods is proposed to the client via a
> > form,
> > > > the shipping_cost of the order is computed (once a  order is created =
> > > > self.createTransientOrder())
> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
> > > > the right interface IShippableOrder when
> > > > the Shipping Price is wanted in the form cart-listing.....
>
> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
> > wrote:
> > > >> What I require is some way of just charging a flat fee for any order
> > to be
> > > >> shipped to anyone. As the client will only be shipping locally, he
> > decided
> > > >> to just charge a single amount for every order.
>
> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
> > work. :(
>
> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> > > >>> Do you make a difference between shipment and shipping ?
> > > >>> shipping being related to a cart (as a collection of items to be
> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
> > to
> > > >>> be received somewhere by somebody that would be charged for); indeed
> > > >>> how can you price a shipment if you don't know the destination of the
> > > >>> goods (if the client did not give the necessary informations in
> > > >>> "completing a bit" an order?)
> > > >>> Why in cart.py shipping and shipment are mixed ?
> > > >>>   def getShippingCost( self ):
> > > >>>        if not interfaces.IShipment.providedBy( self ):
> > > >>>            return 0
> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
> > > >>> I'm really confused...
> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> > > >>> > I had the same problem and didn't found the solution. some people
> > > >>> > already
> > > >>> > reported this.
>
> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
> > the
> > > >>> > config panel, without success.
>
> > > >>> > Finally, I decided to go with IShippingRateService (look at
> > getpaid.ups
> > > >>> > for
> > > >>> > an example) instead of IShippingMethod.
>
> > > >>> > 2009/6/4 hannesc <hann...@...>
>
> > > >>> >> So with the payment processor I was working on, finally completed,
> > I
> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
> > now.
> > > >>> >> When I install it however, there is no way of setting the values
> > for
> > > >>> >> it, and even when I purchase a shippable object, the shipping is
> > still
> > > >>> >> 0 on checkout.
>
> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
> > has
> > > >>> >> no config page.
>
> > > >>> >> My question is this: Has anyone successfully used flat rate
> > shipping
> > > >>> >> on GetPaid, and if so, how?
>
> > > >>> >> Thanks guys




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey there Matt

See comments in Red below.

Also, if you would like to have a look at the Flate Rate Shipping I am working on in it's entirety, you can download it at http://www.opennetworks.co.za/getpaid.flatrateshipping2.tar.gz

Cheers
Hannes

2009/6/15 Matt Barkau <rmattb1@...>
Also, can you paste the relevant portion of your configure.zcml?  Thanks.
configure.zcml: http://paste.plone.org/28540
browser/configure.zcml: http://paste.plone.org/28541

On Mon, Jun 15, 2009 at 4:05 AM, Matt Barkau <rmattb1@...> wrote:
Hannes, as a test, what happens if you change rates.py line 33 from IFlatRateSettings to IFlatRateShippingSettings ?
I get the following error: 'module' object has no attribute 'IFlatRateShippingSettings'

On Thu, Jun 11, 2009 at 12:17 AM, hannesc <hannesc@...> wrote:

OK, so I got the admin part working. Now just to get the actual
shipping calculated.

When checking out, I get the following error:

Traceback (innermost last):
 Module ZPublisher.Publish, line 119, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 42, in call_object
 Module Products.PloneGetPaid.browser.checkout, line 353, in __call__
 Module getpaid.wizard._wizard, line 38, in __call__
 Module getpaid.wizard._wizard, line 28, in update
 Module getpaid.wizard._wizard, line 263, in update
 Module Products.PloneGetPaid.browser.checkout, line 743, in update
 Module Products.PloneGetPaid.browser.checkout, line 729, in
setupShippingOptions
 Module getpaid.flatrateshipping2.rates, line 33, in getRates
AttributeError: 'InterfaceClass' object has no attribute
'flatrate_option'

I had a look at the files, and I can't quite figure out what is wrong:

 getpaid.flatrateshipping2.rates looks as follows: http://paste.plone.org/28429

The highlighted line is where the problem occurs. I went and had a
look, but *sigh* I don't know what the heck is wrong.

 getpaid.flatrateshipping2.interfaces looks as follows: http://paste.plone.org/28430

There is probably a simple solution to my problem, but I don't know
what it is. Anyone have any ideas?

Thanks
Hannes

On Jun 10, 7:26 am, Matt Barkau <rmat...@...> wrote:
> +1
> Also, can anyone explain the syntax of context.context, in vocabularies.py
> ?:
> def ShippingMethods( context ):
>     adapters = component.getAdapters( (context.context,),
> interfaces.IShippingMethod )
> Thanks!
>
> On Mon, Jun 8, 2009 at 12:03 AM, hannesc <hann...@...> wrote:
>
> > Thanks for the feedback. Is there anyway that either of you might post
> > your working copy somewhere for me to have a look at? I am struggling
> > to get it working, and my client is in a bit of a rush. O.o
>
> > Thanks :)
>
> > On Jun 5, 12:21 pm, danielle davout <danielle.dav...@...> wrote:
> > > as Juan Carlos did :)
>
> > > On Fri, Jun 5, 2009 at 11:12 AM, danielle
>
> > > davout<danielle.dav...@...> wrote:
> > > > For me, today and as far as I "know" :
> > > > FlatRateShippping doesn't work out of the box fault of the missing
> > > > admin plugin, but if  one follows the example of getpaid.ups as
> > > > Hannesc (or I did ) to make it, it is functional :
> > > > a selection of the shipping methods is proposed to the client via a
> > form,
> > > > the shipping_cost of the order is computed (once a  order is created =
> > > > self.createTransientOrder())
> > > > the problem is that getpaid.core.cart.CartItemTotals object has not
> > > > the right interface IShippableOrder when
> > > > the Shipping Price is wanted in the form cart-listing.....
>
> > > > On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hann...@...>
> > wrote:
> > > >> What I require is some way of just charging a flat fee for any order
> > to be
> > > >> shipped to anyone. As the client will only be shipping locally, he
> > decided
> > > >> to just charge a single amount for every order.
>
> > > >> Flat Rate shipping seemed like the solution, but alas, it doesn't
> > work. :(
>
> > > >> 2009/6/5 danielle davout <danielle.dav...@...>
>
> > > >>> Do you make a difference between shipment and shipping ?
> > > >>> shipping being related to a cart (as a collection of items to be
> > > >>> shipped to anybody, anywhere), shipment to an order (labelled goods
> > to
> > > >>> be received somewhere by somebody that would be charged for); indeed
> > > >>> how can you price a shipment if you don't know the destination of the
> > > >>> goods (if the client did not give the necessary informations in
> > > >>> "completing a bit" an order?)
> > > >>> Why in cart.py shipping and shipment are mixed ?
> > > >>>   def getShippingCost( self ):
> > > >>>        if not interfaces.IShipment.providedBy( self ):
> > > >>>            return 0
> > > >>>        return decimal.Decimal( str( self.shipping_cost ) )
> > > >>> I'm really confused...
> > > >>> 2009/6/4 Juan Carlos Coruña <ogg...@...>:
> > > >>> > I had the same problem and didn't found the solution. some people
> > > >>> > already
> > > >>> > reported this.
>
> > > >>> > I tried to add a plugin to getpaid.flatrateshipping in order to get
> > the
> > > >>> > config panel, without success.
>
> > > >>> > Finally, I decided to go with IShippingRateService (look at
> > getpaid.ups
> > > >>> > for
> > > >>> > an example) instead of IShippingMethod.
>
> > > >>> > 2009/6/4 hannesc <hann...@...>
>
> > > >>> >> So with the payment processor I was working on, finally completed,
> > I
> > > >>> >> moved over to the shipping. I want to use flat rate shipping for
> > now.
> > > >>> >> When I install it however, there is no way of setting the values
> > for
> > > >>> >> it, and even when I purchase a shippable object, the shipping is
> > still
> > > >>> >> 0 on checkout.
>
> > > >>> >> I started looking around, and I found that the Flat Rate Shipping
> > has
> > > >>> >> no config page.
>
> > > >>> >> My question is this: Has anyone successfully used flat rate
> > shipping
> > > >>> >> on GetPaid, and if so, how?
>
> > > >>> >> Thanks guys







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> What I require is some way of just charging a flat fee for any order to be
> shipped to anyone. As the client will only be shipping locally, he decided
> to just charge a single amount for every order.
I 've managed at last to have it working  with in the cart.py of my product :

from Products.PloneGetPaid.browser.checkout import getShippingMethod

class CartItemTotals( OriginalCartItemTotals ):

    def getShippingCost( self ):
       # no choice of service_code by client
        service_code = 'mine.01' #self.request.get('shipping_method_code')
        method = getShippingMethod( self, service_code )
        if method is None:
            return 0
        return method.cost

and the same rates.py that I've sent previously as a attached file

in my overrides.zcml I've put accordingly
  <adapter
     for="getpaid.core.interfaces.IShoppingCart"
     provides="getpaid.core.interfaces.ILineContainerTotals"
     factory=".browser.cart.CartItemTotals"
     />





On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:

> What I require is some way of just charging a flat fee for any order to be
> shipped to anyone. As the client will only be shipping locally, he decided
> to just charge a single amount for every order.
>
> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>
> 2009/6/5 danielle davout <danielle.davout@...>
>>
>> Do you make a difference between shipment and shipping ?
>> shipping being related to a cart (as a collection of items to be
>> shipped to anybody, anywhere), shipment to an order (labelled goods to
>> be received somewhere by somebody that would be charged for); indeed
>> how can you price a shipment if you don't know the destination of the
>> goods (if the client did not give the necessary informations in
>> "completing a bit" an order?)
>> Why in cart.py shipping and shipment are mixed ?
>>   def getShippingCost( self ):
>>        if not interfaces.IShipment.providedBy( self ):
>>            return 0
>>        return decimal.Decimal( str( self.shipping_cost ) )
>> I'm really confused...
>> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> > I had the same problem and didn't found the solution. some people
>> > already
>> > reported this.
>> >
>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
>> > config panel, without success.
>> >
>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
>> > for
>> > an example) instead of IShippingMethod.
>> >
>> > 2009/6/4 hannesc <hannesc@...>
>> >>
>> >> So with the payment processor I was working on, finally completed, I
>> >> moved over to the shipping. I want to use flat rate shipping for now.
>> >> When I install it however, there is no way of setting the values for
>> >> it, and even when I purchase a shippable object, the shipping is still
>> >> 0 on checkout.
>> >>
>> >> I started looking around, and I found that the Flat Rate Shipping has
>> >> no config page.
>> >>
>> >> My question is this: Has anyone successfully used flat rate shipping
>> >> on GetPaid, and if so, how?
>> >>
>> >> Thanks guys
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey there guys.

I am still having trouble with this one. I had a look at Danielle's rates.py and changed mine accordingly. However I am getting the following error: http://paste.plone.org/28723

From the error, I got that the error is in my rates.py file. The file looks as follows (error line highlighted): http://paste.plone.org/28725

I don't think the error is there however. I think the error lies in my iterfaces.py file (http://paste.plone.org/28726).

If anyone could have look, I would really appreciate it.

Thanks
Hannes

2009/6/19 danielle davout <danielle.davout@...>

> What I require is some way of just charging a flat fee for any order to be
> shipped to anyone. As the client will only be shipping locally, he decided
> to just charge a single amount for every order.
I 've managed at last to have it working  with in the cart.py of my product :

from Products.PloneGetPaid.browser.checkout import getShippingMethod

class CartItemTotals( OriginalCartItemTotals ):

   def getShippingCost( self ):
      # no choice of service_code by client
       service_code = 'mine.01' #self.request.get('shipping_method_code')
       method = getShippingMethod( self, service_code )
       if method is None:
           return 0
       return method.cost

and the same rates.py that I've sent previously as a attached file

in my overrides.zcml I've put accordingly
 <adapter
    for="getpaid.core.interfaces.IShoppingCart"
    provides="getpaid.core.interfaces.ILineContainerTotals"
    factory=".browser.cart.CartItemTotals"
    />





On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:
> What I require is some way of just charging a flat fee for any order to be
> shipped to anyone. As the client will only be shipping locally, he decided
> to just charge a single amount for every order.
>
> Flat Rate shipping seemed like the solution, but alas, it doesn't work. :(
>
> 2009/6/5 danielle davout <danielle.davout@...>
>>
>> Do you make a difference between shipment and shipping ?
>> shipping being related to a cart (as a collection of items to be
>> shipped to anybody, anywhere), shipment to an order (labelled goods to
>> be received somewhere by somebody that would be charged for); indeed
>> how can you price a shipment if you don't know the destination of the
>> goods (if the client did not give the necessary informations in
>> "completing a bit" an order?)
>> Why in cart.py shipping and shipment are mixed ?
>>   def getShippingCost( self ):
>>        if not interfaces.IShipment.providedBy( self ):
>>            return 0
>>        return decimal.Decimal( str( self.shipping_cost ) )
>> I'm really confused...
>> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> > I had the same problem and didn't found the solution. some people
>> > already
>> > reported this.
>> >
>> > I tried to add a plugin to getpaid.flatrateshipping in order to get the
>> > config panel, without success.
>> >
>> > Finally, I decided to go with IShippingRateService (look at getpaid.ups
>> > for
>> > an example) instead of IShippingMethod.
>> >
>> > 2009/6/4 hannesc <hannesc@...>
>> >>
>> >> So with the payment processor I was working on, finally completed, I
>> >> moved over to the shipping. I want to use flat rate shipping for now.
>> >> When I install it however, there is no way of setting the values for
>> >> it, and even when I purchase a shippable object, the shipping is still
>> >> 0 on checkout.
>> >>
>> >> I started looking around, and I found that the Flat Rate Shipping has
>> >> no config page.
>> >>
>> >> My question is this: Has anyone successfully used flat rate shipping
>> >> on GetPaid, and if so, how?
>> >>
>> >> Thanks guys
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


indeed my interfaces.py looks very different , I"e got

class IMyRatesServiceSettings(interface.Interface):
    """
    My Rates Service Options
    """

    services = schema.List(title = _(u"My Services"),
                            required = True,
                            default = [],
                            description = _(u"The services to offer in
your store."),
                            value_type =
schema.Choice(title=u"my_services_choice",

vocabulary=MY_SHIPPING_SERVICES))

where
MY_SHIPPING_SERVICES = SimpleVocabulary([
    SimpleTerm('01', 'next-day-air', _(u' Next Day Air')),
    SimpleTerm('02', '2nd-day-air', _(u' 2nd Day Air')),
    SimpleTerm('03', 'ground', _(u' Ground')),])


On Tue, Jun 30, 2009 at 7:13 AM, Hannes Calitz<hannesc@...> wrote:

> Hey there guys.
>
> I am still having trouble with this one. I had a look at Danielle's rates.py
> and changed mine accordingly. However I am getting the following error:
> http://paste.plone.org/28723
>
> From the error, I got that the error is in my rates.py file. The file looks
> as follows (error line highlighted): http://paste.plone.org/28725
>
> I don't think the error is there however. I think the error lies in my
> iterfaces.py file (http://paste.plone.org/28726).
>
> If anyone could have look, I would really appreciate it.
>
> Thanks
> Hannes
>
> 2009/6/19 danielle davout <danielle.davout@...>
>>
>> > What I require is some way of just charging a flat fee for any order to
>> > be
>> > shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > to just charge a single amount for every order.
>> I 've managed at last to have it working  with in the cart.py of my
>> product :
>>
>> from Products.PloneGetPaid.browser.checkout import getShippingMethod
>>
>> class CartItemTotals( OriginalCartItemTotals ):
>>
>>    def getShippingCost( self ):
>>       # no choice of service_code by client
>>        service_code = 'mine.01' #self.request.get('shipping_method_code')
>>        method = getShippingMethod( self, service_code )
>>        if method is None:
>>            return 0
>>        return method.cost
>>
>> and the same rates.py that I've sent previously as a attached file
>>
>> in my overrides.zcml I've put accordingly
>>  <adapter
>>     for="getpaid.core.interfaces.IShoppingCart"
>>     provides="getpaid.core.interfaces.ILineContainerTotals"
>>     factory=".browser.cart.CartItemTotals"
>>     />
>>
>>
>>
>>
>>
>> On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:
>> > What I require is some way of just charging a flat fee for any order to
>> > be
>> > shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > to just charge a single amount for every order.
>> >
>> > Flat Rate shipping seemed like the solution, but alas, it doesn't work.
>> > :(
>> >
>> > 2009/6/5 danielle davout <danielle.davout@...>
>> >>
>> >> Do you make a difference between shipment and shipping ?
>> >> shipping being related to a cart (as a collection of items to be
>> >> shipped to anybody, anywhere), shipment to an order (labelled goods to
>> >> be received somewhere by somebody that would be charged for); indeed
>> >> how can you price a shipment if you don't know the destination of the
>> >> goods (if the client did not give the necessary informations in
>> >> "completing a bit" an order?)
>> >> Why in cart.py shipping and shipment are mixed ?
>> >>   def getShippingCost( self ):
>> >>        if not interfaces.IShipment.providedBy( self ):
>> >>            return 0
>> >>        return decimal.Decimal( str( self.shipping_cost ) )
>> >> I'm really confused...
>> >> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> >> > I had the same problem and didn't found the solution. some people
>> >> > already
>> >> > reported this.
>> >> >
>> >> > I tried to add a plugin to getpaid.flatrateshipping in order to get
>> >> > the
>> >> > config panel, without success.
>> >> >
>> >> > Finally, I decided to go with IShippingRateService (look at
>> >> > getpaid.ups
>> >> > for
>> >> > an example) instead of IShippingMethod.
>> >> >
>> >> > 2009/6/4 hannesc <hannesc@...>
>> >> >>
>> >> >> So with the payment processor I was working on, finally completed, I
>> >> >> moved over to the shipping. I want to use flat rate shipping for
>> >> >> now.
>> >> >> When I install it however, there is no way of setting the values for
>> >> >> it, and even when I purchase a shippable object, the shipping is
>> >> >> still
>> >> >> 0 on checkout.
>> >> >>
>> >> >> I started looking around, and I found that the Flat Rate Shipping
>> >> >> has
>> >> >> no config page.
>> >> >>
>> >> >> My question is this: Has anyone successfully used flat rate shipping
>> >> >> on GetPaid, and if so, how?
>> >> >>
>> >> >> Thanks guys
>> >> >>
>> >> >
>> >> >
>> >> > >
>> >> >
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I don't understand though, is that in the end, my settings class is implemented correctly (seeing as yours works). I simply do not get why I am getting a 'Could not adapt' error.

2009/6/30 danielle davout <danielle.davout@...>

indeed my interfaces.py looks very different , I"e got

class IMyRatesServiceSettings(interface.Interface):
   """
   My Rates Service Options
   """

   services = schema.List(title = _(u"My Services"),
                           required = True,
                           default = [],
                           description = _(u"The services to offer in
your store."),
                           value_type =
schema.Choice(title=u"my_services_choice",

vocabulary=MY_SHIPPING_SERVICES))

where
MY_SHIPPING_SERVICES = SimpleVocabulary([
   SimpleTerm('01', 'next-day-air', _(u' Next Day Air')),
   SimpleTerm('02', '2nd-day-air', _(u' 2nd Day Air')),
   SimpleTerm('03', 'ground', _(u' Ground')),])


On Tue, Jun 30, 2009 at 7:13 AM, Hannes Calitz<hannesc@...> wrote:
> Hey there guys.
>
> I am still having trouble with this one. I had a look at Danielle's rates.py
> and changed mine accordingly. However I am getting the following error:
> http://paste.plone.org/28723
>
> From the error, I got that the error is in my rates.py file. The file looks
> as follows (error line highlighted): http://paste.plone.org/28725
>
> I don't think the error is there however. I think the error lies in my
> iterfaces.py file (http://paste.plone.org/28726).
>
> If anyone could have look, I would really appreciate it.
>
> Thanks
> Hannes
>
> 2009/6/19 danielle davout <danielle.davout@...>
>>
>> > What I require is some way of just charging a flat fee for any order to
>> > be
>> > shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > to just charge a single amount for every order.
>> I 've managed at last to have it working  with in the cart.py of my
>> product :
>>
>> from Products.PloneGetPaid.browser.checkout import getShippingMethod
>>
>> class CartItemTotals( OriginalCartItemTotals ):
>>
>>    def getShippingCost( self ):
>>       # no choice of service_code by client
>>        service_code = 'mine.01' #self.request.get('shipping_method_code')
>>        method = getShippingMethod( self, service_code )
>>        if method is None:
>>            return 0
>>        return method.cost
>>
>> and the same rates.py that I've sent previously as a attached file
>>
>> in my overrides.zcml I've put accordingly
>>  <adapter
>>     for="getpaid.core.interfaces.IShoppingCart"
>>     provides="getpaid.core.interfaces.ILineContainerTotals"
>>     factory=".browser.cart.CartItemTotals"
>>     />
>>
>>
>>
>>
>>
>> On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...> wrote:
>> > What I require is some way of just charging a flat fee for any order to
>> > be
>> > shipped to anyone. As the client will only be shipping locally, he
>> > decided
>> > to just charge a single amount for every order.
>> >
>> > Flat Rate shipping seemed like the solution, but alas, it doesn't work.
>> > :(
>> >
>> > 2009/6/5 danielle davout <danielle.davout@...>
>> >>
>> >> Do you make a difference between shipment and shipping ?
>> >> shipping being related to a cart (as a collection of items to be
>> >> shipped to anybody, anywhere), shipment to an order (labelled goods to
>> >> be received somewhere by somebody that would be charged for); indeed
>> >> how can you price a shipment if you don't know the destination of the
>> >> goods (if the client did not give the necessary informations in
>> >> "completing a bit" an order?)
>> >> Why in cart.py shipping and shipment are mixed ?
>> >>   def getShippingCost( self ):
>> >>        if not interfaces.IShipment.providedBy( self ):
>> >>            return 0
>> >>        return decimal.Decimal( str( self.shipping_cost ) )
>> >> I'm really confused...
>> >> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> >> > I had the same problem and didn't found the solution. some people
>> >> > already
>> >> > reported this.
>> >> >
>> >> > I tried to add a plugin to getpaid.flatrateshipping in order to get
>> >> > the
>> >> > config panel, without success.
>> >> >
>> >> > Finally, I decided to go with IShippingRateService (look at
>> >> > getpaid.ups
>> >> > for
>> >> > an example) instead of IShippingMethod.
>> >> >
>> >> > 2009/6/4 hannesc <hannesc@...>
>> >> >>
>> >> >> So with the payment processor I was working on, finally completed, I
>> >> >> moved over to the shipping. I want to use flat rate shipping for
>> >> >> now.
>> >> >> When I install it however, there is no way of setting the values for
>> >> >> it, and even when I purchase a shippable object, the shipping is
>> >> >> still
>> >> >> 0 on checkout.
>> >> >>
>> >> >> I started looking around, and I found that the Flat Rate Shipping
>> >> >> has
>> >> >> no config page.
>> >> >>
>> >> >> My question is this: Has anyone successfully used flat rate shipping
>> >> >> on GetPaid, and if so, how?
>> >> >>
>> >> >> Thanks guys
>> >> >>
>> >> >
>> >> >
>> >> > >
>> >> >
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Flat Rate Shipping

by ddavout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


in my rates.py I use
from getpaid.flatrateshipping.flatrate import FlatRateShippingAdapter
FRSRA = FlatRateShippingAdapter(context)
 FRSRA.settings.flatrate_option = FLATRATE_OPTION

your rates.py has
      flatrate_settings = IFlatRateSettings(context)
        if(flatrate_settings.settings.flatrate_option == "Percentage"):


On Wed, Jul 1, 2009 at 6:37 AM, Hannes Calitz<hannesc@...> wrote:

> What I don't understand though, is that in the end, my settings class is
> implemented correctly (seeing as yours works). I simply do not get why I am
> getting a 'Could not adapt' error.
>
> 2009/6/30 danielle davout <danielle.davout@...>
>>
>> indeed my interfaces.py looks very different , I"e got
>>
>> class IMyRatesServiceSettings(interface.Interface):
>>    """
>>    My Rates Service Options
>>    """
>>
>>    services = schema.List(title = _(u"My Services"),
>>                            required = True,
>>                            default = [],
>>                            description = _(u"The services to offer in
>> your store."),
>>                            value_type =
>> schema.Choice(title=u"my_services_choice",
>>
>> vocabulary=MY_SHIPPING_SERVICES))
>>
>> where
>> MY_SHIPPING_SERVICES = SimpleVocabulary([
>>    SimpleTerm('01', 'next-day-air', _(u' Next Day Air')),
>>    SimpleTerm('02', '2nd-day-air', _(u' 2nd Day Air')),
>>    SimpleTerm('03', 'ground', _(u' Ground')),])
>>
>>
>> On Tue, Jun 30, 2009 at 7:13 AM, Hannes Calitz<hannesc@...> wrote:
>> > Hey there guys.
>> >
>> > I am still having trouble with this one. I had a look at Danielle's
>> > rates.py
>> > and changed mine accordingly. However I am getting the following error:
>> > http://paste.plone.org/28723
>> >
>> > From the error, I got that the error is in my rates.py file. The file
>> > looks
>> > as follows (error line highlighted): http://paste.plone.org/28725
>> >
>> > I don't think the error is there however. I think the error lies in my
>> > iterfaces.py file (http://paste.plone.org/28726).
>> >
>> > If anyone could have look, I would really appreciate it.
>> >
>> > Thanks
>> > Hannes
>> >
>> > 2009/6/19 danielle davout <danielle.davout@...>
>> >>
>> >> > What I require is some way of just charging a flat fee for any order
>> >> > to
>> >> > be
>> >> > shipped to anyone. As the client will only be shipping locally, he
>> >> > decided
>> >> > to just charge a single amount for every order.
>> >> I 've managed at last to have it working  with in the cart.py of my
>> >> product :
>> >>
>> >> from Products.PloneGetPaid.browser.checkout import getShippingMethod
>> >>
>> >> class CartItemTotals( OriginalCartItemTotals ):
>> >>
>> >>    def getShippingCost( self ):
>> >>       # no choice of service_code by client
>> >>        service_code = 'mine.01'
>> >> #self.request.get('shipping_method_code')
>> >>        method = getShippingMethod( self, service_code )
>> >>        if method is None:
>> >>            return 0
>> >>        return method.cost
>> >>
>> >> and the same rates.py that I've sent previously as a attached file
>> >>
>> >> in my overrides.zcml I've put accordingly
>> >>  <adapter
>> >>     for="getpaid.core.interfaces.IShoppingCart"
>> >>     provides="getpaid.core.interfaces.ILineContainerTotals"
>> >>     factory=".browser.cart.CartItemTotals"
>> >>     />
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Fri, Jun 5, 2009 at 10:23 AM, Hannes Calitz<hannesc@...>
>> >> wrote:
>> >> > What I require is some way of just charging a flat fee for any order
>> >> > to
>> >> > be
>> >> > shipped to anyone. As the client will only be shipping locally, he
>> >> > decided
>> >> > to just charge a single amount for every order.
>> >> >
>> >> > Flat Rate shipping seemed like the solution, but alas, it doesn't
>> >> > work.
>> >> > :(
>> >> >
>> >> > 2009/6/5 danielle davout <danielle.davout@...>
>> >> >>
>> >> >> Do you make a difference between shipment and shipping ?
>> >> >> shipping being related to a cart (as a collection of items to be
>> >> >> shipped to anybody, anywhere), shipment to an order (labelled goods
>> >> >> to
>> >> >> be received somewhere by somebody that would be charged for); indeed
>> >> >> how can you price a shipment if you don't know the destination of
>> >> >> the
>> >> >> goods (if the client did not give the necessary informations in
>> >> >> "completing a bit" an order?)
>> >> >> Why in cart.py shipping and shipment are mixed ?
>> >> >>   def getShippingCost( self ):
>> >> >>        if not interfaces.IShipment.providedBy( self ):
>> >> >>            return 0
>> >> >>        return decimal.Decimal( str( self.shipping_cost ) )
>> >> >> I'm really confused...
>> >> >> 2009/6/4 Juan Carlos Coruña <oggers@...>:
>> >> >> > I had the same problem and didn't found the solution. some people
>> >> >> > already
>> >> >> > reported this.
>> >> >> >
>> >> >> > I tried to add a plugin to getpaid.flatrateshipping in order to
>> >> >> > get
>> >> >> > the
>> >> >> > config panel, without success.
>> >> >> >
>> >> >> > Finally, I decided to go with IShippingRateService (look at
>> >> >> > getpaid.ups
>> >> >> > for
>> >> >> > an example) instead of IShippingMethod.
>> >> >> >
>> >> >> > 2009/6/4 hannesc <hannesc@...>
>> >> >> >>
>> >> >> >> So with the payment processor I was working on, finally
>> >> >> >> completed, I
>> >> >> >> moved over to the shipping. I want to use flat rate shipping for
>> >> >> >> now.
>> >> >> >> When I install it however, there is no way of setting the values
>> >> >> >> for
>> >> >> >> it, and even when I purchase a shippable object, the shipping is
>> >> >> >> still
>> >> >> >> 0 on checkout.
>> >> >> >>
>> >> >> >> I started looking around, and I found that the Flat Rate Shipping
>> >> >> >> has
>> >> >> >> no config page.
>> >> >> >>
>> >> >> >> My question is this: Has anyone successfully used flat rate
>> >> >> >> shipping
>> >> >> >> on GetPaid, and if so, how?
>> >> >> >>
>> >> >> >> Thanks guys
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > >
>> >> >
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

< Prev | 1 - 2 | Next >