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 http://eureka.ucommerce.net/ for support.

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 11:24
    Karl
    0

    Quantity-dependent pricing service

    Hi there,

    Is there a straightforward way to implement a pricing service that takes into account the quantity being ordered? I am building a shop for a wholesaler who would like functionality such that if a customer orders 1 to 10 items, they get it at price A, 11 to 50 ships at price B. The quanty/price boundary is different for different products.

    I notice that IPricingService only allows for parameters of product and priceGroup, so it's not clear how to extend this to include quantity.

    Would overriding CalculateOrderLineTotalsTask in the basket pipeline be a good approach?

    Kind regards,

    Karl

  • Niels Jorck Ellegaard 39 posts 245 karma points
    Feb 06, 2013 @ 11:28
    Niels Jorck Ellegaard
    0

    I suppose it coud be done with the marketing foundation. There you can make a campaign that gives a discount on products based on the quantity. (I would assume)

    But it could get quite messy aswell so I'm not sure it would be the best approach, just the only one that springs to mind.

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 11:31
    Karl
    0

    Thanks Niels,

    We're using the free version, I'm afraid. I understand that Marketing Foundation isn't available.

    Karl

  • Adam Jenkin 71 posts 226 karma points
    Feb 06, 2013 @ 12:34
    Adam Jenkin
    0

    Hi Karl,

    I had a look at something similar to this and think that overriding or replacing CalculateOrderLineTotalsTask is an OK approach. My understanding is that the purpose of the pipelines is to enable you add, remove and update how everything is calculated. I have made a few modifications to the pipelines on a project I am working on.

    I think one of the most difficult issues will be in creating the interface for adding the prices into.

    I guess you could create a custom document type as these can now be used by the latest version of uCommerce. There may already be a document type out there which suits this purpose.

    Adam

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 12:45
    Karl
    0

    Thanks Adam,

    I'm having problems at the moment making any changes to the basket pipeline. I've tried adding my override in the Custom.config - no change. I then made changes directly to the Basket.config (including trying to deliberatly break it as below)

     <component id="Basket"
        service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
        type="UCommerce.Pipelines.Basket.BasketPipelineXX, UCommerce.Pipelines">
    

    ... no change. I even tried braking it by changing the path to the Basket.config in the Components.config!

    Any idea where is it reading the pipeline tasks from if not from these files?

    Also, do you have any links to pages which show how to use the custom document types in the way you describe?

    Many thanks,
    Karl

  • Adam Jenkin 71 posts 226 karma points
    Feb 06, 2013 @ 13:06
    Adam Jenkin
    0

    Im pretty sure you need to recycle the app pool for the pipeline changes to take effect (chancing the xml file doesnt seem to cause a refresh)

    I cant find documentation but in ucommerce > settings > definitions > datatypes, you create a new data type and select the umbraco data type to use.

     

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 14:09
    Karl
    0

    Hi Adam,

    I did try changing the web.config to force through the changes - I'll try just going for a full re-boot.

    Thanks for your help.

    Karl

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 16:57
    Karl
    100

    Still no luck getting my config file changes to be applied. Can't find any references to them being cached anywhere. Any insight into this greatly appreciated.

    Karl

  • Karl 21 posts 133 karma points
    Feb 06, 2013 @ 17:24
    Karl
    0

    Just worked out that my config files aren't getting written to the output directory when the solution builds. It may be something to do with Visual Studio. I'll mark this as closed.

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 07, 2013 @ 11:02
    Morten Skjoldager
    0

    Hi Karl.

    regarding the last post. Build scripts copies what you have set it up to copy. From standard it doesn't copy files that aren't included in your project. 

  • Karl 21 posts 133 karma points
    Feb 07, 2013 @ 12:30
    Karl
    0

    Thanks, Morten. 

    I've set the Basket.config properties such that "Copy to output directory" is set to "Copy always". Is there anything else I should be doing?

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 07, 2013 @ 12:47
    Morten Skjoldager
    0

    I would assume that it is enough. But you could try to right-click your project and select properties. under there you'll find Package/Publish Web. It has a section "items to deploy" where you can select which items to deploy. Hit all files in this project , if you have included the file, otherwise try all files in the project folder.

  • Karl 21 posts 133 karma points
    Feb 07, 2013 @ 12:50
    Karl
    0

    It's not a problem with publishing the site - it's when I build locally that I'm noticing that the config files aren't being copied to the obj\debug folders.

Please Sign in or register to post replies

Write your reply to:

Draft