andreani-publico / magento-2.3

Módulo de integración con Andreani para Magento 2.3
2 stars 11 forks source link

Fixes checkout #12

Open barbazul opened 3 years ago

barbazul commented 3 years ago

Se remueve toda la logica de malabarismos de addresses para pasar los customAttributes de un lado para otro y, en su lugar, se deja el comportamiento nativo de Magento.

Se actualizaron los instaladores para lograr la misma logica que había en el LayoutProcessorPlugin y para garantizar que magento los considere como custom attributes (is_user_defined = 1, system = 0). Es posible que sea necesario un parche de upgrade para los usuarios con el módulo instalado previamente.

Nota para Magento 2.4.1 (y posiblemente, 2.4.2): Existe este issue https://github.com/magento/magento2/issues/31644 por el cual, se concatena el attribute_code y el value en los custom attributes, causando que los campos numericos agregados por Andreani se guarden como 0. Para evitar ese escenario se validó el funcionamiento implementando un parche revirtiendo el commit que se menciona en los comentarios.

niketedm commented 3 years ago

Revisen este PR por favor!!! Hay problemas con atributos que se guardan null en el checkout, todos los atributos de Andreani (piso, altura, dni, obs, celular, etc) se guardan en 0 en el quote de la orden y trae problemas operativos graves porque no se pueden enviar esos pedidos y no tenemos la info del usuario en el address

barbazul commented 3 years ago

Recientemente detectamos que en ausencia del módulo magento/module-customer-custom-attributes (el cual sólo está disponible en Magento Enterprise) los campos agregados por este módulo no se estaban mostrando en los formularios del checkout.

Se incorporaron los fieldsets necesarios para que los mismos se visualicen si se utiliza la extensión experius/module-extracheckoutaddressfields que complementa la ausencia del módulo enterprise.

Es necesario hacer más pruebas sobre Magento community ya que podría haber otros ajustes necesarios.

barbazul commented 3 years ago

En los commits agregados durante Mayo se reimplementó completamente toda la parte del checkout.

Por supuesto, sigue sin funcionar en Magento Enterprise.

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: dataScopePrefix in /var/www/vendor/magento/module-customer-custom-attributes/Block/Checkout/LayoutProcessor.php on line 139

Exception #0 (Exception): Notice: Undefined index: dataScopePrefix in /var/www/vendor/magento/module-customer-custom-attributes/Block/Checkout/LayoutProcessor.php on line 139
<pre>#1 Magento\CustomerCustomAttributes\Block\Checkout\LayoutProcessor->processCustomAttributesForPaymentMethods() called at [vendor/magento/module-customer-custom-attributes/Block/Checkout/LayoutProcessor.php:86]
#2 Magento\CustomerCustomAttributes\Block\Checkout\LayoutProcessor->process() called at [vendor/magento/module-checkout/Block/Onepage.php:81]
#3 Magento\Checkout\Block\Onepage->getJsLayout() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 Magento\Checkout\Block\Onepage\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 Magento\Checkout\Block\Onepage\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Magento\Checkout\Block\Onepage\Interceptor->___callPlugins() called at [generated/code/Magento/Checkout/Block/Onepage/Interceptor.php:23]
#7 Magento\Checkout\Block\Onepage\Interceptor->getJsLayout() called at [vendor/magento/module-checkout/view/frontend/templates/onepage.phtml:23]
#8 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#9 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#10 Magento\Framework\View\Element\Template->fetchView() called at [generated/code/Magento/Checkout/Block/Onepage/Interceptor.php:122]
#11 Magento\Checkout\Block\Onepage\Interceptor->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#12 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#13 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#14 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#15 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Checkout/Block/Onepage/Interceptor.php:329]
#16 Magento\Checkout\Block\Onepage\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#17 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#18 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#19 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#20 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#21 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#22 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#23 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#24 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#25 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#26 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#27 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#28 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#29 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#30 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#31 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#32 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#33 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#34 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#35 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#36 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#37 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#38 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#39 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#40 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#41 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#42 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#43 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#44 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#45 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#46 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#47 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#48 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#49 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#50 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#51 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:963]
#52 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#53 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#54 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#55 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#56 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#57 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#58 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#59 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#60 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#61 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:95]
#62 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#63 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#64 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#65 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
</pre>

Me encuentro ahora trabajando en una versión nueva de este PR sobre lo último commiteado.

Cierro este PR para que quede como un parche aplicable sobre la versión del módulo hasta abril (en serio, tan dificil es agregar un composer.json y tags para indicar versiones del módulo?) y abriré un nuevo PR reimplementando lo que haga falta.