Giter Club home page Giter Club logo

chronopost's Introduction

[DEPRECATED] This module is no longer maintained, please use :

Chronopost

Allows you to choose between differents delivery modes offered by Chronopost. Activating one or more of them will let your customers choose which one they want.

Delivery types currently availables :

  • Chrono13
  • Chrono18
  • Chrono13 BAL (pickup points/relay delivery in France)
  • Chrono Classic (Delivery in Europe)
  • Chrono Express (Express delivery in Europe)
  • Fresh13
  • Others will be added in future versions

NB1 : You need IDs provided by Chronopost to use this module.

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is Chronopost.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/chronopost-module:~1.0

Usage

First, go to your back office, tab Modules, and activate the module Chronopost. Then go to Chronopost configuration page, tab "Advanced Configuration" and fill the required fields.

After activating the delivery types you wih to use, new tabs will appear. With these, you can change the shipping prices according to the delivery type and the area, and/or activate free shipping for a given price and/or given area, or just activate it no matter the are and cart amount.

To download labels without having to go on the directory in the server, use the "Export labels" tab and click on the save icon when a label has been created. Labels are automatically created when you put the order on the status ID you entered in the configuration form, usually the treatment status.

For relay / pickup points, you need to integrate a template to choose one relay in the list provided by the loop 'chronopost.get.relay'. Ideally from a map, like google maps, yandex, or similar.

Then, you can either create an entry in the address table and use it immediately, or overload the thelia.order.delivery form to accept entire addresses as input instead of only an address id from which to get the entire address.

Loop

###[chronopost.check.rights]

Check if label directory is writable and readable.

Input arguments

None

Output arguments

Variable Description
$ERRMES Error message
$ERRFILE Folder where the error has been detected

Exemple

{loop name="yourloopname" type="chronopost.check.rights"}<!-- your template -->{/loop}

###[chronopost.delivery.mode]

Input arguments

None

Output arguments

Variable Description
$ID The delivery mode ID in the table
$TITLE The delivery mode title (ex : Fresh13)
$CODE The delivery mode code (ex : 2R)
$FREESHIPPING_ACTIVE 0 or 1 depending on whether the total freeshipping is active or not
$FREESHIPPING_FROM Cart price needed for freeshipping

Exemple

{loop name="yourloopname" type="chronopost.delivery.mode"}<!-- your template -->{/loop}

###[chronopost.get.relay]

Search for pickup points (relays)

Input arguments

Argument Description
orderweight REQUIRED : The order weight
countryid The country ID in the database
zipcode Zipcode where to search for pickup points (needs to be paired with city)
city City in which to search for the pickup points (needs to be paired with a zipcode)
address An address to search pickup points close by

Output arguments

The outputs are the same given in return by the Chronopost API response from the recherchePointChronopostInterParService method, in uppercase. Here will be displayed the most important ones

Variable Description
$IDENTIFIANT The pickup point ID
$NOM The pickup point name
$ADRESSE1 Pickup point address line 1
$ADRESSE2 Pickup point address line 2
$ADRESSE3 Pickup point address line 3
$CODEPOSTAL Pickup point Zipcode
$LOCALITE Pickup point City
$CODEPAYS Pickup point country code ISO ALPHA2
$COORDGEOLOCALISATIONLATITUDE Pickup point latitude coordinate
$COORDGEOLOCALISATIONLONGITUDE Pickup point longitude coordinate
$URLGOOGLEMAPS URL for the position of the pickup point on google mazps
$LISTEPERIODEFERMETURE (Array) List of closed periods for the pickup point
$LISTEPERIODEOUVERTURE (Array) List of opened periods for the pickup point
$TYPEDEPOINT Type of pickup point
$POIDSMAXI Max package weight accepted for this relay
$DISTANCEENMETRE Distance in meters between the given address and the relay

Exemple

{loop name="yourloopname" type="chronopost.delivery.mode"}<!-- your template -->{/loop}

###[chronopost]

Input arguments

Argument Description
area_id Mandatory ID of the area from which you want to know the prices.
delivery_mode_id Mandatory ID of the delivery mode of which you want to know the prices.

Output arguments

Variable Description
$SLICE_ID ID of the price slice
$MAX_WEIGHT Max weight for this slice price
$MAX_PRICE Max untaxed price of a cart for this price
$PRICE Price for this slice

Exemple

{loop name="chronopost" type="socolissimo"}<!-- your template -->{/loop}

###[chronopost.area.freeshipping]

Input arguments

Argument Description
area_id ID of the area from which you want to know the free shipping minimum amount needed.
delivery_mode_id ID of the delivery mode of which you want to know the free shipping minimum amount needed.

Output arguments

Variable Description
$AREA_ID ID of the area
$DELIVERY_MODE_ID ID of the delivery mode
$CART_AMOUNT Cart amount needed for free shipping in this area and for this delivery mode

Exemple

{loop name="chronopost.area.freeshipping" type="socolissimo"}<!-- your template -->{/loop}

###[chronopost.export.label]

Input arguments

Argument Description
order_ref Reference of the order you want to display
delivery_type Delivery type (ex Fresh13) of the orders you want to display
delivery_code Delivery code (ex 2R) of the orders you want to display.
label_number Label number of the order you want to display
label_directory Label directory of the orders you want to display

Output arguments

