0

The standard model for an e-commerce system is to have an RRP price and sale price (and when relevant a cost price).

I know there are product pricing rules to apply discounts, but this is a pretty un-intuitive solution as it requires the adding of a new rule for every single product that needs a discount.

Plus 'discount' isn't the right way to look at this particular situation conceptually in my opinion. I don't want the users to have to work out what the discount should be when all they want is to set a static 'special offer' price. It also doesn't make sense to refer to the cost price as a discount of any kind.

What I'd like to have is 2/3 (or as many as I want to be honest) different price fields on the product to represent the different prices. The system would then obviously display the correct price at the correct time based on some sort of rule.

I know I can just add new fields to the product bundle but their relationship to the overall price of the product will obviously not exist until "something" happens.

This seems like a pretty standard use case...has anyone come up with a good solution? Code and UI solutions both welcome.

5
  • I think your idea with custom product field is good. You can add "Special price" field and add Product Pricing Rule to set price to that field (if field is not empty).
    – kalabro
    Aug 9, 2012 at 13:51
  • just thinking out loud, so you want a field_collection of prices (where the colletion is like {a_price, type_of_price (an enumeration, taxonomy: rrp, cost, sale, etc)}. Then maybe you could create a Relation for your products, Product_Has_Realtime_Pricing_Type that lets you toggle per-product or with say VBO N kinds of products a value for Product_has_realtime_pricing_type that is a DELTA into the field_collection of prices ..... just some thoughts ...
    – tenken
    Aug 9, 2012 at 17:25
  • @kalabro Thanks I didn't know it could be that easy, I'll give that a try
    – Clive
    Aug 9, 2012 at 17:26
  • @tenken That sounds like it'd work but it might be a bit more complicated than I was hoping for. I'll give it a go though, cheers for the idea
    – Clive
    Aug 9, 2012 at 17:27
  • @Clive So I will add an answer :)
    – kalabro
    Aug 9, 2012 at 17:46

1 Answer 1

6

As mentioned you can add new field to your product type:
enter image description here
Next enable commerce_product_pricing_ui module or just add new Rule on event “Calculating the sell price of a product”. Rule looks like this (full size):
enter image description here
You can control the order of Product Pricing rules by Rules weight.

But I prefer to create field “Old price” (or “Common price”) and to add simple description:

If you want to create special offer for this product, please, place new price in the Price field and move crossed out price to “Old price” field.

So, “Old price” is only for theming. It works for small commerce sites and I don't need any crazy Rules.

1
  • I went with the Rules method (it'll sit better with this particular client), thanks a lot for going into so much detail this helped a lot
    – Clive
    Aug 9, 2012 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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