Descrese quantity when order is placed - magento-1.7

I want to decrement quantity 10 of particular product each time place an order by customer in magento. its don't matter what quantity added in product detail page by customer.
Please help

Maybe using observer like sales_quote_add_item, will allow you to set custom quantity once the product is added to the cart.

Related

How to add 2 buttons 'add to cart' getting with different data in Prestashop?

My product has 2 prices (discount price, old price). I want to add two buttons that add product with different price. How I can do it?
If you need to just show old/discounted price for a product use Specific Prices option in Prices tab of a prodct.
Or maybe you want to do that for a bunch of products.
The standard way to do that kind of things in Prestashop is by using price rules. In this case you may need to create a category like Sales/Offers. Assign all products you need to that category in their Association tab. Then go to Price Rules -> Catalog Price Rules + Add a new condition group (choose category here), create the price rule above based on your needs.

Magento - keep product stock quantity at 0 when reached but still allow backorders

We have a Magento multi-store installation. We would like to prevent product stock levels from going below "0" when 0 quantity is reached but still allow those products to be purchased. When a product is sold out, we simply drop-ship it from another company. The main goal is to not have negative counts in the inventory. Currently, when a product is dropped shipped because we're out of stock, we have to manually change the stock quantity back to "0" from "-1" in the product's inventory field. Any suggestions would be greatly appreciated on how to make this happen.
Thank you,
Jim

Apply Discount to Products in Magento Cart page

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 add dynamic discount amount for one coupon in Magento

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);

Paypal IPN using PHP to get customized Quantity and Amount

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).