https://www.spryker.com logo
Join Slack
Powered by
# help
  • a

    ancient-apartment-59274

    08/26/2020, 9:25 AM
    Hello, following the spryker code for tax rate calculation there is a function which will be called when adding an item via glue addItemToCart endpoint
    Copy code
    protected function recalculateWithItemsAndShippingAddress(ArrayObject $itemTransfers, ?AddressTransfer $shippingAddressTransfer): ArrayObject
    {
        $countryIso2Code = $this->getShippingCountryIso2Code($shippingAddressTransfer);
        $allIdProductAbstracts = $this->getAllIdAbstractProducts($itemTransfers);
    
        $taxRates = $this->findTaxRatesByAllIdProductAbstractsAndCountryIso2Code(
            $allIdProductAbstracts,
            $countryIso2Code
        );
    
        return $this->setItemsTax($itemTransfers, $taxRates);
    }
    This will fetch the correct taxrate by looking into the country code of the provided shipment address … First a business related question: Why the taxrate gets calculated using the shipping address? Isn’t taxrate something that is specific for a certain country? So when i order as a german customer with a de iso2code in an asian shop, i assume i should not pay german taxes, right? So why the countrycode of the shipping address is relevant here? Second is a technical one: Where can i set the shipping address (iso2code) that the taxes are calculated correctly? Currently the shipping address is not set because there is never a opportunity to do that in a typical glue wrokflow where you first create a cart and than add an item … non of these endpoints let me set an address Currently the item taxrate always falls back to the default one which is 19% which is wrong in every case. Best
    i
    l
    • 3
    • 9
  • f

    fast-gpu-10437

    08/26/2020, 9:59 AM
    We have some trouble with the stores setup in our environment. The setup is quite equal to the b2b Demo Shop: 2 stores sharing one database (like DE and AT in the demo shop), a third store with a separate Database (like US in the demo shop). One main difference is, that the locales differ between the 2 stores using the first DB and the third store using the second DB: Store 1: • DB 1 • Locale: de_DE Store 2: • DB 1 • Locale: de_DE Store 3: • DB 2 • Locales: de_CH, fr_CH, it_CH We stumbled upon the following problems: Stores in Zed-Backend: During setup (docker sdk), all 3 stores from
    stores.php
    are written in both DBs into
    spy_store
    . Therefore, in Zed-Backend for Store 1/Store 2 I can also assign e.g. products to Store 3 and vice versa. This is highly miss leading, as Store 3 has no connection the DB used by Store 1/Store 2 Missing locales during P&S: When publishing ProductAbstract, errors occur in
    \Spryker\Zed\ProductPageSearch\Business\Publisher\ProductAbstractPagePublisher::hydrateProductAbstractLocalizedEntitiesWithProductCategories
    because
    $productAbstractLocalizedEntities
    is empty.
    $productAbstractLocalizedEntities
    is build in
    \Spryker\Zed\ProductPageSearch\Business\Publisher\ProductAbstractPagePublisher::findProductAbstractLocalizedEntities
    , where all stores (from stores.php) are iterated and entities matching the iterated store's locales are searched. As the locales between Store 1/Store 2 and Store 3 are different, no products with locale de_DE are present in the DB of Store 3 and no products with locale de_CH, fr_CH or it_CH are present in the DB of Store 1/Store 2. As all three stores share the same codebase (and therefore the
    stores.php
    ), is there a possibility to fix/work around the depicted problems? Many thanks for your help.
    l
    h
    • 3
    • 6
  • w

    worried-chef-16639

    08/27/2020, 9:46 AM
    Hello, maybe there is a chance anybody had performance problems updating spy_touch table? PostgeSQL version: 9.6.19
    spy_touch
    number or records: 3,846,538 Import process hangs on
    UPDATE "spy_touch" SET "touched"=$1 WHERE "spy_touch"."id_touch"=$2
    . Sometimes this query takes 10+ minutes to execute.
    q
    f
    p
    • 4
    • 14
  • f

    famous-photographer-66091

    08/27/2020, 10:36 AM
    Hi! We updated to the lates spryker/category module inlcuding its dependencies and following the update process our tests are now broken. The tester->getLocator->getFacade() or tester->getLocator()->bloomreachSearch()->facade() method is not working anymore. Error:
    Can not resolve BloomreachSearchBusinessFactory in Business layer for your module "BloomreachSearch"
    You can fix this by adding the missing Factory to your module.
    E.g. Pyz\Zed\BloomreachSearch\Business\BloomreachSearchBusinessFactory
    1. The factory exisits 2. the namespace is correct 3. the module is working It just seems that the locator is having problems finding the class after the update. Any ideas?
    q
    i
    • 3
    • 6
  • m

    mysterious-diamond-73348

    08/27/2020, 5:02 PM
    Hello! I'm having trouble working through the Bootcamp and am hoping someone can help me. I'm trying to complete the HelloSpryker lesson. I have written all the PHP and twig files per the instructions. When I browse to "http://www.de.b2b-demo-shop.local/en/hello-spryker" I get the error: Twig\Error\LoaderError - Template "@HelloSpryker/index/index.twig" is not defined (Spryker\Shared\Twig\TwigFilesystemLoader: Unable to find template "index/index.twig" (looked into: /data/shop/development/current/src/Pyz/Yves/HelloSpryker/Theme/default).). The index.twig file exists in "/data/shop/development/current/src/Pyz/Yves/HelloSpryker/Theme/default/views/index" but from the error message it looks like Spryker is looking for "index/index.twig" instead of "views/index/index.twig". Does anyone have any ideas on how to fix this or what I might be doing wrong? I'm using Vagrant on macOS per the instructions here: https://documentation.spryker.com/v4/docs/installation-guide-b2b Thanks in advance!
    m
    f
    +2
    • 5
    • 7
  • l

    little-secretary-81579

    08/28/2020, 1:03 PM
    Hi all, I have a question regarding glossary client, of which there a two in the system: Assuming de_DE as current locale, DE as current store. GlossaryStorageClient::translate will generate a storage key for glossary key ‘foobar’ as kvtranslationde_de:foobar. This is correct and a translation is being found. GlossaryClient::translate will generate a storage key for glossary key ‘foobar’ as de.de_de.glossary.translation.foobar which finds no translation. Apparently I did not get how and in which cases use which client. Can you advise?
  • a

    adamant-oil-10501

    08/28/2020, 2:01 PM
    Hello ..Iam going thru the bootcamp training and having some trouble installing spryker locally .iam using windows 10 professional OS. when i run the command ".
    Copy code
    vendor/bin/install
    Any help is greatly appreciated.
    a
    • 2
    • 11
  • f

    full-rocket-52349

    08/31/2020, 8:15 AM
    Hello, I just have one small question. How can I delete a customer's address in Zed? Can I not find the button or is there really no possibility to do so? The customer himself has this possibility in his customer account. Thanks
    a
    d
    • 3
    • 2
  • d

    damp-tailor-13900

    08/31/2020, 12:41 PM
    Hello, is there a "default" way of connecting spryker to a microservice which holds product data?
    a
    a
    • 3
    • 4
  • p

    powerful-wolf-20961

    08/31/2020, 2:15 PM
    Hi! I followed the Sliex Replacement tutorial and now my local is redirected from http to https, do you have any idea how I can solve it?
    m
    h
    • 3
    • 17
  • m

    mysterious-diamond-73348

    08/31/2020, 3:55 PM
    Hello again. I'm still having trouble in the Bootcamp that I'm hoping someone can help with. When I complete all the coding and navigate to /hello-spryker I get the error: Twig\Error\RuntimeError - Variable "_view" does not exist in "@HelloSpryker/index/index.twig" at line 5. Here is my index.twig file:
    Copy code
    {% extends template('page-layout-main') %}
    
    {% define data = {
    	helloSpryker: _view.helloSpryker
    } %}
    
    {% block content %}
    	<div>
    		<h2>{{ data.helloSpryker }}</h2>
    	</div>
    {% endblock %}
    m
    • 2
    • 3
  • n

    numerous-continent-72597

    09/01/2020, 7:02 AM
    Hi there, is it possible to add additional "attributes" to an order via the Glue /checkout call?
    a
    i
    • 3
    • 3
  • e

    early-sundown-61488

    09/01/2020, 7:48 AM
    Hello guys, what is the current status of the Zed API https://documentation.spryker.com/v1/docs/en/zed-api#. Is the API still in beta?
    w
    a
    • 3
    • 2
  • r

    rough-scientist-68683

    09/01/2020, 9:58 AM
    Hello everyone, I'm currently working on products that are sold by the meter, so called yard ware. I'm wondering if spryker provides a module that can help with this. Do you know of anything like this? The use case is: Buy 2 times 1m of a product. If we add those products to the cart we need the possibility to change the measurement, e.g. from 1m to 0.9m.
    a
    • 2
    • 2
  • p

    powerful-wolf-20961

    09/01/2020, 12:08 PM
    Hi, can anyone help me fix this error?
  • m

    mammoth-vegetable-1248

    09/01/2020, 12:36 PM
    Hello everyone, Has anyone of you already faced the problem of category disappearing on frontend side but should not? Sometimes, from some reason, after update of category (assign/deassign product, change name of category, …) results with category disappearing. Touch it again on any way, next sync, and everything is okay.
    ➖ 1
  • a

    acceptable-actor-70435

    09/03/2020, 10:43 AM
    Hello Guys, maybe this is a stupid question but on Spryker is there any posibility to define in jobs.php a parameterized job that can be triggered manually when needed?
    m
    m
    • 3
    • 7
  • c

    chilly-rainbow-75540

    09/03/2020, 11:18 AM
    Hi all! Anyone knows how to change order of facets coming from ElasticSearch in Catalog page? I need to set some of them in particular order
    m
    • 2
    • 11
  • d

    dazzling-yacht-89663

    09/03/2020, 12:45 PM
    Hi Guys, I am trying to add a new Ressource for the Zed api but it seems like the route is not correctly resolved. When I access /api/rest/my-ressource it tries to access the myRessourceAction of the RestController instead of the index action. What am I missing?
    a
    l
    • 3
    • 8
  • f

    full-motorcycle-97796

    09/04/2020, 12:09 PM
    Hi guys, the symfony web profiler bundle from version 4.4.11 does not work in the current suite. The reason for this is the following line: https://github.com/symfony/web-profiler-bundle/compare/v4.4.10...v4.4.11#diff-77fe531b58ebebb9b089a09099112ab7R425
    a
    m
    s
    • 4
    • 10
  • m

    mysterious-diamond-73348

    09/04/2020, 8:14 PM
    Hello. I'm still working through the Bootcamp and am having another issue with creating a CMS page. I've defined the my-offers.twig file and created the CMS page in backend but whenever I try and browse to /de/my-offers or /en/my-offers I get a 404 page. Here is my twig file (/data/shop/development/current/src/Pyz/Shared/Cms/Theme/default/templates/my-offers/my-offers.twig):
    {% *extends* template('page-layout-main')
    %}
    {% *define* data
    =
    {
      
    title: _view.pageTitle
    | default('global.spryker.shop'
    | trans),
      
    metaTitle: _view.pageTitle
    | default('global.spryker.shop'
    | trans),
      
    metaDescription: _view.pageDescription
    | default(''),
      
    metaKeywords: _view.pageKeywords
    | default('')
    }
    %}
    {% *block* title
    %}
    <!-- CMS_PLACEHOLDER : "title" -->
    <*h3*>{{ spyCms('title')
    | raw
    }}</*h3*>
    {% *endblock* %}
    {% *block* content
    %}
      
    <!-- CMS_PLACEHOLDER : "content" -->
    <*div* class=_"box"_>
    {{ spyCms('content')
    | raw
    }}
    </*div*>
    {% *endblock* %}
    Attached is a screenshot of my backend CMS page and the 404 page. Any help would be much appreciated.
    h
    m
    +2
    • 5
    • 9
  • m

    melodic-machine-2956

    09/07/2020, 5:34 AM
    Dear Spryker Team, how can I setup different tax rates per store in a multistore environment? Given I have 3 stores (DE 19%, CH 20%, AT 20%) in the same databases, configured by stores.php. How can I connect a taxrate in zed to a specific store? I want the same product to be charged with 19% when accessing it in DE store, and with 20% when accessing it in AT or CH store.
    f
    • 2
    • 4
  • c

    calm-lamp-45600

    09/07/2020, 9:12 AM
    hello together, Spryker b2c 202001.0 frontend via glue on checkout process should assigned 2 shippingmethods, a fix fee that is not choosable and always assigend and a method like pickup or ups with several costs. Where could i expand expense stack that i can use configured shippingmethods from backoffice (zed). currently i can only add one shippingmethod via glue. i checked ShipmentExpenseExpanderPlugin but this is not the right way
    i
    • 2
    • 5
  • a

    acoustic-businessperson-27970

    09/07/2020, 9:32 AM
    Hi when I try to run
    vendor/bin/console setup:init-db
    I get this error
    PhpAmqpLib\Exception\AMQPProtocolConnectionException - Exception: NOT_ALLOWED - access to vhost '/AT_dev_zed' refused for user 'admin'
    Even though the VHost is created and the permissions are granted beforehand. Any ideas? Thanks
    s
    i
    • 3
    • 5
  • e

    early-policeman-81538

    09/07/2020, 12:28 PM
    Hi guys! I have been debugging a problem with the Checkout Address form for a while which led me to a change you've made in the customer page module. It seems to be the root of our issue so I would really appreciate some help trying to understand it 🙂 Here are the details: The issue I have been working on is that the checkout address form validation errors are not shown to the user. An extensive debugging session showed, that validation groups are set to false for the form in CheckoutAddressCollectionForm.php, hence no validation takes place:
    Copy code
    'validation_groups' => function (FormInterface $form) {
        if (
            $this->isIdCustomerAddressFieldNotEmpty($form)
            || $this->isIdCompanyUnitAddressFieldNotEmpty($form)
        ) {
            return false;
        }
    
        return [static::GROUP_SHIPPING_ADDRESS];
    },
    The function above resolves to false, because isIdCustomerAddressFieldNotEmpty($form) returns true, although our id_customer_address field is empty. And I get why, after a look inside the method:
    Copy code
    protected function isIdCustomerAddressFieldNotEmpty(FormInterface $form): bool
    {
        return !$form->has(CheckoutAddressForm::FIELD_ID_CUSTOMER_ADDRESS)
            || $form->get(CheckoutAddressForm::FIELD_ID_CUSTOMER_ADDRESS)->getData() !== CheckoutAddressForm::VALUE_ADD_NEW_ADDRESS;
    }
    This method has been altered here. The current version above compares id_customer_address field with VALUE_ADD_NEW_ADDRESS (0). The version before compared it with VALUE_NEW_ADDRESS_IS_EMPTY (null). The problem I see here is that getData() method returns model data, which always resolves to null if it gets VALUE_ADD_NEW_ADDRESS as a value (thanks to the AddressSelectTransformer.php):
    Copy code
    public function reverseTransform($value): ?int
    {
        return $value === CheckoutAddressForm::VALUE_ADD_NEW_ADDRESS ? CheckoutAddressForm::VALUE_NEW_ADDRESS_IS_EMPTY : (int)$value;
    }
    So I guess my question is if I am missing something or if the commit i linked above has introduced an error 🤔
  • c

    careful-country-34175

    09/07/2020, 1:46 PM
    Hello together, is it possible to set a HTTP response header in a Yves controller and also return a
    View
    ? In Symfony I would create a response object and set the header there, but in Spryker this is not possible with the view object as far as I can see. How does this work in Spryker?
  • g

    gentle-vegetable-74963

    09/07/2020, 2:20 PM
    Hi all, has anyone ever had problems with the
    spy_oms_transition_log
    filling up? We have millions of rows in this table 😮 We have a state that waits for status from an ERP, and this ends up polling the same state every minute until there is a change and we move to the next state.
    • 1
    • 1
  • g

    gentle-vegetable-74963

    09/07/2020, 2:22 PM
    I can see how it might be helpful to log an event that does not trigger a transition for debugging, but we need to reduce this table.
  • g

    gentle-vegetable-74963

    09/07/2020, 2:23 PM
    So quick question - is this table just for debugging? eg can we truncate it while we work on a long term solution to avoid it growing so big?
  • a

    adamant-oil-10501

    09/08/2020, 1:17 PM
    hi...iam working on the bootcamp and get this error . Any ideas.?
    h
    • 2
    • 3
1...242526...102Latest