1

I can code in PHP and Laravel alright, so the snippet should not be difficult but I am new to Magento. I have been tasked with the request of coding a snippet that would give a 20% discount on black Friday for some items identified by the code. The thing is that I have no idea where to look at to start studying the code. On reading papers here and there, it seems that there is not even a need to code as Magento offers that ability, but how can I say, apply the discount to products whose code is between 100 and 200?

I am reading this tutorial (Shopping cart price rule) http://www.demacmedia.com/magento-commerce/shopping-cart-price-rules-in-magento-walk-through/

which is very close to what I want, but here it offers discount if you spend at least 99 dollars. What I want is to offer discount for the products whose ID number is between 100 and 200

  • You need quantity of products in cart? – user46826 Nov 10 '16 at 6:08
  • docs.magento.com/m1/ce/user_guide/marketing/… might be helpful to start – Gopal Patel Nov 10 '16 at 6:45
  • Yes, thank you very much Gopal, this is the direction I mean. I will read the tut to see if I find how to apply it to products with ID codes. – swimmer Nov 10 '16 at 6:50
  • You can also check this link it will help you : blog.amasty.com/… – user46386 Nov 10 '16 at 6:55
2

You can do this from admin :

Login to Admin

Go to Promotions -> Shopping Cart Price Rules

Click Add New Rule

Fill Rule Information

On left sidebar, click Conditions tab

Click + button icon

Select Product attribute combination

Click + button icon

Select SKU

Now, you will see SKU is ...

Put your product SKU

Note : SKU option may not show up by default. (Go to: catalog -> attributes -> manage attributes. Then search for the SKU attribute and set the drop down ‘Use for Promo Rule Conditions’ to YES and reindex if needed.)

After above steps set action :

You can set how much discount you want to give from here

Save Rule

  • that is wonderful! will it allow me to set a range of SKU numbers? I mean, I cannot enter all one by one, but would need to state, for all products whose SKU number is between 100 and 200 for example? – swimmer Nov 10 '16 at 7:02
  • 1
    no you can't set SKU range but you can add every SKU in condition – user46386 Nov 10 '16 at 7:40
  • I got it! thank you! – swimmer Nov 10 '16 at 8:10

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.