Files
ofbiz-plugins/ecommerce/widget/CatalogScreens.xml
T
Jacques Le Roux 80654bfb26 Fix an issue reported by Duc Trung NGUYEN on user ML:
>  I tried to test the theme multiflex (for ecommerce) and detect a small
> problem as the following: (USING http://demo-trunk.ofbiz.apache.org)
> 
> 1.connect to catalog manager
> 2.go to "store" tab and select the store with id 9000
> 3.change its viual theme to MULTIFLEX
> 
> 4.open the ecommerce site (it's ok with new theme)
> 5.select a catagory from the categories menu on the left side.
> 6.select another language
> 
> And the problem come up:
> The theme now is EC_DEFAULT instead of MULTIFLEX

It was related to a not finished change introduced with  http://svn.apache.org/viewvc?view=revision&revision=1128983
I mean the addCheckValue request and sequel... 

It was just missing the productStore, I added it in the category.groovy script

I briefly tried to do it in a simpler way using a redirected parameter on setSessionLocale request, but got issue, gave up and simply reused the same way but moved the simple method from AffiliateSimpleEvents.xml to CustomerEvents.xml


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1426787 13f79535-47bb-0310-9956-ffa450edef68
2012-12-29 17:14:16 +00:00

604 lines
28 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<!-- Column Included Screens -->
<screen name="choosecatalog">
<section>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/choosecatalog.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="keywordsearchbox">
<section>
<actions>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/KeywordSearchOptions.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="sidedeepcategory">
<section>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="minireorderprods">
<section>
<actions>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniReorderProds.groovy"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/minireorderprods.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="miniassocprods">
<section>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/miniassocprods.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="minilastviewedcategories">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="minilastviewedproducts">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/minilastviewedproducts.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="minilastproductsearches">
<section>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/minilastproductsearches.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="miniproductsummary">
<section>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/miniproductsummary.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="productsummary">
<section>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/productsummary.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="breadcrumbs">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<!-- =========== Top-Level and Stand-Alone Screens =========== -->
<!-- Category Screens -->
<screen name="category">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="titleProperty" value="PageTitleCategoryPage"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
<!-- Open this commented section for the demo of Layered Navigation, navigate through Gizmo and Widgets categories to see it in action.
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy"/>
<set field="detailScreen" value="LayeredCategoryDetail"/>
-->
<set field="tabButtonItem" value="LookupProductCategories"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-screen name="breadcrumbs"/>
<include-screen name="category-include"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="category-include">
<section>
<widgets>
<section>
<condition>
<not><if-empty field="productCategory"/></not>
</condition>
<widgets>
<include-screen name="${detailScreen}"/>
</widgets>
<fail-widgets>
<label style="head2">${uiLabelMap.ProductCategoryNotFoundForCategoryID} ${productCategoryId}!</label>
</fail-widgets>
</section>
</widgets>
</section>
</screen>
<screen name="categorydetail">
<section>
<actions>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
<set field="productCategoryLinkScreen" value="component://ecommerce/widget/CatalogScreens.xml#ProductCategoryLink"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy"/>
<entity-and entity-name="ProductCategoryLink" list="productCategoryLinks" use-cache="true" filter-by-date="true">
<field-map field-name="productCategoryId" from-field="productCategoryId"/>
<order-by field-name="sequenceNum"/>
</entity-and>
<set field="paginateEcommerceStyle" value="Y"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="categorydetailmatrix">
<section>
<actions>
<set field="numCol" value="3"/>
<set field="searchInCategory" value="N"/>
<set field="parameters.VIEW_SIZE" from-field="parameters.VIEW_SIZE" default-value="9"/>
</actions>
<widgets>
<include-screen name="categorydetail"/>
</widgets>
</section>
</screen>
<screen name="ProductCategoryLink">
<section>
<actions>
<!-- TODO/NOTE DEJ20070223: for some reason this isn't working, doing an assign within the FTL file which does work: <set field="productCategoryLink" from-field="requestAttributes.productCategoryLink"/> -->
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="product">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="titleProperty" value="PageTitleProductPage"/>
<set field="layoutSettings.javaScripts[]" value="/ecommerce/images/productAdditionalView.js" global="true"/>
<set field="configproductdetailScreen" value="component://ecommerce/widget/CatalogScreens.xml#configproductdetail"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<not><if-empty field="product"/></not>
</condition>
<widgets>
<include-screen name="${detailScreen}"/>
</widgets>
<fail-widgets>
<label style="head2">${uiLabelMap.ProductProductNotFound} ${productId}!</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="productdetail">
<section>
<actions>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy"/>
</actions>
<widgets>
<include-screen name="breadcrumbs"/>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/productdetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="inlineProductDetail">
<section>
<actions>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="configproductdetail">
<section>
<actions>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
<set field="inlineProductDetailScreen" value="component://ecommerce/widget/CatalogScreens.xml#inlineProductDetail"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/PrepareConfigForm.groovy"/>
</actions>
<widgets>
<include-screen name="breadcrumbs"/>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="productreview">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="titleProperty" value="PageTitleProductReview"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/productreview.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="lastviewedproducts">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="titleProperty" value="PageTitleLastViewProducts"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/lastviewedproducts.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="detailImage">
<section>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/detailImage.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="tellafriend">
<section>
<actions>
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific>
<html><html-template location="component://ecommerce/webapp/ecommerce/catalog/tellafriend.ftl"/></html>
</platform-specific>
</widgets>
</section>
</screen>
<screen name="quickadd">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="quickaddsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#quickaddsummary"/>
<set field="titleProperty" value="PageTitleQuickAdd"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/quickadd.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="quickaddsummary">
<section>
<actions>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/quickaddsummary.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="keywordsearch">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
<set field="titleProperty" value="PageTitleSearchResults"/>
<set field="parameters.VIEW_SIZE" from-field="parameters.VIEW_SIZE" default-value="10"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/KeywordSearch.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/keywordsearch.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="tagsearch">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
<set field="titleProperty" value="PageTitleTagResults"/>
<set field="parameters.VIEW_SIZE" from-field="parameters.VIEW_SIZE" default-value="10"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/KeywordSearch.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/tagsearch.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="advancedsearch">
<section>
<actions>
<set field="leftbarScreenName" value="leftbar"/>
<set field="rightbarScreenName" value="rightbar"/>
<set field="MainColumnStyle" value="center"/>
<set field="titleProperty" value="PageTitleAdvancedSearch"/>
<set field="headerItem" value="Advanced Search"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/AdvancedSearchOptions.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LayeredNavBar">
<section>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/LayeredNavBar.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="LayeredCategoryDetail">
<section>
<actions>
<set field="productsummaryScreen" value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/LayeredCategoryDetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="bestSellingCategory">
<section>
<widgets>
<section>
<widgets>
<!--<label style="h1" text="Popular Categories"/>-->
<include-screen name="showBestSellingCategory"/>
</widgets>
</section>
</widgets>
</section>
</screen>
<screen name="showBestSellingCategory">
<section>
<actions>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/BestSellingCategory.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="productCategories">
<section>
<actions>
<set field="tabButtonItem" value="LookupProductCategories"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/ProductCategories.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="productCategoryList">
<section>
<condition>
<if-empty field="parameters.mainSubmitted"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
<set field="fromSetSessionLocale" value="${groovy: return request.getAttribute('fromSetSessionLocale');}"/>
<set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/>
<service service-name="getVisualThemeResources">
<field-map field-name="visualThemeId"/>
<field-map field-name="themeResources" from-field="layoutSettings"/>
</service>
<set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
</actions>
<widgets>
<section>
<condition>
<if-compare operator="equals" value="true" field="fromSetSessionLocale"/>
</condition>
<widgets>
<include-screen name="category"/>
</widgets>
<fail-widgets>
<section>
<condition>
<if-empty field="category_id"/>
</condition>
<widgets>
<include-screen name="newbreadcrumbs" share-scope="true"/>
</widgets>
<fail-widgets>
<include-screen name="breadcrumbs" share-scope="true"/>
</fail-widgets>
</section>
<include-screen name="category-include" share-scope="true"/>
</fail-widgets>
</section>
</widgets>
<fail-widgets>
<section>
<widgets>
<include-screen name="category"/>
</widgets>
</section>
</fail-widgets>
</section>
</screen>
<screen name="newbreadcrumbs">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy"/>
</actions>
<widgets>
<platform-specific>
<html><html-template location="component://ecommerce/webapp/ecommerce/catalog/ajaxbreadcrumbs.ftl"/></html>
</platform-specific>
</widgets>
</section>
</screen>
<screen name="populartags">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/catalog/populartags.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
</screens>