square-furniture-78894
11/16/2022, 1:23 PMCommand yves-build-frontend [vendor/bin/console frontend:yves:build] (In progress...)
Store: DE | Environment: docker.dev
Install Merchant Portal dependencies
Output trimmed, only last 100 lines shown.
Store: DE | Environment: docker.dev
Install Zed dependencies
Store: DE | Environment: docker.dev
Build Yves frontend
> spryker-b2b-demo-shop@1.0.0 yves /data
> run-s "yves:development:* -- {@}" --
sh: run-s: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! spryker-b2b-demo-shop@1.0.0 yves: `run-s "yves:development:* -- {@}" --`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the spryker-b2b-demo-shop@1.0.0 yves script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/spryker/.npm/_logs/2022-11-16T13_16_47_365Z-debug.log
In CommandLineExecutable.php line 107:
Aborted install...
calm-toddler-60539
11/16/2022, 1:29 PMdocker/sdk console spryk:run --module=TestModule
.. Can you please tell me if this is the right command?calm-toddler-60539
11/17/2022, 1:25 PM- No route found for "POST
<http://backend-gateway.de.spryker.local/addax-pickup-points/gateway/add-pickup-point-to-queue>"
calm-toddler-60539
11/17/2022, 1:43 PMpublic function configure(ResourceRouteCollectionInterface $resourceRouteCollection)
: ResourceRouteCollectionInterface {
// to get all pickup points
$resourceRouteCollection->addGet('get', true);
// to add a pickup point
$resourceRouteCollection->addPost('post', true);
//
return $resourceRouteCollection;
}
I send the following POST request to the endpoint using the PHPStorm Scratch file:
###
POST <http://glue.de.spryker.local/addax-pickup-points/>
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJmcm9udGVuZCIsImp0aSI6ImZlYjI2OWZhMGI2OTBmMGM3ODY4ZTYzMGE0YzRjOGZhZWI5YjI1ZTNlZTdiY2NjYjcxZWU5YTEzNDYwYjU2NGY4MjliNGM4ZmYzZjRiYTc3IiwiaWF0IjoxNjY4NjgxMTc1LCJuYmYiOjE2Njg2ODExNzUsImV4cCI6MTY2ODcwOTk3NSwic3ViIjoie1wiaWRfYWdlbnRcIjpudWxsLFwiY3VzdG9tZXJfcmVmZXJlbmNlXCI6XCJERS0tMTZcIixcImlkX2N1c3RvbWVyXCI6MTZ9Iiwic2NvcGVzIjpbImN1c3RvbWVyIl19.3DSGl2f4Bs30ic6prumfYbN7iGweMeWyKs9XuObVCCnwxtkxPS2H4UNcZDr3_cLbNqtLW2PaU_N5raUjCI6bhjmiT0dAc2kkW6iFq_2MVsroQDALKe_odRb_ibAAgLIjGDXsAWFbaJ3lHk7qpDCNdqMwbvny0oQkVxc90aB6CPVqWXW_Yh4Gpl-zUJTD-NFM_XxDTSJax5Qtq80t7SZzEXKuPHVN7tOO8dGxUKMavgfU6vCZTqUrlRCskB7RG8ctCR3x6XLJzOuIEBWOUvDQsE_2DyiKTz9_ZzjRiDWqxOzlH6kIrT1Eph4-kSL0aOhGDWYBeFbc3z_kRENnZg6JkQ
accept: application/json
Content-Type: application/json
{
"data":
{
"idAddaxPickupPoint":"123",
"shopName" : "Wolf Land",
"address" : "Carl Zeiss Street 12",
"city" : "Berlin",
"country" : "Germany",
"idNumber" : "123"
}
}
But I get the following error:
<http://glue.de.spryker.local/addax-pickup-points/>
HTTP/1.1 400 Bad Request
Server: nginx
Date: Thu, 17 Nov 2022 13:41:04 GMT
Content-Type: application/vnd.api+json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache, private
content-language: en_US
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: same-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
{
"errors": [
{
"detail": "Post data is invalid.",
"status": 400
}
]
}
Can someone please advise?cool-beard-17954
11/17/2022, 3:46 PMclever-jelly-54786
11/18/2022, 7:46 AMhallowed-dentist-19902
11/18/2022, 10:57 AMcalm-toddler-60539
11/21/2022, 9:02 AM<http://glue.de|glue.de>.spryker.local/pickup
and I would like to add a`glue.de.spryker.local/pickup/add` endpoint as well. Is it possible to do it in the same module? Following is the glimpse of my ResourceRoutePlugin.php file
...
class AddaxPickupPointsResourceRoutePlugin extends AbstractPlugin implements ResourceRoutePluginInterface
{
public function configure(ResourceRouteCollectionInterface $resourceRouteCollection)
: ResourceRouteCollectionInterface {
// to get all pickup points
$resourceRouteCollection->addGet('get', true);
return $resourceRouteCollection;
}
...
early-army-90039
11/21/2022, 11:24 AMfast-activity-30172
11/21/2022, 11:28 AMwonderful-baker-94910
11/21/2022, 11:51 AMadventurous-psychiatrist-79661
11/21/2022, 12:05 PMstocky-architect-18877
11/22/2022, 5:55 AMwonderful-baker-94910
11/22/2022, 9:21 AMprehistoric-arm-81038
11/22/2022, 10:01 AMwonderful-baker-94910
11/22/2022, 11:41 AMcool-beard-17954
11/22/2022, 4:05 PMZed.CRITICAL: Spryker\Zed\DataImport\Business\Exception\DataSetBrokerTransactionFailedException - The key "title.fr_FR" was not found in data set. Available keys: "navigation_key, node_key, parent_node_key, node_type, title.en_US, url.en_US, css_class.en_US, title.de_DE, url.de_DE, css_class.de_DE, valid_from, valid_to, locales, idNavigation" in "/data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php::59" {"exception":"[object] (Spryker\\Zed\\DataImport\\Business\\Exception\\DataSetBrokerTransactionFailedException(code: 0): The key \"title.fr_FR\" was not found in data set. Available keys: \"navigation_key, node_key, parent_node_key, node_type, title.en_US, url.en_US, css_class.en_US, title.de_DE, url.de_DE, css_class.de_DE, valid_from, valid_to, locales, idNavigation\" at /data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php:59)
[stacktrace]
I can't touch this part of the code, does someone know how to change this ?tall-spring-12746
11/22/2022, 6:01 PMtall-spring-12746
11/22/2022, 6:01 PMsparse-chef-99859
11/23/2022, 12:27 AM\Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface
which is deprecated). We want to migrate to the new approach.
I already went through Spryker documentation and followed "How to create a backend resource" but it seems that I miss something.
Does anyone know where can I see a working example of a Glue backend api implementation or something that could help?best-sundown-96727
11/23/2022, 8:40 AMfull-carpet-73492
11/23/2022, 9:44 AMcalm-toddler-60539
11/23/2022, 10:27 AMvender
folder instead of the current folder. Any tips to fix this?
This is my CheckoutController.php code:
<?php
namespace Pyz\Yves\CheckoutPage\Controller;
use Pyz\Yves\CheckoutPage\Form\FormFactory;
use SprykerShop\Yves\CheckoutPage\Controller\CheckoutController as SprykerShopCheckoutController;
use Symfony\Component\HttpFoundation\Request;
/**
* @method \Pyz\Yves\CheckoutPage\CheckoutPageFactory getFactory()
*/
class CheckoutController extends SprykerShopCheckoutController
{
/**
* @param Request $request
*
* @return mixed
*/
public function voucherAction(Request $request)
{
$checkoutFormFactory = $this->getFactory() // Gets the CheckoutPageFactory from the vendor/spryker/checkoutPage/src/Yves/... folder instead of the current module folder
->createCheckoutFormFactory();
$stepProcess = $this->createStepProcess();
$response = $stepProcess->process(
$request,
$checkoutFormFactory->createVoucherFormCollection()
);
if (!is_array($response)) {
return $response;
}
return $this->view(
$response,
$this->getFactory()->getCustomerPageWidgetPlugins(),
'@CheckoutPage/views/voucher/voucher.twig'
);
}
}
quiet-ram-72134
11/23/2022, 1:49 PMcalm-toddler-60539
11/23/2022, 4:05 PMclever-jelly-54786
11/24/2022, 7:56 AMgentle-art-90358
11/24/2022, 11:15 AMpurple-cartoon-1845
11/24/2022, 4:12 PMrough-agency-88294
11/25/2022, 8:06 AMgentle-art-90358
11/25/2022, 10:25 AMDataImportPlugin
and a mere DataImporter
?