ancient-apartment-59274
08/26/2020, 9:25 AMprotected 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.
Bestfast-gpu-10437
08/26/2020, 9:59 AMstores.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.worried-chef-16639
08/27/2020, 9:46 AMspy_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.famous-photographer-66091
08/27/2020, 10:36 AMCan 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?mysterious-diamond-73348
08/27/2020, 5:02 PMlittle-secretary-81579
08/28/2020, 1:03 PMadamant-oil-10501
08/28/2020, 2:01 PMvendor/bin/install
Any help is greatly appreciated.full-rocket-52349
08/31/2020, 8:15 AMdamp-tailor-13900
08/31/2020, 12:41 PMpowerful-wolf-20961
08/31/2020, 2:15 PMmysterious-diamond-73348
08/31/2020, 3:55 PM{% extends template('page-layout-main') %}
{% define data = {
helloSpryker: _view.helloSpryker
} %}
{% block content %}
<div>
<h2>{{ data.helloSpryker }}</h2>
</div>
{% endblock %}
numerous-continent-72597
09/01/2020, 7:02 AMearly-sundown-61488
09/01/2020, 7:48 AMrough-scientist-68683
09/01/2020, 9:58 AMpowerful-wolf-20961
09/01/2020, 12:08 PMmammoth-vegetable-1248
09/01/2020, 12:36 PMacceptable-actor-70435
09/03/2020, 10:43 AMchilly-rainbow-75540
09/03/2020, 11:18 AMdazzling-yacht-89663
09/03/2020, 12:45 PMfull-motorcycle-97796
09/04/2020, 12:09 PMmysterious-diamond-73348
09/04/2020, 8:14 PM{% *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.melodic-machine-2956
09/07/2020, 5:34 AMcalm-lamp-45600
09/07/2020, 9:12 AMacoustic-businessperson-27970
09/07/2020, 9:32 AMvendor/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?
Thanksearly-policeman-81538
09/07/2020, 12:28 PM'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:
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):
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 🤔careful-country-34175
09/07/2020, 1:46 PMView
?
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?gentle-vegetable-74963
09/07/2020, 2:20 PMspy_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.gentle-vegetable-74963
09/07/2020, 2:22 PMgentle-vegetable-74963
09/07/2020, 2:23 PMadamant-oil-10501
09/08/2020, 1:17 PM