Promotions code combination from one pool not possible - shopware

ist it possible to use two promotion codes from one promotion-code-pool in one order?
The promotion is set to
Max. total uses : unlimited
Max. uses per customer : unlimited
I can combine one code of this promotion in one order with other promotions, but i am unable to combine two codes from the same promotion-pool.
example:
we give out promotion codes for 25 €. if a customer happens two have two or more of them and wants to use them in one order, right now its not possible and i dont see where its limited.
when the customer has a 50 € promotion code and a 25 € promotion code he can combine them.
How do i have to configure promotions to allow users to use more than one code of the same promotion pool?

No, at this point in time it is not possible. One and the same promotion can only be redeemed once per cart.

You should set "max uses" empty. The system will check which specific coupon id is used and will then make that one invalid. You can also see the name of the client who used it.

Related

Significance of trackedProperties_NAME_g and trackedProperties_NAME_s in Azure Logic-app trackedProperties?

Sometime we queries at one and get the value at another column, so thought of sharing this finding came across
I have created a logic-app, with trackedProperties "MessageId" and attached with Log analytics workspace (Diagnostic settings).
How to add track properties to log analytics workspace in logi-app
"trackedProperties": {
"MessageId": "#{json(xml(triggerBody())).ABC.DEF.MessageID}"
}
When I queried in Log Analytics,there I saw 2 trackedProperties columns with the name trackedProperties_MessageId_g and trackedProperties_MessageId_s.
Significance of above said 2 column names: When you provide a GUID value, it populates to trackedProperties_MessageId_g and when you provide string it populates to trackedProperties_MessageId_s.
Thanks for sharing your finding(s). Yes, AFAIK when you send particular field/column to Log Analytics its name is changed based on the type. This is true for almost any field/column. However there are some fields/columns which are called reserved that you can send without name change if you send them in the right type of course. An MVP, Stanislav Zhelyazkov has covered this topic here.
If you are not expecting 2 trackedProperties with the names trackedProperties_MessageId_g and trackedProperties_MessageId_s and were expecting only 1 trackedProperty then I suggest you to share your feedback in this UserVoice / feedback forum. Responsible product / feature team would check feasibility on how this can be resolved by adding some kind of checkpoint in the background and then if it's really feasible to accomplish then responsible product / feature team would triage / start prioritizing the feedback based on various factors like number of votes a feedback receives, priority, pending backlog items, etc.

How to create a survey list in SharePoint which accepts limited responses?

I am trying to create a survey list in SharePoint which accepts a limited number of responses. Suppose, if 1000 persons submitted their responses, then the next , i.e. 1001 th person should get a message "The maximum limit reached. Your responses cannot be submitted right now.". Can anybody please tell me how to do this?
If it were me I would still want that information even if the user submitted after the first 1000. I would still pull down a report for the first 1000 responses but then you still have access to the extra data if need be. If its a requirement to cap the list at 1000 see this article (https://sharepoint.stackexchange.com/questions/136244/max-number-of-items-in-a-sharepoint-list)

Getting Multiple Last Price Quotes from Interactive Brokers's API

I have a question regarding the Python API of Interactive Brokers.
Can multiple asset and stock contracts be passed into reqMktData() function and obtain the last prices? (I can set the snapshots = TRUE in reqMktData to get the last price. You can assume that I have subscribed to the appropriate data services.)
To put things in perspective, this is what I am trying to do:
1) Call reqMktData, get last prices for multiple assets.
2) Feed the data into my prediction engine, and do something
3) Go to step 1.
When I contacted Interactive Brokers, they said:
"Only one contract can be passed to reqMktData() at one time, so there is no bulk request feature in requesting real time data."
Obviously one way to get around this is to do a loop but this is too slow. Another way to do this is through multithreading but this is a lot of work plus I can't afford the extra expense of a new computer. I am not interested in either one.
Any suggestions?
You can only specify 1 contract in each reqMktData call. There is no choice but to use a loop of some type. The speed shouldn't be an issue as you can make up to 50 requests per second, maybe even more for snapshots.
The speed issue could be that you want too much data (> 50/s) or you're using an old version of the IB python api, check in connection.py for lock.acquire, I've deleted all of them. Also, if there has been no trade for >10 seconds, IB will wait for a trade before sending a snapshot. Test with active symbols.
However, what you should do is request live streaming data by setting snapshot to false and just keep track of the last price in the stream. You can stream up to 100 tickers with the default minimums. You keep them separate by using unique ticker ids.

