PHP code example of setono / sylius-lagersystem-plugin

1. Go to this page and download the library: Download setono/sylius-lagersystem-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

setono / sylius-lagersystem-plugin example snippets



# config/bundles.php

return [
    // ...
    Setono\SyliusLagersystemPlugin\SetonoSyliusLagersystemPlugin::class => ['all' => true],
    // ...
];

bash
SYLIUS_SOME_PRODUCT_VARIANT_CODE=$(curl "$SYLIUS_HOST/api/lagersystem/product-variants?locale=en_US&limit=1" \
    --show-error \
    -H "Authorization: Bearer $SYLIUS_ADMIN_API_ACCESS_TOKEN" \
    -H "Accept: application/json" | jq '.items[0].code' --raw-output)
echo "Some product code: $SYLIUS_SOME_PRODUCT_VARIANT_CODE"

curl "$SYLIUS_HOST/api/lagersystem/product-variants/$SYLIUS_SOME_PRODUCT_VARIANT_CODE?locale=en_US" \
    -H "Authorization: Bearer $SYLIUS_ADMIN_API_ACCESS_TOKEN"