For shopware 6 i want to add some custom order statusses to the core.
With the DAL i managed to add these on activating my plugin, but now the are not selectable in the administration. So i cannot change my order to this new custom state.
Anybody who can help me make this status selectable?
When you look at the state machine ERD you see a quite complex setup regarding states. There is a table called state_machine_transition which might be missing some entries in your case:
In the docs it is an overview of the state machine of the devlivery state, what I assume is your new state in. In the state machine graph you can see all available states and all transition steps that are available to change from on state to the other.
I assume you are missing such a transition step. As soon as you add a transition step the administration should allow you to step to it. Make sure to integrate your new state so it can be changed from and to it back and forth in any case. This prevents a user to be locked in a deadend.
You can change the state using method transition of class StateMachineRegistry
Here is the right way to add a custom state to order, order transaction, shipping -
https://developer.shopware.com/docs/guides/plugins/plugins/checkout/order/using-the-state-machine
Related
The case is following, we have a basket on which we have set only one shipping method, and which at point before order creation contains only one shipping bucket, with shipping method named "pickup".
There are 3 products in cart, two normally added products and one free gift which is added automatically with basket calculation.
This state is in pictured here:
After the order creation process (chain handlers for order creation are enabled), order contains two shipping buckets, one containing application default delivery method which is named "delivery", this is wrong and we don't want that to happen but don't know how to control it. One shipping bucket contains free gift and other contains other products. This state is displayed here:
How can we prevent having another shipping bucket being created for free gift?
EDIT: Intershop version is 7.10.15.3
I am unable to reproduce the problem on 7.10.15.2 with the standard demo shop. It is hard to say if this is a bug or a configuration problem. Can you try to reproduce this issue on an inspired demo shop?
Make sure the free gift item has the same shipping address (on line item level), shipping method and is in the same freight class as the other products.
If the problem is in the OrderCreationChain then have a look at the handlers.
Using this dev tool (only for development env)
/INTERSHOP/web/WFS/inSPIRED-inTRONICS-Site/en_US/-/USD/InspectHandlerChains-Start
There must then be a handler in that chain that creates this second bucket. Hope this helps in finding the problem.
Initially, I had created a case to report a problem with credentials assignment to Cloudant. But, after a few iterations with support, I am no longer able to view my own case via the link I get in the support e-mail.
I only get a message You do not have the right permissions to view cases.
So, I try to open a new case - but then I get You do not have the right permissions to open cases and a description telling me what to do.
Following the steps (Creating an access group for working with cases), I'm able to follow the first steps (From the menu bar, go to Manage > Access (IAM), select Access groups, and click Create), but at the Access Groups page, there is no Create button or any way to create a new access group.
So, I'm not even able to ask for support any more...
You can always open support cases via email to support#cloudant.com - if you provide your Cloudant account name (the one that ends with -bluemix) it’s easier for support to locate you.
You still have a -bluemix account - look at the URL when opening the Cloudant dashboard. Here’s an instance I just created using my internal IBM creds...
https://5217efab-4dcf-4ea0-a1c7-a0ea017a8ccd-bluemix.cloudant.com
This is my current understanding of the events on pressing the Activate button:
If the user has replication permission, the content is sent to the dispatcher.
If the user does not have replicate, the Request for Activate workflow is run. Out of the Box this performs two steps which are both sent to the Administrators group.
If I change the OOB Request for Activation workflow to assign to another group then this group gets the message in their CQ Inbox instead.
My requirement is that I have multiple websites belonging to different divisions within the company, meaning that each has separate groups for users who can only author content and users who can Approve/Activate that content. In one case there is an additional requirement for the content in the careers section to be approved by the HR team only.
How can I alter the workflow to achieve these requirements?
I can think of two ways of doing this:
1) Change the OOB box workflow to use OR steps to switch to differnt groups based on the content path. This could get very complex when dealing with pages for both pages and assets, and the special conditions like the careers example.
2) Create a custom step that runs Java code that uses the AccessControlManager class to look for replicate permissions on the node, and if there aren't any then to traverse up the tree until it finds a node with permissions.
I've gone with option 1) for a similar problem.
If your main concern is having too many branches in your OR Split, maybe there's an opportunity to break down the workflow's decisions into multiple steps, instead of having one decision point where it branches out to many different paths.
For example, you might first split by what site the payload is on, and then split again based on user type, or section of the site. So, something like:
site 1
section 1
role 1
role 2
section 2
site 2
... and so on, where each level of indentation represents a separate OR Split.
If you use the Container Step to trigger a sub-workflow at each of these decision points, that may help keep your workflow more organised.
Because I didn't love the idea of changing the OOB Request for Activation workflow, I minimised that by making the first step an OR Split that does a generic check - basically:
Pseudo-code:
if (we're in one of the sites that's subject to my custom workflows) {
Container step that points to my main custom workflow;
} else {
Continue with the default Request for Activation workflow steps;
}
That way you make minimal changes to the OOB workflow, and leave yourself open to running the default workflow if you set up a new site on the same instance, and don't want it subject to your custom workflow.
We've created a custom property in each page, "page owner", which in fact is a pointer to a group (I wish we have made it inheritable through the tree since beginning). Then workflow was customized so that page owner group receives this in their inbox for approval.
I am facing one typical issue on Tridion 2011 administrator activity.
How to replicate the issue?
Open a User
Add a Group to the user
Once group is inserted, by default all the publications are checked/ticked
Now here is the issue, if I have 200 publications and in that I want to check/tick only 2 publications then I need to uncheck remaining 198 publications manually.
Which is really difficult task doing for 20-30 users same activity.
I tried by checking and unchecking "ALL PUBLICATIONS" check box but NO LUCK.
How to fix this?
OR
Is there any hotfix already available?
You can use the following workaround:
Select all publications (Control + A)
Press Spacebar (Toggles selected/unselected)
Typically I'd recommend setting users to a group specifically for scope and permissions, rather than trying to define this for each of some 20-30 (or more) users.
For example:
Create "Rights" groups (or use the defaults) with This Group will be available for setting permissions in the following Publications: set to All Publications.
Create "Scope" groups with membership to one or more rights groups, with the scope limited to certain publications. Use Puntero's useful tip here. Optionally use separate groups for permissions.
Going forward, add users to a Scope group with Membership Scope: set to All Publications
This lets you consolidate global user changes to a few groups and simplify manual changes, even if experiencing a possible UI bug.
I have successfully created a Plone 4 (Plone 4.0.7) Group whose sole purpose is to manage users.
Ideally we'd like an audit trail of who creates/changes users/groups on the site. Is there any existing functionality available to do this, if not would it be a difficult thing to put in place?
This functionality is not available in Plone by default. You have to register your subscribers for proper events.
The events already available are:
IPrincipalCreatedEvent: A new principal (user) has been created
IPrincipalDeletedEvent: A user has been removed.
ICredentialsUpdatedEvent: A principal (user) has changed his/her password
(Products/PluggableAuthService/interfaces/events.py)
There's not an event raised during roles changes. You have to create your own event for that and then raise it somewhere (a good point could be plone.app.controlpanel.usergroups.py#L319. You'll need to override this browserview)
There is a new product called collective.AuditLog that can partially answer this.
As Giacomo said earlier there is not an event raised during roles changes. However, you could use AuditLog to track when users are Added, Removed, and even when they log in and log out if you wanted. These are all done using Content Rule triggers.
And if you created your own event for roles changes, you could use that as a content rule trigger for AuditLog as well.
A little late, but hopefully this will help someone who stumbles across this question.