for BO there is such list:
<context type="Order" component="cs-listview">
<list:list-view xmlns:list="http://www.hybris.com/cockpitng/component/listView">
<list:column qualifier="code"/>
<list:column qualifier="user"/>
<list:column qualifier="date"/>
<list:column qualifier="deliveryMode" />
<list:column qualifier="status" />
</list:list-view>
</context>
After the cancellation order, Hybris creates duplicate order with the same status as it was before the cancellation. So we have 2 orders with 2 statuses.
I'd like to have only 1 entry in result. How it's possible?
enter image description here
This can be done in 2 ways.
Search Restriction on customersupportagentgroup or related group.
INSERT_UPDATE SearchRestriction;code[unique=true];principal(uid)[unique=true];query;restrictedType(code)[unique=true];active;generate
;backendOrderVisibility;customersupportagentgroup;{versionID} IS NULL;Order;true;true
create new Controller to send extra filter which will give result of orders which having version id null, this is part of backoffice customization.
--->Create custom controller and extend this AbstractInitAdvancedSearchAdapter and override addSearchDataConditions.
---->Create definition.xml
-----> ovverride widget connection as well.
Related
I want config Tabs under products in backoffice for business and normal user group with dynamic forms. but in help. In Hybris, I can not find anything for limit authority for usergroup.
what I hope or think is the link so:
<context type="Product" component="editorAreaDynamicForms" merge-by="module">
<df:dynamicForms xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms" modelProperty="generated">
<df:section usergroup="businessUserOrAnywaysIdontKown" id="generated" disabledIf="generated == true" modelProperty="*" qualifier="*" triggeredOn="generated"/>
</df:dynamicForms>
</context>
as example usergroup="businessUserOrAnywaysIdontKown" in the form is important, can anyone tell me how to implement it. thanks very much!
Dynamic forms don't provide any attributes to match specific users/groups. You should add dynamic forms conditionally by using principal attribute on context node.
<context type="Product" component="editorAreaDynamicForms" merge-by="module" principal="business,user">
<df:dynamicForms xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms" modelProperty="generated">
<df:section id="generated" disabledIf="generated == true" modelProperty="*" qualifier="*" triggeredOn="generated"/>
</df:dynamicForms>
</context>
Dynamic forms allows to use SpEL, so you could also try to define more complex expression in the disabledIf attribute (but it is not recommended).
it might be simple question but I cannot do it for 6 hours.
I want to add checkbox to Backoffice > Catalog > Products Properties tab.
My question are
how to add checkbox
If it should be written into jsp file where to look for that file.
what file to write functionality of the checkbox
You need to add it in backoffice-config.xml files. You need to override properties tab and add your model attribute here. If your attribute type is boolean, zk framework automatically appear checkbox for this attribute. If it is in another type you need to add custom editor for this attribute.
For example below example ovveride tab.
<context type="Customer" merge-by="type" component="editor-area">
<editorArea:editorArea>
<editorArea:tab name="hmc.tab.common" position="1">
<editorArea:section name="hmc.properties">
<editorArea:attribute qualifier="myAttribute" />
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
You can also view new attributes in Addmistration tab unbound section by default.
I have simple workflow where employee can request for product. This product submission was designed in Infopath. Manager then gets to Approve or Reject this Decision. I added tasks to Manager using "Collect Data from User" action in SPD, where I added Reject or Approve Checkboxes. But, I also want to design a form where he can also see who is the requester of Product, Product information which are stored in the List (lets say ListA) that this Workflow runs on.
For this, I click on the ManagerApproval.xsn in Forms box in SPD. Then I added new data connections to ListA, and selected option to get required information. Then, I added requesterName, productName etc in the form using queryFields. There are queryFields and dataFields, what is the difference between them ?
I then publish the form, but it doesn't display any value only empty text boxes, when Manager is approving the Request. Don't know whats wrong ? Thanks
EDIT : Using datafields, I can see the data. But, I see id of the product not the value (eg I see 1,2 not ProdA, ProdB). And, also I see the whole list of products in ListA, I only intend to see values for the current item. There is something like repeating section in Infopath form, when I drag fields into Form. How can I filter it to show values (infact only 1 value - 1 product name, 1 requstername not the whole list from previous requests and already completed) for the current item ?
OR Alternatively, is there any way to design Custom Form for Manager Approval using Infopath, so that this form can be called inside Workflow ?
query fields - are field names, which are defined in XML schema,
data fields are actual data
Use data fields instead of query fields.
When you create a connection you get data from SharePoint XML something like the sample below.
In this - contains the query fields: ows_LinkTitle
Node contains the data.
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <s:Schema id="RowsetSchema">
- <s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
- <s:AttributeType name="ows_LinkTitle" rs:name="Title" rs:number="1">
<s:datatype dt:type="string" dt:maxLength="512" />
</s:AttributeType>
</s:ElementType>
</s:Schema>
- <rs:data>
<z:row ows_LinkTitle="Central Programme Office" />
<z:row ows_LinkTitle="Communications" />
<z:row ows_LinkTitle="Educational Resources" />
<z:row ows_LinkTitle="Finance" />
<z:row ows_LinkTitle="General Practice" />
<z:row ows_LinkTitle="IT" />
<z:row ows_LinkTitle="Web and Branding" />
</rs:data>
</xml>
Let's say I have two categegories, A and B.
I set A to use 'layout_a' on Catalog -> Catalog Categories -> Click a category -> click custom design tab
I set B to use 'layout_b' on Catalog -> Catalog Categories -> Click a category -> click custom design tab
When I visit category A and B, theydisplays products using their own layout that I set on the admin panel. When I click an item on the product listing page, product view page does not use custom design.
How do I enforce product view page to use its category's custom design?
In the current versions of Magento there is another way to do this without changing core code. Lets say you have a custom template for the product display of a category. In Admin go to Catalog->Categories->Manage Categories and select the category you want to apply the modified product template to. Change "Apply to Products" to Yes and put the following in the Custom Layout Update;
<reference name="product.info">
<action method="setTemplate"> <template>catalog/product/NEW_VIEW.phtml</template></action>
</reference>
Where NEW_VIEW is the name of the new template you want to use. If you have sub-categories you may need to have their "Use Parent Category Settings" set to Yes in order for it to float through.
I found the answer by myself.
Open product controller located in /app/code/Mage/Catalog/controllers/ProductController.php
add the following code into _initProductLayout method
$update->addHandle('CATEGORY_'.$product->getCategoryId());
Open catalog layout xml located in /app/design/frontend/default/default/layout/catalog.xml
add
<CATEGORY_"your category id">
<reference name="root">
<action method="setTemplate"><template>yourtemplate here</template></action>
</reference>
</CATEGORY_"your category id">
You can apply the Custom Design updates on the product Catalog>Manage Products>Design and then apply as per the Categories
Does that achieve what you need?
Create an attribute with dropdown type and name attribute code 'which_category'. On the options tab fill in 'category_a' and 'category_b'
Create two files in /app/design/frontend/default/YOURTEMP/template/catalog/product/
lets say: view_cat_a.phtml and view_cat_b.phtml
You can design your specific category product view page based on view.phtml.
Change view.phtml to:
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct();
if ( $_product->getAttributeText('which_category') == category_a) {
include('view_cat_a.phtml');
} else {
include('view_cat_b.phtml');
}
When you create a product you can choose the category on the attribute (define them in attribute_set)
I am developing a Sharepoint Solution, that implements a new list. This list has an event receiver attached to a Custom Content type.
I am using VSeWSS 1.3 for this task and it's going ok (the content type gets created, a list is created and bound to the content type, the event receiver triggers successfully.
My only concern is that in the created list, it always show the base Content Type (Item CT with Title field). Through the Web GUI I can hide this content type, but I can't find where to do that in my XML definitions, or make it on the solution to avoid double tasks when deploying.
Any suggestions??
You will have to edit the Schema.xml for your custom list. Find the <ContentTypes> tag and remove any you do not wish to be shown.
Your list definition will have a guid (eg. <Elements Id="0a8594c8-5cf1-492e-88ce-df943830c88c") that will specify the list from the schema xml (e.g.<List Name="... ...Id="0a8594c8-5cf1-492e-88ce-df943830c88c">)
I am not sure what the implementation is for, usually there is a feature.xml to combine the previous xml files together (e.g.<ElementManifests><ElementManifest Location="MyFeature\ListDefinition.xml" /><ElementFile Location="MyFeature\schema.xml" />)
In the schema.xml you need to make 2 changes
in the <List> element add the following attribute:
EnableContentTypes="TRUE"
the <ContentTypes> element should contain a <ContentType> element that specifes your custom Content type.
for example:
<?xml version="1.0"?>
<List
xmlns:ows="Microsoft SharePoint"
Title="List_Title"
FolderCreation="FALSE"
Direction="$Resources:Direction;"
Url="Lists/List_Title"
BaseType="0"
Name="List_Title"
Id="51D716AC-DF9D-4ebb-9F8E-9134EEBB7C39"
Type="100"
xmlns="http://schemas.microsoft.com/sharepoint/"
EnableContentTypes="TRUE"
>
<MetaData>
<ContentTypes>
<ContentTypeRef ID="0x01..." />
</ContentTypes>
Both answers helped me, but I found also that you need to specify the columns again in the List Definition (not only in the Content Type), because otherwise, they won't show up in the list.