Giter VIP home page Giter VIP logo

syliusmondialrelayplugin's Introduction

Sherlockode SyliusMondialRelayPlugin


Support

Table of Content


Overview


This plugin enables Mondial Relay shipping method on your Sylius website.

image


Installation


Install the plugin with composer:

$ composer require sherlockode/sylius-mondial-relay-plugin

Complete the configuration:

# config/packages/sherlockode_sylius_mondial_relay.yaml

sherlockode_sylius_mondial_relay:
    wsdl: The mondial relay WSDL
    merchant_id: Your merchant ID
    private_key: Your private key

Import routing:

# config/routes.yaml

sherlockode_sylius_mondial_relay_plugin:
    resource: "@SherlockodeSyliusMondialRelayPlugin/Resources/config/routing.xml"

In your Shipment entity, import the PickupPointTrait:

<?php

// App/Entity/Shipping/Shipment.php

namespace App\Entity\Shipping;

use Doctrine\ORM\Mapping as ORM;
use Sherlockode\SyliusMondialRelayPlugin\Model\PickupPointTrait;
use Sylius\Component\Core\Model\Shipment as BaseShipment;

/**
 * @ORM\Entity
 * @ORM\Table(name="sylius_shipment")
 */
class Shipment extends BaseShipment
{
    use PickupPointTrait;
}

Don't forget to make a migration or a d:s:u after that

Update your webpack configuration to add entries both in shop config and admin config:

// Shop config
Encore
  // ...
  .addEntry('sherlockode-mondial-relay', './vendor/sherlockode/sylius-mondial-relay-plugin/src/Resources/public/js/entry.js')

// Admin config
Encore
  // ...
  .addEntry('sherlockode-mondial-relay', './vendor/sherlockode/sylius-mondial-relay-plugin/src/Resources/public/js/admin.js')

Usage

Shipping method configuration

Now you only have to create a new shipping method. For the Shipping charges option, select "Mondial Relay"

image

Google API integration

In order to show a Google map to select pickup points, you need to enable Google Map API for your token. You can do it in the Google Cloud Console. Then, update the plugin configuration:

# config/packages/sherlockode_sylius_mondial_relay.yaml

sherlockode_sylius_mondial_relay:
    # ...
    map_provider: google
    google_api_key: '%env(GOOGLE_API_KEY)%'

Additionally, you may want to enable Google Place API to show places suggestions when searching pickup points.

Open Street Map integration

This plugin also supports Open Street Map. To enable it, you just have to update the map_provider setting in your plugin configuration:

# config/packages/sherlockode_sylius_mondial_relay.yaml

sherlockode_sylius_mondial_relay:
    # ...
    map_provider: open_street_map

Print expedition tickets

When an order has been placed with Mondial Relay, you can print the expedition ticket from the Sylius admin. Go on the order details page and use the "Print ticket" button.

image

This feature can be disabled from the bundle configuration:

sherlockode_sylius_mondial_relay:
    # ...
    enable_ticket_printing: false

Demo Sylius Shop


We created a demo app with some useful use-cases of plugins! Visit sylius-demo.sherlockode.fr to take a look at it. The admin can be accessed under sylius-demo.sherlockode.fr/admin/login link. Plugins that we have used in the demo:

Plugin name GitHub Sylius' Store
Advance Content Bundle (ACB) https://github.com/sherlockode/SyliusAdvancedContentPlugin -
Mondial Relay https://github.com/sherlockode/SyliusMondialRelayPlugin -
Checkout Plugin https://github.com/sherlockode/SyliusCheckoutPlugin -
FAQ https://github.com/sherlockode/SyliusFAQPlugin -

Additional resources for developers


To learn more about our contribution workflow and more, we encourage you to use the following resources:

License


This plugin's source code is completely free and released under the terms of the MIT license.

Contact


If you want to contact us, the best way is to fill the form on our website or send us an e-mail to [email protected] with your question(s). We guarantee that we answer as soon as we can!

syliusmondialrelayplugin's People

Contributors

neilpeyssard avatar vowow avatar brownsim avatar squareinnov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.