Open Cart 2 Coupon Multiple - opencart2.x

I have been trying to figure out a way to do the following :
Example,
You Order the same 5 Chickens at £20 each and you apply a £5 off coupon for the product.
Instead of £95.00, the price should be £75.
Is this at all possible, I have been digging through the cart.php for hours I cant seem to find a way.

Related

Stripe: Discount 1st year of a subscription

Stripe says intro rates on a subscription aren't able to be done, it would require a manual process of signing the user up for a product at 1 price, and then getting them to switch over to a 2nd product at a different price. Has anyone ever been able to successfully figure out a way to do this?
Basically, what I would like to do is have a user create an reoccurring annual subscription with a base price of $100.
I'd like the first year for them to be 10% off, so $90, with an annual renewal rate of the base price, $100.
I tried solving through coupons and graduated pricing but neither seemed to work. Curious if anyone has ideas or if a 1 time, automatic discount or intro rate is something that's just not doable at all.

Why when the market price is below a limit buy, why is it not fullfilled?

I am writing a trading bot in C++. I am making limit orders that allow for 1% leniency. As you can see there is a market price of 2.2532, and I made a limit buy at 2.2757. Logically, if the limit buy should be activated once the market price is at or below the limit price. However, as you can see from the pictures below, this is not the case. I posted pictures of both the order book and the trade history. What I am wondering is why. Does this have something to do with the order book? I also noticed when placing market values generally there is a fairly large discrepancy between the price of the market and the average price it is filled at.
Since getting the market price on Binance does not seem to actually tell you if the market order will be full-filled at that price, or if the limit order can go through at a price around there. Is there a way to actually programmatically/mathematically find out if a limit order will go through. Or, find out what the actual average price of a market order will be if bought in that moment?
UPDATE
So when I go to place a market order, I get this message:
Your order price will be 8% higher than the latest market price. Please proceed cautiously. When I want to buy at the market price. Partially I want to know why. But also, is there a way to get the exact number in which this price will be? Also, Is there a way to get this on the API exactly what the next market buy/sell will be?
After some more research on the question. According to investopedia
A trade will only occur when someone is willing to sell the security at the bid price, or buy it at the ask price.
Meaning, the price at which the asset will be sold at has less to do with the current market price, and a lot more to do with the order book. Looking at the pictures above, at that time according to limit orders the lowest someone was willing to sell the asset was, was 2.500 and the highest someone was willing to buy the asset for was 2.499. These are the ask price and bid price respectively. Since no one was willing to buy at the ask price or sell at the bid price, the transaction did not go through. Notice that the quantities are also important for knowing how much of the order will be filled, for your future reference.
For those that might be a little confused, you need to buy at the lowest someone is willing to sell. You need to sell at the highest someone is willing to buy. These come from the limit orders.
Back to the original question, the update on the 8% difference makes sense, the ask price probably dropped a little. However, if you notice 2.2532 * 1.08 is 2.433456 which is much closer to the 2.5 price above than the limit buy created at 2.2757 meaning the 8% notification makes sense.
I will now explain how you would calculate this using mathematics and coding. You need to pull from the order book ticker. This api request is /api/v3/ticker/bookTicker
I am going to use the example of wanting a market buy for GRTUSD. The dictionary you get back from the link https://api.binance.us/api/v3/ticker/bookTicker?symbol=GRTUSD is {"symbol":"GRTUSD","bidPrice":"0.1391","bidQty":"3613.45000000","askPrice":"0.1393","askQty":"5183.18000000"}
Some quick math shows that 5183.18000000 of GRT is the equivalent of a little over 722 USD at the ask price. This means if I placed a market buy for GRTUSD. As long as the amount of USD I was investing at that moment was equivalent to or less than 722 USD it would get filled at the ask price of 0.1393

How to link a check button(true/false) with a toggle list after that

I'm having some trouble today. I need to put in a table from excel the name of 12 members of a project and their available days for work (name-availability), so I did a lot of check buttons for each person, as in the image :table with members and their free days
But, after that, I need to create a toggle list with the days of week in a calendar and receive the name of the people based in their free days. Like:
Person1 can work mondays, wednesdays and saturdays. Person2 can work mondays, fridays and sundays. Person3 can work only at fridays.
And for that, have a list like this one:The second table, with all the members, not with filtered members based in the days, "sexta-feira" is friday.
In this, I've tried to use the data validation table. But I want to create a list only with the name of the people that are available based in the table 1, not putting all the names of the members.
In this example, for the day 1st October, the list showing only Person2 and Person3 without Person1 because the P1 isn't available.
Somebody have a tip to me? Im really confused about how can I do that.
Thanks so much in advance!

Prestashop 1.7.5.2: bulk product combination not showing "Impact on price"

I have added attributes to a product but on creating combinations the bulk process is only showing quantity and not showing "Impact on price".
I attached an image to give the clear picture of what is required, as editing the price for each and every combination would be very time consuming.
I also want to know how can we create singe discount for all the combinations, eg., a $5 discount for all the combinations.
Zoom out on your browser to see the missing columns.

Any Drupal Modules to help with price caculator?

Ive made a booking form using Drupal 6, where bookings are a content type and you create a node of that type to make a booking.
I now need to add a price calculator. When creating a booking node, one of the CCK fields you fill in is distance. I then need the price to be calculated from the rates below, and that value to be given to another CCK field.
Rates:
0-5 km $20/ mile
5-10 km $15/ mile
10-20 km $10/ mile
20-30 km $5/ mile
So if the distance was 11km, the price would be 11 x 15 = 165. Also, the rates table needs to be editable by the site admin.
Can any Drupal modules do or at least help with this? I could probably manage to do the calculations and change the price field value with jQuery. If the table was shown on the page then jQuery could grab the values from it, and the table could be editable by the admin so the rates could be changed. Im far from a jQuery expert though....
Thanks
UPDATE - Ive asked the question in the Drupal Answers site, but im not able to move or delete this post.
https://drupal.stackexchange.com/questions/11758/any-modules-to-help-with-price-caculator
You may want to check out the Computer Field module.

Resources