Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phpmacher/availability-widget
Availability-Widget (with Scriptable)
https://github.com/phpmacher/availability-widget
ios ios-scriptable ios-widget online-shop online-store scriptable scriptable-app widget
Last synced: 6 days ago
JSON representation
Availability-Widget (with Scriptable)
- Host: GitHub
- URL: https://github.com/phpmacher/availability-widget
- Owner: phpmacher
- License: gpl-3.0
- Created: 2022-01-23T23:29:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T22:27:03.000Z (about 1 year ago)
- Last Synced: 2023-10-03T06:44:37.999Z (about 1 year ago)
- Topics: ios, ios-scriptable, ios-widget, online-shop, online-store, scriptable, scriptable-app, widget
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Availability-Widget (with Scriptable)
![Logo](images/availibility-widget.jpg)
The Availability-Widget allows you to create [Scriptable](https://scriptable.app/) widgets on your iOS smartphone to see the availabilty of specific producs (e.g. from Decathlon-Shop).
## Widget-Configuration
Each widget can be given the SKU (stock keeping unit) of a product whose availability is to be displayed on the smartphone.
**Please note:** Product numbers do not work. It has to be a SKU.
In addition, a name for the display can be defined for the respective SKU.
### Examples:
````
1460651,Poloshirt702282,Shirt
1460651,Golfshirt
2619305,Scooter
````### What is a sku and how to find it?
For each product and each size/colour of this product, there is an internal SKU (stock keeping unit) in the online shop that represents this combination.
Prices and availability are managed internally in the shop using these SKUs. Therefore, the respective SKU is required for the display of availabilities.You might ask yourself how to get the SKU number of a product, e.g. within the Decathlon online shop?
Product example: https://www.decathlon.de/search?Ntt=2558501
The SKUs of the combinations are stored within each HTML code of the product pages in the form of JSON objects. Theoretically, you can search for them yourself.
Or you can use the bookmarklet (in this case created for the Decathlon shop as an example).
This bookmarklet extracts the data and then displays this data at the top of the page with the associated additional information of the variants:![sku-Bookmarklet](images/bookmarklet-output.png)
Here is the bookmarklet: [DecathlonSKUs](bookmarklet.js) / [DecathlonSKUs-minified](bookmarklet.min.js)
(Minified with the service of: https://neurotechnics.com/tools/jsmin )
### Caching
The caching of the retrieved data is done by default for 60 minutes at a time.
During this time, there are no requests to the retrieved website.
If there is no internet connection, the data is cached by default for 24 hours.
These times were chosen because a more frequent update would make only limited sense and because the services are therefore not overloaded.
## Features
* real caching (default: 60 minutes) => no (!) outgoing requests during this time
* display of the time of the last update
* Notification if stock has increased since last request
* Click on widget (if "open app" is selected in Config) opens product page of shop (in browser)
* Bookmarklet for browser to create config string for the widgets## Bugs and Feedback
If you find any bugs please message me. Feel free to poste your issues to this repository.
## Support
Thanks for visiting or trying out this Availability-Widget!