features = {}
def toggleSelection(o, selected) :
if selected :
- return '%s/remove_to_selection' % o.absolute_url()
+ return '%s/remove_to_selection' % o.getURL()
else :
- return '%s/add_to_selection' % o.absolute_url()
+ return '%s/add_to_selection' % o.getURL()
features['select'] = toggleSelection
-features['cart'] = lambda o : '%s/get_slide_buyable_items' % o.absolute_url()
+features['cart'] = lambda o : '%s/get_slide_buyable_items' % o.getURL()
if mtool.checkPermission(ReviewPortalContent, context) :
features['hideAnonymous'] = True
selected = selDict.has_key(uid)
hiddenForAnonymous = p.hiddenForAnonymous
if pptool :
- buyable = bool(pptool.getPrintingOptionsFor(p))
+ buyable = bool(pptool.getPrintingOptionsFor(p.getObject()))
if cart and cart.locked :
buyable = False
else :
}
infos.append(d)
-return {'infos':infos, 'batch':batch, 'features':features}
+return {'infos':infos,
+ 'batch':batch,
+ 'features':features,
+ 'sorting' : {'sort_on' : sort_on,
+ 'sort_order' : sort_order}
+ }