Instagram - Limit on returning users like

Has anyone already bunped in a limit for the returns of likes a given user has made?
For example, I know that when you pull the list of likes a media has received you only get a total of 120. I want to know if the same occurs to a User.
Thanks
Setting the undocumented count parameter to a large number there would be no such limits as 120.

Update Parent Standard Object Getting Sum Value from Child in APEX

I am new in Apex. I want to write a trigger in apex for before insert. I have two standard objects (Contact, Opportunity).
SELECT sum(amount), Bussiness__c FROM opportunity
WHERE stagename='Closed Won' and id='006i000000Kt683AAB' GROUP BY Bussiness__c
I want when trigger runs this get sum(Amount) field and Bussiness__c value and then update Contact Total_Business__c with Sum(Amount) Value. Here Bussiness__C is contact id at opportunity object.
Thanks in advance and Waiting for your positive Response.
I'm assuming yo don't have currencies enabled in your org (if you'll see "CurrencyIsoCode" somewhere on your objects you'll have to modify this design a bit).
I am a lazy person and you didn't write anything about amount of data you expect. What I've written will work when there's reasonable amount of Opportunities per contact. If you'll start hitting the governor limit of 50K query rows it'd have to be done differently (I'll write a bit about it at the end).
I am not going to give you a ready solution because "homemade rollup summary" is one of assignments you might encounter during SF DEV 501 certification. I'll just outline some pointers and food for thought.
I wouldn't do it before insert, it's easier in after insert, after update (you didn't think about recalculation when the Amount changes, did you?). There should also be something said about after delete, after undelete if your users are allowed to delete Opportunities.
First thing is to build a set of "contacts we'll have to recalculate":
Set<Id> contactIds = new Set<Id>();
for(Opportunity o : trigger.old){
contactIds.add(o.Business__c);
}
for(Opportunity o : trigger.new){
contactIds.add(o.Business__c);
}
contactIds.remove(null);
This forces recalculation for all related contacts and ignores opportunities without contact. It'll fire always... which is not the best thing because on insert, delete, undelete you'd want it to fire always but on update you'd want it to fire only when Amount or Contact changes (trigger.old will hold different contact than trigger.new). You can control these scenarios by using stuff like Trigger.isUpdate, read up about it.
Anyway - you got an unique set of Contact Ids. I've said I'd do it in "after" trigger because at that point the new Amount is already saved to database and you can query it back from it:
SELECT Business__c, SUM(Amount) sumAmount
FROM Opportunity
WHERE Business__c IN :contactIds
This type of queries returns an "AggregateResult" that you'll have to parse like that:
List<Contact> contactsToUpdate = new List<Contact>();
for(AggregateResult ar : [SELECT Business__c, SUM(Amount) sumAmount
FROM Opportunity
WHERE Business__c IN :contactIds]){
System.debug(ar);
contactsToUpdate.add(new Contact(Id = (Id) ar.get('Business__c'),
Total_Business__c = (Double) ar.get('sumAmount)
);
}
update contactsToUpdate;
As I said - it's a basic outline, should get you started.
This thing queries all opportunities for given contact. Your trigger can fire on at most 200 Opps. Imagine a situation where you change contact on all 200 opps -> gives you 400 contacts you need to update to clear/fix old value and to set new value. With 50K rows limit, assuming no other business logic is triggered (like update of Accounts? Action that started because some Opportunity Products were added?) it gives you problems when on average 1 contact is involved in 125 Opps. It sounds like a ridiculous problem but there are scenarios when you need to do it differently.
In such cases you can attack it from another angle. You don't really need to query all opps for given Contact, it's lazy. You couuld instead learn the current value of total business (put 0 if it happens to be null) and then add/substract all changes to the amount as needed, looking only at your trigger.old and trigger.new. It makes for more code and more planning upfront but the performance will increase significantly and this solution will scale as the amount of opps grow (it'll continue to look at only the current max of 200 opps in the trigger's scope).
Another approach would be to accept some delay in this rollup summary and write a batch job for it.

Resources