Closed GoogleCodeExporter closed 8 years ago
I think this needs to be configured in actions.xml of the product extension
profile for Plone 3. See the attached
patch.
Original comment by michael....@gmail.com
on 11 Dec 2007 at 9:20
Attachments:
Hi Michael,
IIUC, adding your patch has no effect (for better or worse) on Plone 2.5.
Which is
good, as CMFonFive does its work there. Only on Plone 3.0 does it add the
action.
Right?
Looks good to me, with one change: it needs a condition or else this is shown
for
every object. This condition seems the most logical to me:
object/@@edit-buyable|nothing
Seems to be working fine then.
Can you commit it with that change? Preferably with a browser test to show
that this
action is now available on 2.5 and 3.0; but I do not know how hard that is to
add.
Original comment by maurits.vanrees
on 11 Dec 2007 at 11:40
assigning to maurits to take care of
michael - want to join the project? thanks for the patch
Original comment by cjj.ifpe...@gmail.com
on 12 Dec 2007 at 4:33
The condition needs to be:
nocall:object/@@edit-buyable|nothing
The 'nocall' is needed because otherwise you end up with a maximum recursion
error
when viewing a buyable object.
Hm, but with that code I get an extra test failure on Plone 3 with a maximum
recursion error. We need to find a different condition.
Original comment by maurits.vanrees
on 13 Dec 2007 at 11:49
Fixed in r1117. Commit message:
- Rename all @@edit-* browser pages to @@edit-payable.
- Add new browser view @@payable-content that simply returns True when
content is payable and False otherwise.
- Add action 'buyable' in the CMF Action Category, silently ignored in
Plone 2.5. This has @@payable-content as expression for
availability and @@edit-payable as url expression.
Thanks for providing the base for this, Michael.
Original comment by maurits.vanrees
on 14 Dec 2007 at 11:33
Maurits,
it seems to me that you could have done something more simple and that would
work in
Plone 3 and Plone 2.5. Because right now the tabs are no more working in 2.5
I had the same problem with the getpaid.discount product (because I did the same
thing as you did to show up the "Discountable" tab).
I updated the PloneGetPaid code with a more simple code, see revision 1655. I
ran the
tests on it and they all pass.
Feel free to revert if it breaks anything.
Original comment by lucielej...@gmail.com
on 8 Jul 2008 at 3:51
Hi Lucie,
I am sure it worked when I changed this half a year ago, so I guess in the
meantime
somthing has changed that broke this; perhaps r1642 though I do not immediately
see
anything wrong there.
I have not checked if your code works in practice, but I see two possible
problems
with your commit:
1. Someone may already be using the now removed @@payable-content view in his
own
product, which we would now break. BTW, I added that small view because I had
not
seen that there already was an @@getpaid_control view that that could do that.
:-/
2. Existing Plone sites will still have the old action that you removed from
actions.xml. So in plone 3 I suspect the tab may now show twice. Or viewing a
payable item will give an error as it is calling @@payable-content, which does
not
exist anymore (see problem 1). Hm, but the condition is
"object/@@payable-content|nothing" so that could still work.
Original comment by maurits.vanrees
on 8 Jul 2008 at 6:13
Hello Maurits,
1. if someone is using @@payable-content and is using the trunk to develop, this
person can switch pretty easily to @@getpaid_control pretty easily during its
development.
2. For the action, the old action that I removed and the new action have the
same id,
so when you run the generic setup steps, it just updates the old action.
Original comment by lucielej...@gmail.com
on 8 Jul 2008 at 11:58
Ad 1: I think @@payable-content was there since 0.3 or perhaps shortly after,
not
just on trunk.
Ad 2: Ah, good point.
We (well, I) probably do not need to worry too much about this. Heh, when
googling
for 'payable-content' this issue is the first hit, so it is findable at least
in case
anyone has a problem with it. :-)
Original comment by maurits.vanrees
on 8 Jul 2008 at 1:38
Original issue reported on code.google.com by
cjj.ifpe...@gmail.com
on 7 Dec 2007 at 9:46