Variable Description
$REFERENCE Reference of the order
$DELIVERY_TYPE Delivery type of the order (ex Fresh13)
$DELIVERY_CODE Delivery code of the order (ex 2R)
$LABEL_NBR Label number of the order
$LABEL_DIR Label directory of the order
$ORDER_ID Order ID

Exemple

{loop name="chronopost.area.freeshipping" type="socolissimo"}<!-- your template -->{/loop}

##Integration

Templates are examples of integration for the default theme of Thelia and should probably be modified to suit your website better.

chronopost's People

Contributors

lurivar avatar roadster31 avatar

Watchers

James Cloos avatar Julien avatar  avatar Gilles Bourgeat avatar  avatar  avatar  avatar

Forkers

lurivar

chronopost's Issues

We are not able to give you a delivery method

Bonjour,

J'ai installé le module Chronopost v1.0.5.
Je l'ai associé à 3 zones de livraison

Europe : Allemagne / Belgique / Danemark / Espagne / France métropolitaine / Pays-Bas
Europe (non-EU) : Andorre / Monaco / Suisse
France : Andorre / France métropolitaine / Monaco

J'ai activé 3 modes de livraison
Chrono 18h Delivery (Code : 16) --> j'ai indiqué des tarifs pour Area : France
Chrono Europe Classic Delivery (Code : 44) --> j'ai indiqué des tarifs pour Area : Europe
Chrono Europe Express Delivery (Code : 17) --> j'ai indiqué des tarifs pour Area : Europe

J'ai 2 comptes client : l'un avec une adresse en France métropolitaine et l'autre en Allemagne

pb1. si je me connecte avec mon client France métropolitaine et que je consulte mon panier j'ai bien le message
Estimation des frais de port pour France métropolitaine
Si je me déconnecte, que je me connecte avec mon client Allemagne et que je consulte mon panier j'ai toujours le message
Estimation des frais de port pour France métropolitaine
et pas
Estimation des frais de port pour Allemagne
--> il est nécessaire de vider le cache de mon navigateur si je veux pouvoir changer de pays...

pb2 : lorsque je réalise une commande avec mon client France métropolitaine au passage à /order/delivery j'ai 3 choix dont les 2 modes Europe avec un tarif vide

Chrono 18 / 15.35 € 
Livraison Chrono Europe Classic / € 
Livraison Chrono Europe Express / € 

Je décide de supprimer France métropolitaine de la zone de livraison Europe
--> suite actualisation de la page /order/delivery j'obtiens le message
Sorry! We are not able to give you a delivery method for your order
J'ai donc - comme moyen de contournement - temporairement surchargé la page chronopost.html dans mon template en ajoutant la condition
{if $country !== 64} {/if} sur les 2 blocs {* Chrono Classic } et { Chrono Express *}

pb3 : lorsque je réalise une commande avec mon client Allemagne et que je consulte mon panier j'ai bien le message

Estimation des frais de port pour Allemagne 
Aucun mode de livraison disponible pour ce panier et ce pays

Et pourtant l'Allemagne fait bien partie de la zone Europe pour laquelle les 2 modes 'Europe Classic' et 'Europe Express' possèdent des tarifs...

Merci de votre aide

Pouvoir accéder à l'étiquette du colis à partir de la commande

Actuellement (v1.0.5) il est nécessaire que le gestionnaire d'une commande accède à l'administration du module /admin/module/Chronopost pour récupérer l'étiquette d'un colis du client.

En dehors de la praticité et le gain de temps de pouvoir accéder à l'étiquette à partir de la commande /admin/order/update/ - via l'onglet Modules existant par exemple ? - cela éviterait de donner des autorisations spéciales sur l'administration du module Chronopost au gestionnaire des commandes.

Merci.

FRAIS SUPPLEMENTAIRES POUR ZONE MONTAGNES ET CORSE

Bonjour,
il pourrait être bien de rajouter les supplément pour ces zones.

J'ai essayé de bricoler quelque chose ce matin, sans succès.
Je regarderai quand j'aurai à nouveau du temps ...

En tout cas j'ai fait la liste des codes postaux que je peux fournir.
Et un bout de code qui fonctionne dans une duplication du module colissimo de base.

Si ça intéresse quelqu'un et que c'est plus pressé, je fournis le tout.

Bonne journée

Notifier par mail l'envoi du colis

Lors du test de la v1.0.5 nous venons de nous rendre compte que - contrairement au module Colissimo que nous utilisions auparavant - aucun envoi de mail au client n'était prévu pour l'informer du départ de son colis en lui précisant le numéro pour suivi (via un lien fourni par chronopost je suppose).
Cela nous semble pourtant être une fonctionnalité nécessaire pour ce type de module (delivery).

Quelqu'un a t-il déjà réalisé le code nécessaire ?
Merci par avance.

SA step has no result for this input data

Certaines générations d'étiquette sont KO.
Le fichier de trace public_html/log/log-chronopost.txt est vide
J'ai trouvé la trace de l'erreur dans le fichier public_html/log/log-thelia.txt
1: ERROR [SetDeliveryType.php:createChronopostLabel()] {440} 2020-05-25 15:09:06:#CHRONOPOST // Error when trying to create the label. Chronopost response : SA step has no result for this input data

Peut être est-ce lié, certaines valeurs Delivery Type et Code sont vides
issue-chronopost_delivery-type

Merci

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.