Documentation
Shopify
A custom app in your store, anchor price metafields and Liquid.
Requirements
An app in your store with scopes read_products, write_products (to write anchor prices to metafields) and optionally write_online_store_pages (for the Cjenici page).
Path A — an existing custom app (Admin API token)
If your store already has a custom app (Settings → Apps and sales channels → Develop apps), copy the Admin API access token (shpat_…) and, for instant updates, the API secret key.
Path B — a new app from the Dev Dashboard
- Open the Shopify Dev Dashboard → Create app.
- Enable the scopes above in the app version and release it.
- Install the app on your store.
- Copy the Client ID and Client secret from the app settings.
With Client ID and secret, Sidro obtains access tokens itself (client credentials).
Connecting in Sidro
Data sources → Shopify: yourstore.myshopify.com, the token or Client ID + secret, and Write anchor prices to metafields. Sidro then reads all variants, writes custom.sidrena_cijena (money) and custom.sidrena_datum (date) to every variant and, with a client secret, registers a products/update webhook.
Theme display (Liquid)
{%- assign v = product.selected_or_first_available_variant -%}
{%- if v.metafields.custom.sidrena_cijena -%}
<p class="sidrena-cijena" data-sidro-sifra="{{ v.sku }}">
Sidrena cijena ({{ v.metafields.custom.sidrena_datum.value | date: '%-d. %-m. %Y.' }}):
<strong>{{ v.metafields.custom.sidrena_cijena.value | money }}</strong>
</p>
{%- endif -%}
For themes that switch variants without reloading, add the widget too.