• Hi, this seems like a great plugin for my store! I’m just wondering if I can cap my daily stock? Each day I only have X amount of products available and when it resets each day I need that number to be the same, rather than adding X to the remainder of the previous days stock if that number was not sold down to 0. I’m also wondering if it is possible to integrate a time schedule for this so my stock can reset at 0000 every day?

    Thanks for the great plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I had the same need: to reset the stock, not add to it. I made an edit to the class-schedule.php file found in the Library folder.

    About 18 lines down, look for:
    $final_stock=$main_stock+$wssmgk_stock;
    and change it to:
    $final_stock=$wssmgk_stock;

    To test, I set the stock to update every minute. Seems to work.

    Thank you for posting the solution @haywyre! I had the exact same issue with this plugin.

    NOTE to the developer – please consider adding a simple checkbox/option to ADD or REPLACE the stock with the number entered.

    I have made the above suggested change and it works perfectly, so it would only be a matter of adding a check for the option setting and either use $final_stock=$main_stock+$wssmgk_stock;
    OR
    $final_stock=$wssmgk_stock;

    Nothing else needs to change. But now I’m worried that a future update will erase this change and I won’t remember to go back and fix it. So it would be great if this IS the future update. 🙂

    Thanks for a great plugin otherwise – it does exactly what my client needs.

    Came here looking for this. Thank you @haywyre!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cap Stock’ is closed to new replies.