How to cap a 'Buy X Get Y' at a specific quantity amount? I'm hoping to offer a 'Buy 2, Get 2' free but I don't want the offer to roll up incrementally (i.e. I don't want a user to be able to buy 4 and get 4). Is this possible?
You will need to extend ProductBOGOFPromotion with a "maxFree" or something. But this will not be the easiest thing to do, as the eval logic is in the jalo class. So you'll need a subclass so you can change this logic.
You have to extend the productpromotion type and create a new type of promotion and there in new promotion you can define your firing logic.
And you can check out http://www.hybrishub.com
ProductBOGOFPromotion has freeCount field where you can enter the number of the products you want to sell for free.
Related
In my company (train company) there is a sort of battle going on over two viewpoints on something. Before going to deep into the problem I'm first going to explain the different domains we have in our landscape now.
Product: All product master data and their characteristics.
Think their name, their possible list of choices...
Location: All location master data that can be chosen, like stations, stops, etc.
Quote: To get a price for a specific choice of a product with their attributes.
Order: The order domain where you can make a positive order but also a negative one for reimbursements.
Ticket: This is essentially what you get from paying the order. Its the product but in the state that its at, when gotten by the customer.
The problem
Viewpoint PURPLE (I don't want to create bias)
When an order is transformed into all "tickets", we convert the order details, like price, into the ticket model. In order to make Order something we can throw away. Order is seen as something transient. Kind of like the bag you have in a supermarket. Its the goods inside the bag that matter. Not the bag itself.
When a reimburse flow would start. You do not need to go to the order. You would have everything in the Ticket domain. So this means data from order will be duplicated to Ticket.
But not all, only the things that are relevant. Like price for example.
Viewpoint YELLOW (I don't want to create bias)
You do the same as above but you do not store the price in Ticket domain. The ticket domain only consist of details that are relevant for the "ticket" to work. Price is not allowed in there cause its a thing of the order. When a reimburse flow would start, its allowed to go fetch those details from the order. Making order not something you can throw away as its having crucial data inside of it.
The benefit here is that Order is not "polluting" the Ticket with unnecessary data. But this is debatable. The example of the price is a good example.
I wish to know your ideas about these two viewpoints.
There is no "Don't repeat yourself" when it comes to the business domain. The only thing that dictates the business domain is the business requirements. If the requirements state that the ticket should work independent of the order changes, then you have to duplicate things.
But in this case, the requirements are ambiguous. There is no correct design using the currently specified requirements. Building code based on assumptions is the #1 way of getting bad code, since you most likely will have to do a redesign down the road.
You need to go back to the product owner and ask him about the difference between the Order and the Ticket.
For instance:
What should happen to the ticket if the order is deleted?
What happens to the order and/or ticket if the product price changes?
What happens to a ticket if the order is reimbursed?
Go back, get better requirements and then start to design the application.
Our evolution of using DevOps is continuing (slowly but surely). One thing we've noticed is that some people are trying to but excessive estimates in for their time, but what we really want to be encouraging is for people to be breaking work down into multiple tasks.
Is there a way that we can set our DevOps work items to only accept a maximum value? I've had a look at the 'rules' and there doesn't seem to be anything there to let us do this, and because it's an out of the box field I don't think we can put a value limit against it.
I suppose what I want to understand is whether it would be possible to do this in some way? Could I do something with the existing 'Original Estimate' field or would I have to create a new custom field to have any chance of preventing people from putting in 100 hours for something that's actually more like 2?
If you are also using Boards, you could highlight work items where the original estimate is higher than a certain value. This would not prevent setting these values, but rather encourage the users to put in lower values.
https://learn.microsoft.com/en-us/azure/devops/boards/boards/customize-cards?view=azure-devops
Beware that this might not really help the underlying issue: People must be convinced of the benefits of splitting up tasks, otherwise they will just work around the tooling. Like always putting in the maximum value or not putting in the actual work hours.
Is there a way that we can set our DevOps work items to only accept a
maximum value?
I am afraid that setting the value limit for the Original Estimates field is currently not supported.
As workaround, you could need to create a custom field of type Picklist, and then specify the available values in the picklist.
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.
if CrewType is chosen on JobPlan, Maximo's default behaviour is to explicitly set Quantity to 1 and make it read-only. I have changed that behaviour in JOBLABOR, and now I can edit the Quantity on JobPlan. (This has been done via an attribute launch point automation script on JOBLABOR.AMCREWTYPE).
However, when the JobPlan is applied to a WO, it still explicitly sets the QUANTITY for CrewType as 1 on WPLABOR, thus not carrying across the quantity from JOBLABOR. Where can i override that behaviour? Could this be done via an automation script for the run action of JPNUM field?
As to why the quantity field defaults back to 1 and is made read-only if Crew Type or Crew are selected, I would expect that's because conceptually, it doesn't make sense to have a quantity other than one for these types of job plan labour. The same is true of assigning labour records to a Job Plan because it doesn't make sense to assign a quantity greater than one of the same person's labour record. In fact the only type of job plan labour you're able to adjust the quantity for in Maximo out of the box is craft because you could justifiably require multiples of a particular craft (e.g. 3 electricians) assigned to the job plan.
A crew type is a template for a crew which is itself the labour (internal or otherwise) with particular crafts, skill levels and qualifications to perform the work. Since each Crew is distinct and made up of group of individuals assigned to the positions in the crew I don't think it makes sense to say you want to assign 2 instances of the same crew, say Crew A, to a particular job plan. If, for example, two instances of the same type of team are required to perform the work you probably need to define two distinctly separate crews of the same crew type and add each crew (not Crew Type) to the Job Plan rather than customise the system to allow you to add a crew type with a quantity greater than 1.
Alternatively you could assign crafts to the job plan which you then have the option of specifying that the job plan requires, say 5 electricians, for example for 6 hours.
From Administration -> Organisations you can select an Organisation then click Crew Assignment Options to define how total work hours are calculated for Work Orders, Job Plans, Tasks and Activities associated with Crews.
I can see why you would want to plan for n crews of some type. For example, it takes a crew of a certain type to stand a pole for street lights, and if you've got a whole street to put lights on, why not have 5 of that crew type planned on this work order?
Unfortunately, it seems Maximo is pretty set against doing that. For what explanation it may yield, I recommend opening a Support Case with IBM, asking for the rationale or how to work around that limitation. And you could submit an RFE with rationale for why the limitation should not be there.
To satisfy the immediate need, maybe you could set up crew types as a service? Or create your own Quantity attributes for use with Crew Type and implement all the logic around those? I don't like reinventing the wheel, but "the juice might be worth the squeeze" if you're going to be fighting Maximo every step of the way, anyway. Or, if it really means that much to you, customize this aspect of Maximo to do what you want.
Whatever happens, I think your problem is not a programming problem but a Maximo problem. And as StackOverflow is a programming site, your problem is beyond the scope of this site. However, please come back if you have a programming problem! We love solving those!
Update
Having thought more about this, I think this is not a Maximo problem. I think Maximo is just (you could argue, forcibly) encouraging better planning. In the street light example, you wouldn't expect n crews to self-organize to stand poles. That would be poor planning. Rather, you would have a top level work order for doing the street with a lower level work order for each individual pole. So, each of those lower level work orders would only require 1 of the Crew Type. This arrangement would still flow through to scheduling as needing n of that Crew Type, but whether 1 Crew of that type was used n times or whether n crews were used once or somewhere in between is a scheduling problem, not a planning problem.
Does Hybris commerce have price override or appeasements capability at Order level or Item level.
There are mulitple ways how that can be done in hybris, one example is using ASM (assisted service module) that offers special promotions that can be granted by a service agent.
There might also be ways to achieve this using the cs-cockpit (customer service cockpit), I haven't looked into that deeper though.
For ASM documentation look e.g. here: https://help.hybris.com/6.3.0/hcd/8ac06f10866910148d8c850e15b102d2.html
Hope this helps a bit.
It really depends on what exactly are you trying to achieve. If you like some sort of a discount or promotions, you can see the link provided by Sebastion. In the wiki you can also find other promotion and discount engines. Another solution would be to have multiple price rows per product. Hybris supports this. For example for a particular product, you can set a special price for a special customer or customerGroup. Also the same way you can set different prices for different quantities. For example an apple costs 1$ but if you buy 100, the price goes to 0.75$.
More information about the pricerows: here
Keep in mind that Hybris is highly customizable so you can also override some logic from the PriceFactory but i would recommend using first the out of the box price features and then try overriding the PriceFactory.
While browsing https://github.com/graphhopper/directions-api/blob/master/docs-routing.md I found the option to choose one of the preset vehicle types car, foot and bike. But unfortunately I have to calculate the duration based on vehicles with caped maximum speed (slower than a car and faster than a bike) which are also not allowed to drive on interstates.
What is the best approach to make something like this work?
You can use an existing standard profile like car and reduce the speed profile and adjust the allowed highway tags. E.g. look into the CarFlagEncoder. Another (currently more complex) solution is to write a custom FlagEncoder from scratch.