we would like to sell pre-paid gift cards which is our customers should specify the amount of cart.
So, I have created a custom option to specify card balance then I would like to multiply with card quantity.
CARD A
Balance = 50$
Quantity = 10
Total = 500$
So my question is, how can I do this approach?
Thanks,
Related
I want to create a stock exchange simulation using C# programming language. But I couldn't decide on how to specify the price of an asset.
For example, the following table is an order book for an asset:
Buy Sell
----------------------------- ----------------------------
ID Time Size Price ID Price Size Time
4 8:00:04 250 100 1 101 750 8:00:01
6 8:00:10 500 100 5 101 500 8:00:05
2 8:00:01 750 97 8 101 750 8:00:30
7 8:00:10 150 96 3 102 250 8:00:02
The simplest order book matching algorithm is a price-time-priority algorithm. That means that the matching priority firstly is price and then time. The participants are rewarded for offering the best price and coming early.
Every asset has a current price in stock exchanges. But how can I calculate the price of this asset? Is there any algorithm for this?
An exchange will usually show the 'top of the book', showing best bid (the highest number someone is willing to buy at) and ask (the lowest price someone is willing to sell at).
Where you see an exchange offering a single price, it is derived in one of two ways:
if there have been recent (valid) trades, then it is the last traded price
otherwise, it is the reference price
What is a Reference Price?
Most equity and derivatives exchanges maintain a reference price for each book. This is used to prevent acceptance of orders which would be too far from the reference price - aka 'extreme trading range'.
Usually the reference price is set to the last traded price during the day, but how is it set in the first place before any trading happens?
The reference price is usually determined after each trading reset (e.g. start of day, start of week or start of a new book) as one of the following in order of precedence:
price discovered during an initial auction period (usually only in equity markets)
if no auction, then last traded (or settled, depending on the market) price
use a price from another market operator running the same book
or the market operator can use it's own 'reasonable' method to determine a reference price, e.g. for an initial listing of a new security
How to apply this?
So if you want to set a new 'current price' in BTC but you don't yet have any trades on your book, then because BTC is already widely traded you can:
use the last price traded on binance for the pair you're running
take a mean or median of last prices from multiple BTC books run by others
manually set some other price you think will attract both buyers and sellers
I'm making a shop with clothing. But there is a minimal order amount per order. Now i want to have a choice that the customer can make with different sizes.
So the minimal count is 10 pieces, and if a customer wants 4 size M, 5 size L and 1 size XL. what is the easiest way in code that i can accomplish this?
I'm using simple products associated with configurable products.
Maybe this could help :)
How to get the Total Quantity Of All the Items In your Shopping Cart
I am going through the admin panel of magento understanding each field in detail before traversing to next. I got stuck at these two fields(dropdowns) which says
Apply Customer Tax : i) before discount, ii) after discount
Apply Discount On Prices: i) excluding tax, ii) including tax
Let's say we opted for "after discount" for question 1, apply customer tax. This means First Discount, Next Tax, which indirectly means "Apply discount on prices" -> "excluding tax".
In short, question 1 indirectly talks of question 2. What is the necessity of question 2. If they are not dependent please give some realtime examples. Thanks.
Apply Customer Tax -
From this option you can select whether the tax should be applied before or after a discount. By default, it's set to Before Discount. If you want the tax to be applied after a discount has been applied, just select After Discount. This, of course, will have an effect on the final price.
Let's illustrate it with an example. For instance, let's assume that the tax is applied before the discount, the tax is 10 percent and a customer orders a product that costs 100 dollars; this makes the total price with tax 110. The customer has a coupon for 10 percent discount and applies it which makes the final price 100 dollars (the discount is applied on the original price of the product excluding the tax). Now if we set the Apply Customer Tax drop-down to After Discount and we use the same example the final price will be 99 dollars because the 10 percent tax is applied on the price after the discount, which in this case is 90 dollars (100 dollars original price minus 10 percent discount).
Apply Discount On Prices -
By default, discounts are applied to the original price of the order before the tax is applied. If you select Including Tax, the discount will be applied after the tax is applied to the original price. This setting is connected with the previous one.
Check the description of the previous setting to see an example of how both settings work together when the Apply Discount On Prices option is set to Excluding Tax and the Apply Customer Tax option is set to Before Discount and After Discount.
Now we'll use the same example to illustrate what happens when you change Apply Discount On Prices to Including Tax. So the ordered product is 100 dollars, the tax is 10 % and and the customer applies a coupon for 10 % discount. When the Apply Customer Tax option is set to Before Discount, the tax of 10 % will be applied to the original price of $100 which makes the total taxed price $110. The discount of 10 % is applied to this amount because the Apply Discount On Prices option is set to Including Tax; 10 % of 110 is 11, so the final amount is $99. In the same situation if we change the Apply Customer Tax option to After Discount, the grand total would be $97.90. The discount has to be applied on the taxed price which is a total of $110 ($100 original price + 10 % tax), and since the discount is 10 % that makes the discount sum $11 (10 % of $110), but the tax itself actually has to be applied after the discount is applied to the original price ($100 original price - $11 discount = $89). This make the final tax amount $8.9 (with 10 % tax) which makes the grand total 97.90 ($89 discounted price + $8.9 tax = $97.90).
For more detail please check this link
Magento System Tax Settings
I'm using the table rates (weight) to calculate the shipping costs. There are some products that have fixed shipping costs.
For example. I've a total of 7 products in my cart. 5 of these products are covered by the shipping rates. These 5 products have a total weight of 20kg. The costs of 20kg is €20.
The other 2 products have a shipping costs of €10 a piece. The weight of these 2 products must not be include into the table rates.
So the total costs of shipping is:
€20 for the first 5 products
and 2 times €10 for the last 2 products
So the total shipping costs has to be €40
Does anyone know an extension/ a way to fix this problem?
Check this extension it looks like it should have all requirements http://www.magentocommerce.com/magento-connect/WebShopApps/extension/1357/webshopapps-product-matrix-shipping
Guys i need an advice on how can i achieve this shipping rule
1) Shipping cost should be at a minimum of US$25.00 or 10% of the total purchase.
Example 1:
Total Purchase = $25
Shipping cost = $25
Total = $50
Example 2:
Total Purchase = $500
Shipping cost = $50
Total purchase = $550.00
Thanks.
You can achieve with this link for fix : $25 http://www.magentocommerce.com/knowledge-base/entry/setting-up-flat-rate-shipping
And also you can achieve for 10% of total purchase with same above link you can use to set.
Please read and try understand document to set as you need in your application.