basic question I created the following variables in Buy Now button:
discount_amount=0
discount_amount2=10.00
discount_num=2
the idea is to give a 5 euro discount for each product when a client buys 2 or more of the product, but on the third purchase it subtracts 10 euros, how do i apply a 5 euro discount per product for 2 or more purchases?
The Buy Now button's variables are not "smart" enough to meet your request. Maybe you have to write some JS code to calculate the total amount dynamically, or use select box to list the possible quantity like below
<select name="amount">
<option value="100">1 piece</option>
<option value="190">2 pieces</option>
<option value="285">3 pieces</option>
...
</select>
Related
I've encountered an issue with Paypal Standard integration that I don't really know how to approach. Let's say I've got a product that costs 0.019, of which I'm buying 100. For this situation, the form should look like:
<input type="hidden" name="amount" value="1.9">
<input type="hidden" name="amount_1" value="0.019">
<input type="hidden" name="quantity_1" value="100">
However, due to the Paypal double precision, the amount_1 field is incorrect.
I can do rounding, which will give me this:
<input type="hidden" name="amount" value="1.9">
<input type="hidden" name="amount_1" value="0.02">
<input type="hidden" name="quantity_1" value="100">
but this on the other hand will provide me with wrong total, of 2 (as the amount field will be ignored).
Is there any sensible way of handling this issue (apart for grouping the objects I'm selling)? I don't think I've seen any Paypal precision related questions :/
Edit: I can (and am) round the amount value, for the total of the order. I need however to display how many items the user buys.
When I was writing a store with 3 decimal places for pricing on large volume items (resistors, LEDs, diodes etc) we had to use line totals (and rounding) for dealing with PayPal.
Thus, our own internal system took care of volumes (as makes sense for order tracking, invoicing, packing, stock control etc) and PayPal just took the cash, whilst we could still track what was sold via PayPal if we had too (payment taken but error internally).
PayPal Example Invoice:
| Qty | Desc | Price | Line Total |
| 1 | Green LED 100 Units at $0.019 | $1.90 | $1.90 |
Large electronics distributor digikey.com uses this method.
Your issue is that you're not dealing with standard amounts. I don't believe I've ever seen anybody price something like you're showing here. You really have a price tag on an item of $0.019? That would be very confusing to buyers, I would think. You might simply consider adjusting your price so it follows standards.
Alternatively, you could go ahead and round like you said, which would give you the $2.00 total, but then you could add a 10ยข discount to get back to $1.90.
I wanted to know how can I give discount value/percentage on cart page for specific product's quantity dynamically via OBSERVER.
Discount can be given on same product's with different quantities.
EX:
Customer add 4 QTY from Product A and I should be able to give 10% discount on 2 QTYs and the discount value should be shown after subtotal (as normal cart rule applied in Magento)
If I can create dynamic cart rule and apply that to products which I wanted that also useful in this case.
http://excellencemagentoblog.com/magento-add-fee-discount-order-total
this is good link to give discount for order , we can modified for particular product & product qty. calculate discount for different product and its qty. add it and setFeeAmount.
How to set dynamic discount amount if an coupon is applied.
For this i have created a shopping cart price rule and send this promo coupon to some customers and when they purchase products from my site and applied this coupon every customers get different discount amount based on the products in their shopping cart so how i can set this dynamic discount amount ?
I have already make some research on salesrule/rule module but getting confused so please help me...
Just for some your knowledge or someone needy finally i have found solution for my question for dynamic discount amount.
to achieve this you need to change in two methods first one is process(Mage_Sales_Model_Quote_Item_Abstract $item) under Mage_SalesRule_Model_Validator class in which you need to change the rule discount amount and set it to any dynamic calculated value like
$rule->setDiscountAmount($dynamicDiscountAmount);
and in the collect method just update the discount amount for display purpose in totals block
$address->setDiscountAmount(-$discountAmount);
$address->setBaseDiscountAmount(-$discountAmount);
Summary: Trying to pass along a variable Monthly Subscription cost to PayPal based on user-selected options on a form I created. Working within Website Payments Standard with Enhanced Recurring Payment option, is this possible?
Details:
User visits "shop" page, which is a form with 4 line items, each line item consisting of 2-7 options, each option with an associated price.
For example, line item 1 is "size of business" with the options being:
a) 1-3 employees - $10
b) 4+ employees - $12.50
User goes through the list and chooses 1 option for each line item and some javascript calculates the total due on the fly.
Is it possible to pass this total to PayPal, not as a one-time cost, rather as the base cost for a monthly subscription?
Yes. Just change the value you're passing for a3, rather than amount.
Is there a problem you're running into?
I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).