Make separate actions and don’t use variable for those blank fields. In other words leave them blank in action. Instead of rule.
they are seperate actions and only the corisponding feild Price tag for happy hour and portion for half pint have an entery.
Also try the sorting I showed few posts above.
have done,
time means happy our is applied to pint
half pint button overited the price tag meaning full price half entered no hh taghalf price order update seems to overite hh order update
think its the blank feild in the price tag on the hh action
Still have the issue that if half pint button is pressed and non draught item added samba crashes.
I imagine I need a constraint.
have tried group code = draught on whole rule but this then means the half pint program setting is not cleared,
ideally the group code = draught wants to be on the update order portion action leaving the clear half pint program setting to be cleared but not sure what code to use, tried ‘[:GROUPCODE]’=‘Draught’ based on things seen on other posts,
am I close?
As an update I sorted the crash and ALSO to use a ‘DUMMY’ product so to have haft pint button on the menu list.
My setup is:
Action - Update Setting (As you post)
Action - Portion to Half Pint
Action - Cancel Last Order
Half Pint Product 0 price on draught menu
Rule 1 - Half pint product added (menu item = HALF PINT) = update setting HP_Portion to Half Pint & cancel last product
Rule 2 - Order Added (if group code = Draught & Setting = half pint) = update order portion to half pint
Rule 3 - Order Added (if setting = half pint) = update setting to"" to clear the setting if pressed by mistake.
This results in pretty much exactly the functionality I was after
Thanks again for all your help.
Just need to test it with Happy hour prices now which i think will be a challange.
I think ill need two happy hour rules one to compensate for the half pint product update
The VIP & HH Tutorial that I posted operates on fixed discounts, per product.
If you instead discount by the same percentage for each product, no matter the Portion, then you could change the discount calculation to derive the amount based on the Order Price.
[=-1*(TN('{ITEM TAG:HH}'))]
Becomes:
[=-1*(TN('{PRICE}') * TN('{ITEM TAG:HH}')/100)]
This product has a regular price of 60 and HH discount of 10. Original setup would apply -10 fixed discount. I changed the calculation to turn it into a percentage instead. So now the discount applied is 10%, which for a product priced at 60 would be 6.
If the percentage discount won’t work for you (i.e. if you need to use Fixed discount), we have another work around for Portions…
Create another HH Product Tag
to use with 1/2 pint Portions. Name it HHhalf or similar. Then use the Product Tag Editor to set the discount amount for HHhalf.
Now change this Rule:
Add another Action of the same Type, and change the Constraints and Order Tag for both Actions…
How could you add the {SETTING:HP_Portion} = Half Pint constraint in on the action of the rule?
At the moment I have got to have two happy hour actions and two happy hour rules - one general happy hour and another with a rule constraint of {SETTING:HP_Portion} = Half Pint
because the general rule used happy hour price band with no portion it overights the half or visa versa the half pint update order overights the happy hour price band.
If I can have a single happy hour rule with two actions - happy hour and happy hour half i can constrain the actions so that the half pint happy hour updates price band and portion and the other just the price band.
Does that make sense?
I am not in a position to offer help. I will be later today. If you have not figured it out by time I get home from the restaurant I will help you look at this.
i imagine looking at other constrains it will be allong the lines of ‘{SETTING:HP_Portion}’==‘Half Pint’
am trying now
Yes, exactly.
'{ORDER STATE:DiscountType}'=='HH' && [=TN('{ITEM TAG:HH}')]>0 && '{PORTION}'=='Half' && '{SETTING:HP_Portion}'=='Half Pint'
whats does not =?
!=
Yes != is not equals
am getting there
have tried to find but is there a post which lists the defult functions { ?} and [:? ] and their uses
You must have missed it …
is there a way to display program setting variables for debugging?
ie wether or not the HP_Portion is set to Half Print or Blank?
Use Microsoft SQL server management studio.
where abouts would you find the listings?
Or use show msg action with {SETTING:Name} so {SETTING:HP_Portion}