I did created a Coupon under "Cart Price Rule"
=========COUPON SETTINGS======================
Rule name: $20 Coupon
Websites :" Mai Website
Customer Groups : General
Uses per Coupon : 0
Uses per Customer: 1
Condetion
If ALL of these conditions are TRUE :
Subtotal equals or greater than 19.8
Actions
Apply : Fixed Amount Discount for Whole Cart
Discount Amount : 20
When I add my Coupon code on my Order
it showing
26.76 + 30 = 56.76 (subtotal+shipping)
56.76 - 20 = ?
Expected Result = 36.76
Actual Result = 35.36
Differance is = 1.4
Why this difference ? How to fix this?
This problem can be caused by Magento cache, you can clear cache and re-run indexer, and don't forget to clear browser cache.
Related
I’m building a shop app and i have many products, I want to put an offer that when the user put an order for 2 pieces of the same product he get the third one for free, so he put 3 in the cart but the total amount is for 2, the same if he ordered 3,6,9,.....
this var is for the total price, the counter is the quantity
double usedPrice = getCurrentProduct.isOnSale
? getCurrentProduct.salePrice
: double.parse(getCurrentProduct.price);
double totalPrice = usedPrice * int.parse(counter.toString());
After calculating totalPrice you can just update the quantity by
counter = counter + (counter / 2).floor() ;
I have column " Price " . This column is continous variable.
For some reason i want to make new column called " Price_Category ". This column is Discrete variable and the values are "cheap, moderate, expensive"
for example :
if 1.45 < price <1.99 then price_category = cheap
if 1.99 < price <2.00 then price_category = moderate
if 2.00 < price <5.00 then price_category = expensive
how to do that in Python Script widget in Orange Data Mining software ?
Don't know about Python Script widget, but you can use Feature Constructor widget to make a discrete variable with code such as:
0 if price <= 1.99 else 1 if price <= 2 else 2
and values:
cheap, moderate, expensive
I wanted the payment to be like 1$ for first month and 5$/month for 5 years or specific period .
So, I tried "CreateRecurringPaymentsProfile"
$fields['method']='CreateRecurringPaymentsProfile';
$fields['USER'] = Configuration::get('PAYPAL_API_USER');
$fields['PWD'] = Configuration::get('PAYPAL_API_PASSWORD');
$fields['SIGNATURE'] = Configuration::get('PAYPAL_API_SIGNATURE');
$fields['VERSION']=56;
$fields['PROFILESTARTDATE']='2015-10-20T00:00:00Z';
$fields['DESC']="xxx";
$fields['BILLINGPERIOD']='Month';
$fields['BILLINGFREQUENCY']=1;
$fields['TOTALBILLINGCYCLES']=12;
$fields['AMT']=5;
$fields['TRIALBILLINGPERIOD']='Month';
$fields['TRIALBILLINGFREQUENCY']=1;
$fields['TRIALTOTALBILLINGCYCLES']=1;
$fields['TRIALAMT']=1;
$fields['CURRENCYCODE']='USD';
$fields['COUNTRYCODE']='US';
i have specified the total billing cycle as 12 for one year. can i use total billing cycle as 60 for five years.
Try to set parameter $fields['INITAMT'] = $1; and other parameters for recurring payment to $5 for month:
$hosteddata['INITAMT'] = 1;$hosteddata['L_PAYMENTREQUEST_0_AMT0'] = 5;$hosteddata['AMT'] = 5;
In this case you will charge 1$ immediately and after that each month will charge $5 for recurring payment
Yes, you can use total billing cycle as 60 for five years, there is no problem.
You can have a try.
I have a restaurant app and have a rule where a 20% discount needs to be offered for every 2nd ice-cream.
So,
If bill has 2 icecreams, 20% discount on the 2nd icecream
If bill has 3 icecreams, still 20% discount on the 2nd icecream
If bill has 4 icecreams, 20% discount on the 2nd and 4th icecreams
I have a collection called $bill.items which contains each individual item in the bill.
How can I write this rule in Drools given that there seems to be no way to access the index of an element in a collection.
Just collect them up and apply the discounts on the right-hand-side:
rule "Discount multiple ice creams"
when
$bill : Bill()
$iceCreams : ArrayList( size > 1 ) from $bill.items
then
for (int i = 0; i < $iceCreams.size(); i++) {
if (i % 2 == 0) {
// Apply a discount
}
}
end
Or if each bill item is available in working memory, the following can be used on the LHS to collect them:
$iceCreams : ArrayList( size > 1 )
from collect( BillItem(type == "Ice Cream") )
You may need to re-sort the list you have collected, based on each item's index within the bill.
Although, does the order of the items on a single bill really matter? The order in which items are entered on a bill is a rather unusual basis for a discount. As a customer buying 2 ice creams of differing price, I would ask for the cheapest item first because I will get a bigger discount on the second ice cream added to my bill. Hence why such discounts are usually applied to the N cheapest items. i.e. If 4 ice creams are purchased, then the 2 cheapest are discounted. Also, are ice creams different prices? If each ice cream is the same price, then all you really need to know is how many need to be discounted.
In my report, I have a field which represents the "state" and here are the examples:
1 = "In progress"
2 = "Withdrawable"
3 = "Requested"
4 = "Paid"
So, I am getting a number from db and I want to change the number to the appropriate state text in my preview if it is possible.
Assuming that your field is numeric:
["In progress","Withdrawable","Requested","Paid"][{table.field}]