• Resolved Leo.Lin

    (@bi1012037)



    I’ve been using shortcodes to generate the shopping cart page all along. Recently, I reinstalled WooCommerce and noticed that the default shopping cart page is different from the one generated by the shortcode. However, the new shopping cart pages cannot read the .mo translation files. Currently, both old and new versions are running concurrently.

    Question: The new version of the shopping cart page cannot load translations. I have tried disabling other plugins for testing purposes and also reinstalled WooCommerce, but the issue persists. Do I need to rebuild or add new code to Functions.php to resolve this translation problem?

    Old Version(Short Code)

    [woocommerce_cart]

    New version

    <!-- wp:woocommerce/cart -->
    <div class="wp-block-woocommerce-cart alignwide is-loading"><!-- wp:woocommerce/filled-cart-block -->
    <div class="wp-block-woocommerce-filled-cart-block"><!-- wp:woocommerce/cart-items-block -->
    <div class="wp-block-woocommerce-cart-items-block"><!-- wp:woocommerce/cart-line-items-block -->
    <div class="wp-block-woocommerce-cart-line-items-block"></div>
    <!-- /wp:woocommerce/cart-line-items-block -->
    
    <!-- wp:woocommerce/cart-cross-sells-block -->
    <div class="wp-block-woocommerce-cart-cross-sells-block"><!-- wp:heading {"fontSize":"large"} -->
    <h2 class="wp-block-heading has-large-font-size">你可能對這些產品感興趣:</h2>
    <!-- /wp:heading -->
    
    <!-- wp:woocommerce/cart-cross-sells-products-block -->
    <div class="wp-block-woocommerce-cart-cross-sells-products-block"></div>
    <!-- /wp:woocommerce/cart-cross-sells-products-block --></div>
    <!-- /wp:woocommerce/cart-cross-sells-block --></div>
    <!-- /wp:woocommerce/cart-items-block -->
    
    <!-- wp:woocommerce/cart-totals-block -->
    <div class="wp-block-woocommerce-cart-totals-block"><!-- wp:woocommerce/cart-order-summary-block -->
    <div class="wp-block-woocommerce-cart-order-summary-block"><!-- wp:woocommerce/cart-order-summary-heading-block -->
    <div class="wp-block-woocommerce-cart-order-summary-heading-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-heading-block -->
    
    <!-- wp:woocommerce/cart-order-summary-coupon-form-block -->
    <div class="wp-block-woocommerce-cart-order-summary-coupon-form-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-coupon-form-block -->
    
    <!-- wp:woocommerce/cart-order-summary-subtotal-block -->
    <div class="wp-block-woocommerce-cart-order-summary-subtotal-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-subtotal-block -->
    
    <!-- wp:woocommerce/cart-order-summary-fee-block -->
    <div class="wp-block-woocommerce-cart-order-summary-fee-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-fee-block -->
    
    <!-- wp:woocommerce/cart-order-summary-discount-block -->
    <div class="wp-block-woocommerce-cart-order-summary-discount-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-discount-block -->
    
    <!-- wp:woocommerce/cart-order-summary-shipping-block -->
    <div class="wp-block-woocommerce-cart-order-summary-shipping-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-shipping-block -->
    
    <!-- wp:woocommerce/cart-order-summary-taxes-block -->
    <div class="wp-block-woocommerce-cart-order-summary-taxes-block"></div>
    <!-- /wp:woocommerce/cart-order-summary-taxes-block --></div>
    <!-- /wp:woocommerce/cart-order-summary-block -->
    
    <!-- wp:woocommerce/cart-express-payment-block -->
    <div class="wp-block-woocommerce-cart-express-payment-block"></div>
    <!-- /wp:woocommerce/cart-express-payment-block -->
    
    <!-- wp:woocommerce/proceed-to-checkout-block -->
    <div class="wp-block-woocommerce-proceed-to-checkout-block"></div>
    <!-- /wp:woocommerce/proceed-to-checkout-block -->
    
    <!-- wp:woocommerce/cart-accepted-payment-methods-block -->
    <div class="wp-block-woocommerce-cart-accepted-payment-methods-block"></div>
    <!-- /wp:woocommerce/cart-accepted-payment-methods-block --></div>
    <!-- /wp:woocommerce/cart-totals-block --></div>
    <!-- /wp:woocommerce/filled-cart-block -->
    
    <!-- wp:woocommerce/empty-cart-block -->
    <div class="wp-block-woocommerce-empty-cart-block"><!-- wp:heading {"textAlign":"center","className":"with-empty-cart-icon wc-block-cart__empty-cart__title"} -->
    <h2 class="wp-block-heading has-text-align-center with-empty-cart-icon wc-block-cart__empty-cart__title">你的購物車目前是空的!</h2>
    <!-- /wp:heading -->
    
    <!-- wp:separator {"className":"is-style-dots"} -->
    <hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>
    <!-- /wp:separator -->
    
    <!-- wp:heading {"textAlign":"center"} -->
    <h2 class="wp-block-heading has-text-align-center">新品到貨</h2>
    <!-- /wp:heading -->
    
    <!-- wp:woocommerce/product-new {"columns":4,"rows":1} /--></div>
    <!-- /wp:woocommerce/empty-cart-block --></div>
    <!-- /wp:woocommerce/cart -->
    • This topic was modified 2 months ago by Leo.Lin.
Viewing 4 replies - 1 through 4 (of 4 total)
  • malchickay

    (@malchickay)

    The same problem with the shopping cart

    Thread Starter Leo.Lin

    (@bi1012037)

    Upgraded to 8.9.0 today, and the issue has been resolved.

    malchickay

    (@malchickay)

    unfortunately, the problem was not resolved after the update

    Thread Starter Leo.Lin

    (@bi1012037)

    @malchickay
    After this update, I cleared the cache in two places.
    First:Server.(Apache or Nginx…)
    Second:Domain provider.
    If you have a testing site, you can install the “Loco Translate” plugin to check if your language path is correct or up to date. If it’s outdated, you should synchronize it immediately.
    My Language path: languages/plugins/woocommerce-zh_TW.po

    Final note: Although the new version of my shopping cart interface has successfully reverted to fetching local language, I still prefer the shortcodes generated by the old version. If you encounter any other language conversion issues, please provide more detailed server status to the plugin developers so they can assist you in troubleshooting the problem.

    [woocommerce_cart] Very good!!!
    URL:https://test3.lugeshop.com/購物車/

    New version: Normal operation has been restored. However, editing pages with the Elementor editor will cause the entire page to break. In the production environment, I will still provide members with the old version of the shopping cart page.
    URL:https://test3.lugeshop.com/cart/



    The new shopping cart page breaks immediately after saving with Elementor. Remember to back up before using Elementor to edit.
    URL:https://test3.lugeshop.com/test/

    The code after saving with Elementor’s editor will automatically be converted to the following code.

    <!-- wp:woocommerce/cart -->
    <div class="wp-block-woocommerce-cart alignwide is-loading"><!-- wp:woocommerce/filled-cart-block -->
    <div class="wp-block-woocommerce-filled-cart-block"><!-- wp:woocommerce/cart-items-block -->
    <div class="wp-block-woocommerce-cart-items-block"><!-- wp:woocommerce/cart-line-items-block -->
    <div class="wp-block-woocommerce-cart-line-items-block"> </div>
    <!-- /wp:woocommerce/cart-line-items-block -->
    
    <!-- wp:woocommerce/cart-cross-sells-block -->
    <div class="wp-block-woocommerce-cart-cross-sells-block"><!-- wp:heading {"fontSize":"large"} -->
    <h2 class="wp-block-heading has-large-font-size">你可能對這些產品感興趣:</h2>
    <!-- /wp:heading -->
    
    <!-- wp:woocommerce/cart-cross-sells-products-block -->
    <div class="wp-block-woocommerce-cart-cross-sells-products-block"> </div>
    <!-- /wp:woocommerce/cart-cross-sells-products-block --></div>
    <!-- /wp:woocommerce/cart-cross-sells-block --></div>
    <!-- /wp:woocommerce/cart-items-block -->
    
    <!-- wp:woocommerce/cart-totals-block -->
    <div class="wp-block-woocommerce-cart-totals-block"><!-- wp:woocommerce/cart-order-summary-block -->
    <div class="wp-block-woocommerce-cart-order-summary-block"><!-- wp:woocommerce/cart-order-summary-heading-block -->
    <div class="wp-block-woocommerce-cart-order-summary-heading-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-heading-block -->
    
    <!-- wp:woocommerce/cart-order-summary-coupon-form-block -->
    <div class="wp-block-woocommerce-cart-order-summary-coupon-form-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-coupon-form-block -->
    
    <!-- wp:woocommerce/cart-order-summary-subtotal-block -->
    <div class="wp-block-woocommerce-cart-order-summary-subtotal-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-subtotal-block -->
    
    <!-- wp:woocommerce/cart-order-summary-fee-block -->
    <div class="wp-block-woocommerce-cart-order-summary-fee-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-fee-block -->
    
    <!-- wp:woocommerce/cart-order-summary-discount-block -->
    <div class="wp-block-woocommerce-cart-order-summary-discount-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-discount-block -->
    
    <!-- wp:woocommerce/cart-order-summary-shipping-block -->
    <div class="wp-block-woocommerce-cart-order-summary-shipping-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-shipping-block -->
    
    <!-- wp:woocommerce/cart-order-summary-taxes-block -->
    <div class="wp-block-woocommerce-cart-order-summary-taxes-block"> </div>
    <!-- /wp:woocommerce/cart-order-summary-taxes-block --></div>
    <!-- /wp:woocommerce/cart-order-summary-block -->
    
    <!-- wp:woocommerce/cart-express-payment-block -->
    <div class="wp-block-woocommerce-cart-express-payment-block"> </div>
    <!-- /wp:woocommerce/cart-express-payment-block -->
    
    <!-- wp:woocommerce/proceed-to-checkout-block -->
    <div class="wp-block-woocommerce-proceed-to-checkout-block"> </div>
    <!-- /wp:woocommerce/proceed-to-checkout-block -->
    
    <!-- wp:woocommerce/cart-accepted-payment-methods-block -->
    <div class="wp-block-woocommerce-cart-accepted-payment-methods-block"> </div>
    <!-- /wp:woocommerce/cart-accepted-payment-methods-block --></div>
    <!-- /wp:woocommerce/cart-totals-block --></div>
    <!-- /wp:woocommerce/filled-cart-block -->
    
    <!-- wp:woocommerce/empty-cart-block -->
    <div class="wp-block-woocommerce-empty-cart-block"><!-- wp:heading {"textAlign":"center","className":"with-empty-cart-icon wc-block-cart__empty-cart__title"} -->
    <h2 class="wp-block-heading has-text-align-center with-empty-cart-icon wc-block-cart__empty-cart__title">你的購物車目前是空的!</h2>
    <!-- /wp:heading -->
    
    <!-- wp:separator {"className":"is-style-dots"} --><hr class="wp-block-separator has-alpha-channel-opacity is-style-dots" /><!-- /wp:separator -->
    
    <!-- wp:heading {"textAlign":"center"} -->
    <h2 class="wp-block-heading has-text-align-center">新品到貨</h2>
    <!-- /wp:heading -->
    
    <!-- wp:woocommerce/product-new {"columns":4,"rows":1} /--></div>
    <!-- /wp:woocommerce/empty-cart-block --></div>
    <!-- /wp:woocommerce/cart -->
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.