oystparis / oyst-1click-magento Goto Github PK
View Code? Open in Web Editor NEWOyst 1-Click plugin for Magento
License: Apache License 2.0
Oyst 1-Click plugin for Magento
License: Apache License 2.0
Cet épic regroupe les tickets concernant l'affichage du bouton 1-click sur les fiches produits et l'affichage des commandes sur le BO Magento passées depuis 1-click
ETQM, je sais exactement quel produit a été acheté par le client.
Connaissant l'id unique de la variation du produit (référence produit, ex : mpd00038) je dois remonter dans le titre de la commande des infos relatives à ce produit (qui sont inscrites en base)
Dans un premier temps on travaille sur nos données et sur nos articles.
Il faut faire un choix sur l'affichage des propriétés qui permettent d'identifier de manière unique la variation du produit.
Ici on affiche ainsi: titre - type - color - size
L'export s'est déroulé correctement.
Cependant en base seulement 195 produits ont été exporté (postman).
L'API refuse certains produits car la catégorie doit être de type string:
Error [joi] during post products for merchant [fc60a2fd-4052-40c8-b8e8-92e02e1d5943].
@quentinjunior commented on Fri Apr 21 2017
En tant que marchand, lorsque je créer un produit, le catalogue se synchronise du côté de chez Magento mais aussi du côté de Oyst
L'affichage du bouton "Acheter en 1 clic" a lieu uniquement si le produit est référencé du côté de chez Oyst
Créer une condition qui regarde si une promotion est appliquée au produit acheté via 1-click.
Cet Epic correspond aux tickets relatifs aux orders
Lorsqu’un produit d’un e-marchand est vendu via la plateforme de OYST, l’API Order lui permet de récupérer ses commandes.
Les commandes générées par OYST peuvent prendre un ensemble de statuts différents du côté de l’Order API :
La commande est en attente de notification au marchand. Durant ce statut, une commande peut être supprimée, prévenant ainsi le marchand de mauvaise notification. A ce stade, le marchand ne peut effectuer aucune action sur la commande. L’adresse de livraison n’est pas disponible.
La commande attend la confirmation d’acceptation du marchand. Cette commande doit être acceptée ou refusée par le marchand. Au bout 48h la commande est automatiquement refusée.
La commande a été expédiée par le marchand. Cette commande peut être remboursée par le marchand.
La commande est finalisée 60 jours après sa création. Aucune action n’est possible sur cette commande.
La commande a été annulée par Oyst ou le marchand. Aucune action n’est possible sur cette commande.
La commande a été déclinée par le marchand. Aucune action n’est possible sur cette commande.
La commande a été remboursée. Aucune action n’est possible sur cette commande.
Générer automatiquement les frais de transports selon le panier du client. Trouver la meilleure facon de calculer le prix.
@quentinjunior commented on Tue May 30 2017
En tant que Oyst, quand je reçois l'import d'un catalogue, je supprime l'ancien.
En tant que Magento, pour être synchronisé avec Oyst, je dois faire la même manipulation
ETQ user, quand je fais un achat 1 click en indiquant une couleur et une taille et que je regarde le détail de l'order dans la console, le champ variation est null partout.
ref: 412
quantity_avilable:0
variations: null
Dans postman j'ai:
{
"product": {
"amount_including_taxes": {
"value": 24000,
"currency": "EUR"
},
"available_quantity": 0,
"categories": [
{
"title": "VIP",
"is_main": true,
"reference": "9"
},
{
"title": "Tees, Knits and Polos",
"is_main": false,
"reference": "16"
}
],
"condition": "new",
"cpa": 0,
"description": "V-neck cardigan. Mother of pearl front button closure. Two dart pockets. Ribbed cuff and hem. 100% cotton. Hand wash.",
"ean": "",
"id": "ec62c576-90fb-410c-ab4b-34379c04a55d",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_2.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_3.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_4.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_5.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_1.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009a.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009b_1.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009b_2.jpg"
],
"informations": {},
"is_active": true,
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"merchant_id": "281fcf14-916e-44dd-89be-996966469478",
"reference": "412",
"related_products": null,
"shipments": null,
"short_description": "A lean, raglan sleeve cardigan with cosmopolitan appeal.",
"size": null,
"tags": null,
"title": "Lexington Cardigan Sweater",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater-566.html",
"variations": [
{
"amount_including_taxes": {
"value": 0,
"currency": "EUR"
},
"available_quantity": 25,
"condition": "new",
"description": "",
"ean": "",
"id": "2150891f-2807-4f80-9fe8-95d1677859ed",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_1.jpg"
],
"informations": {},
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"reference": "258",
"shipments": null,
"short_description": "",
"size": null,
"tags": null,
"title": "",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater.html",
"weight": "0"
},
{
"amount_including_taxes": {
"value": 0,
"currency": "EUR"
},
"available_quantity": 25,
"condition": "new",
"description": "",
"ean": "",
"id": "80bf4bea-42a6-4a4d-8804-6a1546465d24",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_2.jpg",
"http://www.born3convert.com/media/catalog/product/m/t/mtk009b_1.jpg"
],
"informations": {},
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"reference": "259",
"shipments": null,
"short_description": "",
"size": null,
"tags": null,
"title": "",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater-564.html",
"weight": "0"
},
{
"amount_including_taxes": {
"value": 0,
"currency": "EUR"
},
"available_quantity": 24,
"condition": "new",
"description": "",
"ean": "",
"id": "94ccced5-f469-44e5-b0e2-b66f5ffad30e",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_3.jpg"
],
"informations": {},
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"reference": "260",
"shipments": null,
"short_description": "",
"size": null,
"tags": null,
"title": "",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater-565.html",
"weight": "0"
},
{
"amount_including_taxes": {
"value": 0,
"currency": "EUR"
},
"available_quantity": 21,
"condition": "new",
"description": "",
"ean": "",
"id": "6db25fa6-f827-4704-a7d2-34b0247aa9f7",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_4.jpg"
],
"informations": {},
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"reference": "494",
"shipments": null,
"short_description": "",
"size": null,
"tags": null,
"title": "",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater-567.html",
"weight": "0"
},
{
"amount_including_taxes": {
"value": 0,
"currency": "EUR"
},
"available_quantity": 21,
"condition": "new",
"description": "",
"ean": "",
"id": "1bc77860-407e-44d6-80fe-a4ca4289e5e2",
"images": [
"http://www.born3convert.com/media/catalog/product/m/t/mtk009t_5.jpg"
],
"informations": {},
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"reference": "495",
"shipments": null,
"short_description": "",
"size": null,
"tags": null,
"title": "",
"upc": "",
"url": "http://www.born3convert.com/lexington-cardigan-sweater-568.html",
"weight": "0"
}
],
"weight": ""
}
}
ETQM, je peux rembourser une commande depuis le BO freepay
@quentinjunior commented on Fri Apr 21 2017
En tant que marchand, lorsque je modifie mon catalogue, Oyst met à jour le catalogue (synchronisation)
Exemple: diminution du stock d'un produit
Cet épic regroupe les différents tickets liés à l'export du catalogue
ETQM, les commandes 1-click ne descendent pas dans le BO marchand
Dans la configuration, je propose au marchand de désactiver le mode : auto acceptation des commandes
En tant que marchand, lorsque j'exporte mon catalogue vers Oyst, une bannière apparaît m'indiquant où en est l'export.
Lorsqu'une commande est passée par le paiement en 1-click, le détail de l'order arrive dans le BO Magento/order
Pour cela il faut récupérer la commande via l'order API.
Détails des routes: https://one-click-api.readme.io/reference#description-technique-de-lorder-api
Ajouter exemple concret avec plusieurs articles dans une même commande
@quentinjunior commented on Fri Apr 21 2017
En tant que marchand,lorsque j’enlève un article du catalogue, le produit est supprimé chez Oyst.
Voir catalogue pour la déactivation
En tant que marchand, quand je clique sur la section Oyst, il y a un formulaire pour la configuration et la synchronisation du catalogue
Pour le moment:
Le bouton pour la synchronisation du catalogue est disponible uniquement si la clé API est enregistrée
Pour créer une commande il faut matcher avec le bon produit configurable.
Pour ça il faut connaître l'ensemble des attributs associés au produit.
Si l'attribut d'un produit n'est pas connu, alors il n'apparait pas dans le BO marchand.
Il y a un champ dans le code de Mehdi qui liste l'ensemble des attributs.
Dans un premier temps, remplir la liste des attributs avec l'ensemble des attributs existants dans la boutique du marchand.
Si c'est trop lourd (bcp d'attributs sont inutiles en soi), proposer une liste dans la configuration du module ou le marchand sélectionne quel attribut il pousse chez Oyst.
@quentinjunior commented on Fri Apr 21 2017
En tant que marchand, je dois être prévenu s'il y a rupture de stock d'un produit du catalogue.
Implémentation du catalogue less.
On n'exporte plus le catalogue du marchand.
Doc : https://one-click-api.readme.io/v1.2/reference#fonctionnement-de-oyst-1click
Quand j'achete en un clic un produit dématérialié, je n'ai pas la descente de commande malgré le mail de confirmation.
ex : http://www.born3convert.com/home-decor/books-music/alice-in-wonderland.html
{
"product": {
"amount_including_taxes": {
"value": 500,
"currency": "EUR"
},
"available_quantity": 9982,
"categories": [
{
"title": "Books & Music",
"is_main": false,
"reference": "22"
}
],
"condition": "new",
"cpa": 0,
"description": "After a tumble down the rabbit hole, Alice finds herself far away from home in the absurd world of Wonderland. As mind-bending as it is delightful, Lewis Carroll’s 1865 novel is pure magic for young and old alike. 96pp. Downloadable as pdf.",
"ean": "",
"id": "41d25cdc-512e-4222-a6ab-ec2e16d86053",
"images": [
"http://www.born3convert.com/media/catalog/product/a/l/alice_wonderland.jpeg",
"http://www.born3convert.com/media/catalog/product/a/l/alice_wonderland_1.jpg"
],
"informations": {},
"is_active": true,
"is_discounted": false,
"is_materialized": true,
"isbn": "",
"manufacturer": "",
"merchant_id": "281fcf14-916e-44dd-89be-996966469478",
"reference": "450",
"related_products": null,
"shipments": null,
"short_description": "Adventures of a young girl in a fantasy world.",
"size": null,
"tags": null,
"title": "Alice in Wonderland",
"upc": "",
"url": "http://www.born3convert.com/alice-in-wonderland.html",
"variations": [],
"weight": ""
}
}
Il est en de même avec les chaussures :
ex: http://www.born3convert.com/accessories/shoes/suede-loafer-navy-555.html
{
"product": {
"amount_including_taxes": {
"value": 31000,
"currency": "EUR"
},
"available_quantity": 25,
"categories": [
{
"title": "Shoes",
"is_main": false,
"reference": "20"
}
],
"condition": "new",
"cpa": 0,
"description": "Suede loafer. Contrast stitching. Leather lined. Imported.",
"ean": "",
"id": "5bdc6bd4-10bb-46dd-9491-3c5ebb3897c6",
"images": [
"http://www.born3convert.com/media/catalog/product/placeholder/"
],
"informations": {
"color": "Blue"
},
"is_active": true,
"is_discounted": false,
"is_materialized": false,
"isbn": "",
"manufacturer": "",
"merchant_id": "281fcf14-916e-44dd-89be-996966469478",
"reference": "365",
"related_products": null,
"shipments": null,
"short_description": "Make a statement, even when relaxed and casual. The classic loafer design elevates even the most dressed down look.",
"size": null,
"tags": null,
"title": "Suede Loafer, Navy",
"upc": "",
"url": "http://www.born3convert.com/suede-loafer-navy.html",
"variations": [],
"weight": "1"
}
}
Le statut de ces commandes est en pending (pgadmin). Peut être que le probleme vient de la création de la commande côté magento qui plante, et le statut accepted ne passe pas
Formulaire pour le choix des modes de livraison dans le BO magento lors de la configuration du module
Spectres à venir
ETQM, je peux rembourser totalement une commande depuis mon BO marchand
@quentinjunior commented on Wed May 24 2017
En tant que plugin Magento, lorsque j'enregistre une commande, elle passe automatiquement du statut PENDING à ACCEPTATION
Utilisation de la route PATCH v1/merchants/[merchant_id]/orders/[id] pour la mise à jour du statut d’une commande chez OYST.
Livrable du module pour les premiers marchands.
Pas de synchro automatique du catalogue
Pas de bonne gestion des shipments
Le bouton 1-click doit s'afficher sur toutes les fiches produits sur le site internet du e-marchand.
Il doit être au-dessus du bouton ajouter au panier avec un margin-bottom
Pour installer le bouton 1click, il faut:
Ajouter le script Oyst dans la page concernée (ex : page produit) - (frontend)
Voir détail: https://one-click-api.readme.io/reference#fonctionnement
ETQM, mes commandes sont analysées par everkey (mise en quarantaine). Pour cela il faut intégrer un nouvel état dans le workflow existant.
@quentinjunior commented on Fri Apr 21 2017
En tant que marchand, je peux exporter la totalité de mon catalog vers Oyst 1-click depuis mon back-office Magento section payment methods/Oyst/1-click en appuyant sur un bouton : start the synchronization
ETQM quand je clique sur le bouton, cela fct mais cela créé un refund offline sur le BO magento.
Ce n'est pas bloquant pour le moment mais cela n'est pas propre et cela va créé des problèmes lorsque le fraud scoring sera mis en place sur le 1-clcik.
L'idée est de déplacer ce bouton et de le mettre dans invoice pour le remboursement.
Puis de faire un bouton uniquement annulé quand le fraud scoring sera présent.
Installation de Ebay et des autres CMS sur Magento :
Le module Oyst est un SDK fourni par Oyst qui s’installera côté Backend.
Au clic de l’acheteur, la fonction OYST.getOneClickUrl appelle un entry point à définir chez le marchand, qui appelle à son tour en "server to server" la fonction définie dans le SDK avec les paramètres suivants qui permettent de déterminer les informations relatives à la commande :
{
product_reference: 'cdiscount-123',
sku_reference: 'cdiscount-123-456',
user: {
email: '[email protected]'
},
quantity: 2
}
Cet appel permettra à Oyst de générer une url unique, d’une validité de 15 minutes. La réponse se présentera sous la forme suivante :
{
url: "https://1click.oyst.com/pay?token=03f329983b86f7d9a9f5fef85305880101d5e302afafa20154d094b229f75773"
}
Cette réponse sera gérée par le module Oyst. Aucun développement n’est donc à prévoir au-delà de l’intégration du SDK.
ETQM, quand j'installe le module 1-click; les attributs créés par le marchand sont poussés chez Oyst. Cela permet la création de commande pour les produits qui ont ses attributs.
On propose au marchand de pousser d'autres attributs systèmes.
En tant que marchand, quand je clique sur synchroniser mon catalogue, j'ai un message "patienter", puis quand celui ci s'en va, le bouton est cliquable. C'est une fois que je fais F5 que le bouton est grisé.
De plus je ne vois pas l'export en cours (pas d'indicateur, js non chargé je pense)
ETQM, je peux annuler une commande depuis mon BO Magento
En base sur postman le champ quantity available est toujours nul
GET sur https://api.staging.oyst.eu/catalog/v1/products
Bearer f792d3e9ee86b30b5a6a3ab95bb2a2fd85597b698ab5fffa7c5d49ce7fa647a1
J'arrive quand même à acheter en 1-clic (je ne sais pas si c'est normal ou si c'est un bug)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.