Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

These support forums are now closed for new topics and comments.
Please head on over to for support.

  • Jukka-Pekka Keisala 80 posts 204 karma points
    Oct 12, 2010 @ 18:28
    Jukka-Pekka Keisala

    uCommerce price calculation by date

    I am building a shop where product price varies by date. Each price and date is unique per product. 


    Product X

    • xMas sale: Nov 1 - Dec 31 - 99€
    • Jan sale: Jan 1 - Dec 31 - 69€

    What is the best way to make these prices? Would I display the prices based on the data from the variant file or should I use some price groups?

  • Jukka-Pekka Keisala 80 posts 204 karma points
    Oct 12, 2010 @ 18:34
    Jukka-Pekka Keisala

    Damn, i made duplicate and wanted to delete this post but Delete action does not work apparently, sorry for double post.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 12, 2010 @ 21:04
    Søren Spelling Lund

    Hi Jukka,

    The easiest route would be to use variants for your different prices. One caveat though is that if you have other variant dimensions as that would require you to duplicate your existing variants once for every additional price. Basically you'd filter the variants returned based on two dates set on each variant and only display those variants where the current date is within your inteval.

    Another way to do it is to use the pricing service extension point to override pricing on a per product basis. If you set up a price group for each of the prices that you need and use a naming convention to determine which price group to select from code that would solve it as well. Basically you'd have a price group for each interval that: XMAS_2010-11-01_2010-12-31, SPRING_2011-01-01_2011-03-29. Something like that. It's not pretty but it would get the job done :)

    One thing to consider is that if you're dealing with a backend ERP system for handling varying prices over time an option would be to let the ERP handle the price and transfer the price via integration once per day. This way you'd only need one price in uCommerce which would b set to whatever is the current price based on what is received from the ERP. Basically uCommerce would be completely ignorant about upcoming prices - only the current one would matter.

    Hope this helps.

Please Sign in or register to post replies

Write your reply to: