From: xiru <xir...@gm...> - 2004-12-30 11:25:43
|
Forget to forward to the list. ---------- Forwarded message ---------- From: xiru <xir...@gm...> Date: Thu, 30 Dec 2004 09:25:15 -0200 Subject: Re: [Collective-commerce] PloneMall customization: problems and questions To: Giovanni Toffoli <to...@un...> Hi Giovanni, On Thu, 30 Dec 2004 11:13:01 +0100, Giovanni Toffoli <to...@un...> wrote: <snip> > 1. In a plain Plone site I've installed all PloneMall products, with > portal_quickinstaller, in the same order than PloneMallCustomizationPolicy > would have done OK > > 2. I've installed my new product, say Medialab, including only one new > content type, say CourseItem > > 3. I found that the categories tab did not show in the view of the Category > and CourseItem types; so I inserted by hand stuff in CourseItem.py - > code-section module-header and code-section module-footer - in order to > register my type as a Categorizeable one (taken from Demo.py of > PloneMallDemo) Well... did you remembered to implement the methods defined by the ICategorizeable interface? > > 4. I also removed from the ArchGenXml-generated CourseItem.py an assignment > "actions = ()" > > 5. I created a file Medialab-it.po in Products/Medialab/i18n, with the > Italian customization of the Medialab product > > 6. I created a file PloneMallItem-it.po in Products/PloneMallItem/i18n, with > the Italian customization of the PloneMallItem product (plonemallitem > domain) > How you did it? Did you used the i18ndude? Take a look on the i18n directory. There is a shell script there that we use to create po files from your templates and schema definition. > 7. I found that the PloneMallItem language customization was effective in > mall_browse.pt, but not in mall_browse_macro.pt; so I created a copy of > mall_browse_macro.pt in Products/Medialab/skins/Medialab (higher priority); > in this copy I added the opening and closing tags of a normal HTML page, in > order to include the attribute i18n:domain="plonemallitem" > > 8. While now the PloneMallItem language customization is effective for > static text defined in the page templates, it is not for labels and help > messages of AT fields defined in the schemas of the ancestor classes of > CourseItem; I cannot understand that, since the AT schema of CourseItem adds > some fields to the schema of SimpleItem, which in turn adds some fields to > the schema of BaseItem, and all fields of these include > i18n_domain='PloneMallItem' in the widget clause; perhaps i18n domain names > are case-sensitive? in this case .py files use the wrong spelling See the answer of question 6. > > 9. For normal users, I wanted to hide the content action "categories" from > the view of the Category and CourseItem content types; so, with > portal_types, in the action form of each of these types, I changed the > Permissions property to "Modify portal content" > OK. > 10. I found that in the item view the user could not see the extended data > I've put in the CourseItem content type; so with portal_types, in the action > form of CourseItem I've changed the Action property of the action "View" > from "string:$object_url/mall_itemsimple" to "string:$object_url/base_view"; > but doing so, I've lost the "Add to cart" link near the item price: how > could I recover it? That add to cart was on your custom view. Did you looked there? > > 11. If I understand correctly what categories are and how they relate to > items, I would expect that, in the category browse view (mall_browse.pt), > after the "Categories" (plural) heading > (i18n:translate="browse_title_categories"), there was a list of possible > sub-categories, in order to navigate down; instead only the Full description > of the category is shown Humm... not exactly. People is much used with the container approach for everything. Categories on PloneMall are following a Placeless approach, based on References. Try to understand on that way: an Item could be associated with more than one Category. It has some impact on UI. Maybe now it should be a bit clear... (like, a tennis shoe could be associated with the sports category and with the shoes category; if categories were folders, you would be abla to list the tennis shoe only inside one category, not in two different places). > > 12. If I associate an item with a category, as noted already by others, when > I click on the "more ..." link of an item in the category browse view, the > navigation portlet highlights the folder physically containing the item, > while the user should not be aware of this; I've seen that somebody proposed > smart solutions for this problem, and more generally for managing > categorization; but for now I don't need to add more categories to the same > item; so I've put each item inside the unique category it belongs to, after > having added CourseItem to the "Allowed content types" for Category > (portal_types/Category, Property form): could that have some drawbacks? > See the answer above. If you want to have something in a different way, you always could change the views to make the UI useful for your needs. PloneMall supports more than you need; It is just an UI issue. > 13. When the cart is empty, I think I should get a message saying that, not > a table header without any table body > Strange... I didn't did it? File a bug on collector to not let me forget it. > 14. How is that in the PloneMall UML model (PloneMall.zuml) no connection is > shown between Category and (Base)Item classes? > What you mean? I'm not sure about how is your UML skils, but there is not a direct association between categories and items in the real live. Itens exists by itself. An Item does not depend of a category. It is a model decision to make the solution clear and plugable. This kind of design enables you to use categories for... Orders, per example. Did you see the difference? I don't see what is the problem here. Could you explain better what you didn't understood? > 15. Are there examples of PloneMall installations, even in test/development > stage, that I could access in order to see how a PloneMall site should/could > appear to the user? Unfortunaly not. I was thinking in create a sandbox on www.plonemall.com, but It is only an idea... for now. > > 16. By the way, where could I find an introduction to the use of interfaces > in Plone/Archetypes? > Well... I think that Zope developer guide should cover some bits about why interfaces are a good thing. The text is old (forget everything that you read about ZClasses) but I need to say that Interfaces is a "pure object oriented concept". In practice, what an Interface means does not change from one language to another. Interfaces are "almost" the same thing on Python and Java. On Python, when you want to have something (a feature) and this feature is defined by an interface, what you need to do it quite simple: just implement the interface :-) IF you look the source, all content types are doing it... at lot. Lots of good questions. I hope It helps. > Thanks in advance, Giovanni Toffoli > > -- > Giovanni Toffoli > Link srl > Via Udine 30 - 00161 Roma > tel. +39 06 44231115, 340 0727780 > fax +39 06 44231328 > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Collective-commerce mailing list > Col...@li... > https://lists.sourceforge.net/lists/listinfo/collective-commerce > -- Fabiano Weimar dos Santos Plone Developer and Consultant -- Fabiano Weimar dos Santos Plone Developer and Consultant |