duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

Product does not show up on the Low Stock Widget. #1100

Closed duncanmcclean closed 3 months ago

duncanmcclean commented 3 months ago

Discussed in https://github.com/duncanmcclean/simple-commerce/discussions/1098

Originally posted by **mbpassos** June 12, 2024 - php 8.3 - Laravel 11 - Statamic v5 - Simple Commerce Addon installed in existing Peak Starter Kit Project. I set the low stock value as 20 in the simple-cmmerce config file: ` 'low_stock_threshold' => 20,` I also added the live stock widget on the cp: ``` [ 'type' => 'low_stock_products', 'width' => 100, 'limit' => 5, ], ``` One of my products have less than 20 combining both variants, but it does not show up in the widget: ``` --- id: a61a4dbc-9196-44df-bb83-0b11e5496ea4 blueprint: product title: 'Doughnut Chocolate' photos: - chocolate-donuts.jpg - chocolate-glaze.webp description: - type: paragraph content: - type: text text: 'This is chocolare, chocolate, chocolate! ' product_type: physical updated_by: 18d68ec7-a9b0-47fb-a787-1f9467836101 updated_at: 1718188472 duplicated_from: 3e2a421a-0f04-41dd-bf30-d7bbc4b7db1c header_colot: '#77B3F6' header_color: '#390a0f' footer_color: '#390a0f' raw_price: 0 exempt_from_tax: true price: 0 product_variants: variants: - name: Size values: - Mini - Large options: - key: Mini variant: Mini price: 100 stock: 2 downloadable_asset: { } download_limit: null - key: Large variant: Large price: 400 stock: 2 downloadable_asset: { } download_limit: null --- ``` Is the event not being triggered? No errors are outputed. Cache has been cleared.
github-actions[bot] commented 3 months ago

Released as part of v7.3.1.