Copied to clipboard

Flag this post as spam?

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


  • Lewis Smith 208 posts 617 karma points c-trib
    Sep 08, 2017 @ 13:30
    Lewis Smith
    0

    Setting product stock level

    Hi,

    I want to set my stock level always to 1 but when I enter 1 in the product stock level and save and publish it just removes the number i enter. I assume that this means the level is dynamic.

    How do i set it so that the stock level is always set to one and once the product has been purchased it is removed from the website?

    Also is there anyway of only allowing the user to add a product into the basket once? So the same item cannot be added twice doubling the cost? I have done this with cookies but would prefer a server side solution.

    Thanks, Lewis

  • Anders Burla 2560 posts 8256 karma points
    Sep 19, 2017 @ 12:08
    Anders Burla
    0

    The reason for the stock level not being set - could that be that you have not configured the stock correctly if using variants? It should be able to save the value 1 or any other number.

    Sounds like you want to do pessimistic stock control. That is where a product is taken from stock when a customer adds it to the cart. You will need to program this your self. What you need to do is to count the stock down in the moment the product is added to cart.

    But you also need to have a mechanic to put back on stock if a cart is abandoned. So you need to write a scheduled service that makes this happen.

    Kind regards

    Anders

  • Lewis Smith 208 posts 617 karma points c-trib
    Sep 19, 2017 @ 12:29
    Lewis Smith
    0

    Hi anders,

    Thanks! I will give this a go. I dont have any variants though so not sure why this is happening. I'm going to try to get the starterkit installed again but still cant get this to work with 7.6+.

    Thanks, Lewis

  • Anders Burla 2560 posts 8256 karma points
    Sep 19, 2017 @ 12:36
    Anders Burla
    0

    This runs Umbraco 7.6.2 and works? Just downloaded and pressed F5 in Visual Studio and it runs.

    https://github.com/TeaCommerce/Starter-kit-for-Umbraco/tree/dev

    Kind regards

    Anders

Please Sign in or register to post replies

Write your reply to:

Draft