0

I need to create a new coupon that will give a $50 discount for only two products . The customer should be charged shipping of $5 (fixed only for this two products). It should take $50 off of their cart, and then add $5 for shipping cost.

Can any body please give me some idea / guidance how to implement this? Any help will be greatly appreciated.

thanks

Edited

I am using Flat Rate shipping method for all the other products even this two particular products as well if customer doesn't use coupon.

Suppose the cost of Product A is $60 and shipping cost is $10. Grand total $60+$10 = $70

After applying coupon price will be only $15 ($10+$5)

1

You can achieve this in 2 steps.

1.Create a discount rule for 50$ that applies only to your 2 products. Add the sku's of the products in the Actions tab under the section Apply the rule only to cart items matching the following conditions (leave blank for all items)

2.Create your shipping method and inside the collectRates you can access the quote items like this: $request->getAllItems(). See if both your items are in the quote and add an extra 5$ to the cost. if they are and the quote has your coupon code applied ($quote->getCouponCode()) then make the shipping 5$.
You can get the quote like this:

$items=$request->getAllItems();
$quote = null;
foreach ($items as $item){
    $quote = $item->getQuote();
    break;
}
if ($quote){....}

Or you can just create a discount rule for those 2 products for 45$ (50-5).
Or you can make your coupon enable free shipping and make the discount 45$.

  • i m just waiting for your answer. :) thank u very much. i will accept your answer after doing that. But i have an issue. Shipping cost will be fixed for this two products ($5) only when customer use coupon other wise not.Suppose product cost is $60 and shipping cost is $10. if customer use coupon then product price will be $10 and shipping cost will be $5 means total price will be $15 – monojit banik Aug 13 '13 at 7:09
  • @monojitbanik. I misunderstood a little your question. I've edited the answer with an additional suggestion. – Marius Aug 13 '13 at 7:14
  • you are telling me to create new shipping module.right? I want to use USPS shipping method (already running) for all other products even this two particular product as well, if customer doesn't use coupon.Hope it will no problem. – monojit banik Aug 13 '13 at 7:26
  • @monojitbanik. Maybe you should add the fact that you are using USPS to the question. It's important, because my answer seams without value now that you said this. – Marius Aug 13 '13 at 7:36
  • i m edited my question. Can u plz update your answer? – monojit banik Aug 13 '13 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.