Commit b22aceb8 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Optimize search by using portal type

parent 6e088d2f
...@@ -61,10 +61,12 @@ web_site = context.getWebSiteValue()\n ...@@ -61,10 +61,12 @@ web_site = context.getWebSiteValue()\n
resource = context.getResourceValue()\n resource = context.getResourceValue()\n
web_site_product_line = web_site.getLayoutProperty(\'ecommerce_base_product_line\')\n web_site_product_line = web_site.getLayoutProperty(\'ecommerce_base_product_line\')\n
portal_categories = context.getPortalObject().portal_categories\n portal_categories = context.getPortalObject().portal_categories\n
\n
base_product_line_object = portal_categories.restrictedTraverse(web_site_product_line)\n base_product_line_object = portal_categories.restrictedTraverse(web_site_product_line)\n
\n \n
if resource in portal_categories.getRelatedValueList(base_product_line_object):\n if resource in portal_categories.getRelatedValueList(base_product_line_object, \n
return \'%s/%s\' % (context.getResourceValue().getRelativeUrl(), \'Resource_viewAsShop\') \n portal_type=resource.getPortalType()):\n
return \'%s/%s\' % (resource.getRelativeUrl(), \'Resource_viewAsShop\')\n
return None\n return None\n
</string> </value> </string> </value>
</item> </item>
......
301 302
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment