magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Removing "Estimate shipping costs and tax" from cart removes cart totals #19347

Open VincentMarmiesse opened 5 years ago

VincentMarmiesse commented 5 years ago

Hello,

Cart totals disappear because of some errors when I remove the shipping estimation block.

Preconditions (*)

  1. Magento 2.2.6
  2. PHP 7.1.23

Steps to reproduce (*)

  1. In your theme or in a custom module, create a layout file checkout_cart_index.xml
  2. Remove the checkout.cart.shipping by using
    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.shipping" remove="true" />
    </body>
    </page>

Expected result (*)

  1. Estimate shipping costs and tax block is removed from shopping cart.

Actual result (*)

  1. Estimate shipping costs and tax block is removed but totals are not displayed
  2. Chrome console is throwing the following errors:

Error

magento-engcom-team commented 5 years ago

Hi @VincentMarmiesse. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.

@VincentMarmiesse do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

VincentMarmiesse commented 5 years ago

I can't reproduce on one of your vanilla instance because I need to edit the code, but I did on my local environment.

VincentMarmiesse commented 5 years ago

FYI, the totals block needs the following lines in Checkout/view/frontend/templates/cart/shipping.phtml to work:

<script>
    window.checkoutConfig = <?= /* @escapeNotVerified */ $block->getSerializedCheckoutConfig() ?>;
    window.customerData = window.checkoutConfig.customerData;
    window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
    require([
        'mage/url',
        'Magento_Ui/js/block-loader'
    ], function(url, blockLoader) {
        blockLoader("<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>");
        return url.setBaseUrl('<?= /* @escapeNotVerified */ $block->getBaseUrl() ?>');
    })
</script>
magento-engcom-team commented 5 years ago

Hi @tiagosampaio. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

magento-engcom-team commented 5 years ago

@tiagosampaio Thank you for verifying the issue.

Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:

Once all required information is added, please add label "Issue: Confirmed" again. Thanks!

magento-engcom-team commented 5 years ago

@tiagosampaio Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-96619, MAGETWO-96620 were created

sumeetmobiwebtech commented 5 years ago

How to solve this ? i am also getting this error.

tiagosampaio commented 5 years ago

@sumeetmobiwebtech the PR to solve this issue is #19393.

sumeetmobiwebtech commented 5 years ago

@tiagosampaio would you please help me how to solve this issue step by step ?

19393 because here i am not able to understand

tiagosampaio commented 5 years ago

@sumeetmobiwebtech take a look on the changed files:

https://github.com/magento/magento2/pull/19393/files

m2-assistant[bot] commented 5 years ago

Hi @RostislavS. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


Vikaashkarthick-K commented 1 year ago

@magento I am working on this

Vikaashkarthick-K commented 1 year ago

Hey @VincentMarmiesse , The PR https://github.com/magento/magento2/pull/19393 seems to fix the issue The issue was reproducible in version 2.4 and the above PR still fixes the issue And @tiagosampaio , your PR fixes the issue why is it Closed if it is the fix?

m2-assistant[bot] commented 3 months ago

Hi @engcom-Delta. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


engcom-Delta commented 3 months ago

Hi @VincentMarmiesse ,

Thanks for your reporting and collaboration. We have verified the issue in latest 2.4-develop instance and it is reproducible.

Hence, Confirming the issue.

Steps to reproduce:-

  1. Access checkout_cart_index from app/design/frontend/Vendor/ThemeDir/Magento_Checkout/layout/checkout_cart_index.xml
  2. Add - image
  3. Save and Re-load shopping cart page. Observe Cart totals disappear when user try removing the shipping estimation block. image

image

Thanks.

github-jira-sync-bot commented 3 months ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 3 months ago

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-779