PHP code example of eleven59 / backpack-shop-mollie

1. Go to this page and download the library: Download eleven59/backpack-shop-mollie 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/ */

    

eleven59 / backpack-shop-mollie example snippets


'payment_provider' => \Eleven59\BackpackShopMollie\Models\PaymentProvider::class,
shell
php artisan vendor:publish --provider="Eleven59\BackpackShop\AddonServiceProvider" --tag="config"
injectablephp
<select name="payment_method">
    @foreach(shoppingcart()->getPaymentMethods() as $method)
        <option value="{{ $method['id'] }}" {{ old('payment_method', 'ideal') === $method['id'] ? 'selected' : '' }}>{{ $method['description'] }}</option>
    @endforeach
</select>
injectablephp
<select name="payment_method" class="has-dependencies">
    @foreach(shoppingcart()->getPaymentMethods() as $method)
        <option value="{{ $method['id'] }}" {{ old('payment_method', 'ideal') === $method['id'] ? 'selected' : '' }}>{{ $method['description'] }}</option>
    @endforeach
</select>
injectablephp
@foreach(shoppingcart()->getPaymentMethods() as $method)
    @if(!empty($method['dependencies']))
        @foreach($method['dependencies'] as $dependency)
            <select class="select2 payment-method-dependent payment-method-{{ $method['id'] }}-dependent" style="display: none;" name="{{ $dependency['name'] }}" id="{{ $dependency['id'] }}" data-minimum-results-for-search="-1">
                @foreach($dependency['values'] as $values)
                    <option value="{{ $values['id'] }}" {{ old($dependency['name'], 'ideal_ABNANL2A') === $values['id'] ? 'selected' : '' }}>{{ $values['description'] }}</option>
                @endforeach
            </select>
        @endforeach
    @endif
@endforeach