Hi; I have this code: <table cellpadding="0" width="75%" border="0" ?????? tal:define="category python:getattr(request, 'category', ''); ?????????????????? items python:here.EMarket.marketItems.getItemsInCategory(category); ?????????????????? sort_on python:(('name', 'cmp', 'desc'),); ?????????????????? items python:sequence.sort(items, sort_on); ?????????????????? start python:getattr(request, 'start', 0); ?????????????????? batch python:modules['ZTUtils'].Batch(items, size=6*here.EMarket.in_row, start=start); ?????????????????? previous python:batch.previous; ?????????????????? next python:batch.next"> ? <tr> ??? <td align="center" class="text"> ????? <a tal:condition="previous" tal:attributes="href string:${request/URL0}?category=${category}&start:int=${previous/first}"><<Previous</a> <a tal:condition="next" tal:attributes="href string:${request/URL0}?category=${category}&start:int=${next/first}">Next>></a> ??? </td> ? </tr> ? <tr> ??? <td align="center"> ??? ????? <div tal:condition="batch" tal:omit-tag=""> ????? ??????? <div tal:condition="python:here.EMarket.in_row == 1" tal:omit-tag=""> ????????? <span tal:repeat="item batch" tal:omit-tag=""> ??????????? <span metal:use-macro="here/AddToCart_frame_content/macros/marketitem_one"/>
It sorts the products by name correctly when I display the products (as you can see at http://lariman.com and click "Store" then "cabuchones"), but if you click on one of the products, it shows a different product than the one you clicked! Now, this code works fine without the "sort_on" part, so I suspect the problem is in the batching and the "item batch", which for some reason isn't sorting as I specify. Suggestions? TIA, Tony ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )