• Hi there!

    I’m having some trouble with the cart-empty.php template and notices. I’m modifying the default theme that comes with woocommerce plugin.

    Everything that goes inside cart-empty.php is returned inside <div class=”woocommerce”></div>

    Everything except what is returned by wc_print_notices(); function. What ever I do, the notice will appear outside <div class=”woocommerce”></div> in it’s own div.

    Any ideas on how to correctly do this?

    This is my cart-empty.php code:

    
    <?php
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    
    wc_print_notices();
    
    ?>
    
    <p class="cart-empty">
    	<?php _e( 'Your cart is currently empty.', 'woocommerce' ) ?>
    </p>
    
    <?php do_action( 'woocommerce_cart_is_empty' ); ?>
    
    <?php if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
    	<p class="return-to-shop">
    		<a class="button wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
    			<?php _e( 'Return To Shop', 'woocommerce' ) ?>
    		</a>
    	</p>
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter r1se

    (@r1se)

    
    ### WordPress Environment ###
    
    Home URL: https://caramba.cl
    Site URL: https://caramba.cl
    WC Version: 2.6.8
    Log Directory Writable: ?
    WP Version: 4.6.1
    WP Multisite: –
    WP Memory Limit: 64 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: es_ES
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: ? 5.4.45 - Recomendamos como mínimo la versión PHP 5.6. Ver: Cómo actualizar tu versión de PHP
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.38.0
    OpenSSL/1.0.1e
    
    SUHOSIN Installed: ?
    MySQL Version: ? 5.5.52 - Recomendamos como versión mínima de MySQL la 5.6. Ver: Requisitos de WordPress
    Max Upload Size: 2 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Publicación remota: ?
    Obtención remota: ?
    
    ### Database ###
    
    WC Database Version: 2.6.8
    : 
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    
    ### Active Plugins (16) ###
    
    Advanced Custom Fields PRO: por Elliot Condon – 5.4.8
    BackupBuddy: por iThemes – 6.5.0.16
    Beautiful taxonomy filter: por Jonathan de Jong – 2.1.0
    Comunas de Chile para WooCommerce: por Anyda SRL  – 0.1
    WooCommerce WebpayPlus WS Chile: por Cristian Tala Sánchez – 3.5.4-WS-DEVEL
    Custom Post Type UI: por WebDevStudios – 1.4.3
    Regenerate Thumbnails: por Alex Mills (Viper007Bond) – 2.2.6
    Orden en Taxonomías y Categorías: por Nsp-Code – 1.4.8
    WooCommerce User Role Minimums: por Stephen Sherrard – 1.6.0.1
    WooCommerce Product CSV Import Suite: por Automattic – 1.10.12
    WooCommerce Table Rate Shipping: por Automattic – 3.0.2
    WooCommerce Wholesale Prices Premium: por Rymera Web Co – 1.12.1
    WooCommerce Wholesale Prices: por Rymera Web Co – 1.2.8
    WooCommerce: por WooThemes – 2.6.8
    WooCommerce Helper: por WooCommerce – 1.7.2
    Yoast SEO: por Equipo Yoast – 3.9
    
    ### Settings ###
    
    Force SSL: –
    Currency: CLP ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    
    ### API ###
    
    API Enabled: ?
    
    ### WC Pages ###
    
    Base de la tienda: #4 - /tienda/
    Carrito: #5 - /carro/
    Finalizar compra: #6 - /finalizar-comprar/
    Mi cuenta: #7 - /mi-cuenta/
    
    ### Taxonomies ###
    
    Product Types: simple (simple)
    grouped (grouped)
    variable (variable)
    external (external)
    
    ### Theme ###
    
    Name: Caramba
    Version: 1.0
    Author URL: https://www.faunadiseno.com
    Child Theme: ? – Si estás modificando WooCommerce en un tema padre que no has creado personalmente
    te recomendamos utilizar un tema hijo. Ver: : Cómo crear un tema hijo
    
    WooCommerce Support: ? No declarada
    
    ### Templates ###
    
    Overrides: caramba/woocommerce/archive-product.php
    caramba/woocommerce/auth/footer.php
    caramba/woocommerce/auth/form-grant-access.php
    caramba/woocommerce/auth/form-login.php
    caramba/woocommerce/auth/header.php
    caramba/woocommerce/cart/cart-empty.php
    caramba/woocommerce/cart/cart-item-data.php
    caramba/woocommerce/cart/cart-shipping.php
    caramba/woocommerce/cart/cart-totals.php
    caramba/woocommerce/cart/cart.php
    caramba/woocommerce/cart/cross-sells.php
    caramba/woocommerce/cart/mini-cart.php
    caramba/woocommerce/cart/proceed-to-checkout-button.php
    caramba/woocommerce/cart/shipping-calculator.php
    caramba/woocommerce/checkout/cart-errors.php
    caramba/woocommerce/checkout/form-billing.php
    caramba/woocommerce/checkout/form-checkout.php
    caramba/woocommerce/checkout/form-coupon.php
    caramba/woocommerce/checkout/form-login.php
    caramba/woocommerce/checkout/form-pay.php
    caramba/woocommerce/checkout/form-shipping.php
    caramba/woocommerce/checkout/payment-method.php
    caramba/woocommerce/checkout/payment.php
    caramba/woocommerce/checkout/review-order.php
    caramba/woocommerce/checkout/terms.php
    caramba/woocommerce/checkout/thankyou.php
    caramba/woocommerce/content-product.php
    caramba/woocommerce/content-product_cat.php
    caramba/woocommerce/content-single-product.php
    caramba/woocommerce/content-widget-product.php
    caramba/woocommerce/emails/admin-cancelled-order.php
    caramba/woocommerce/emails/admin-failed-order.php
    caramba/woocommerce/emails/admin-new-order.php
    caramba/woocommerce/emails/customer-completed-order.php
    caramba/woocommerce/emails/customer-invoice.php
    caramba/woocommerce/emails/customer-new-account.php
    caramba/woocommerce/emails/customer-note.php
    caramba/woocommerce/emails/customer-on-hold-order.php
    caramba/woocommerce/emails/customer-processing-order.php
    caramba/woocommerce/emails/customer-refunded-order.php
    caramba/woocommerce/emails/customer-reset-password.php
    caramba/woocommerce/emails/email-addresses.php
    caramba/woocommerce/emails/email-customer-details.php
    caramba/woocommerce/emails/email-footer.php
    caramba/woocommerce/emails/email-header.php
    caramba/woocommerce/emails/email-order-details.php
    caramba/woocommerce/emails/email-order-items.php
    caramba/woocommerce/emails/email-styles.php
    caramba/woocommerce/emails/plain/admin-cancelled-order.php
    caramba/woocommerce/emails/plain/admin-failed-order.php
    caramba/woocommerce/emails/plain/admin-new-order.php
    caramba/woocommerce/emails/plain/customer-completed-order.php
    caramba/woocommerce/emails/plain/customer-invoice.php
    caramba/woocommerce/emails/plain/customer-new-account.php
    caramba/woocommerce/emails/plain/customer-note.php
    caramba/woocommerce/emails/plain/customer-on-hold-order.php
    caramba/woocommerce/emails/plain/customer-processing-order.php
    caramba/woocommerce/emails/plain/customer-refunded-order.php
    caramba/woocommerce/emails/plain/customer-reset-password.php
    caramba/woocommerce/emails/plain/email-addresses.php
    caramba/woocommerce/emails/plain/email-customer-details.php
    caramba/woocommerce/emails/plain/email-order-details.php
    caramba/woocommerce/emails/plain/email-order-items.php
    caramba/woocommerce/global/breadcrumb.php
    caramba/woocommerce/global/form-login.php
    caramba/woocommerce/global/quantity-input.php
    caramba/woocommerce/global/sidebar.php
    caramba/woocommerce/global/wrapper-end.php
    caramba/woocommerce/global/wrapper-start.php
    caramba/woocommerce/loop/add-to-cart.php
    caramba/woocommerce/loop/loop-end.php
    caramba/woocommerce/loop/loop-start.php
    caramba/woocommerce/loop/no-products-found.php
    caramba/woocommerce/loop/orderby.php
    caramba/woocommerce/loop/pagination.php
    caramba/woocommerce/loop/price.php
    caramba/woocommerce/loop/rating.php
    caramba/woocommerce/loop/result-count.php
    caramba/woocommerce/loop/sale-flash.php
    caramba/woocommerce/myaccount/dashboard.php
    caramba/woocommerce/myaccount/downloads.php
    caramba/woocommerce/myaccount/form-add-payment-method.php
    caramba/woocommerce/myaccount/form-edit-account.php
    caramba/woocommerce/myaccount/form-edit-address.php
    caramba/woocommerce/myaccount/form-login.php
    caramba/woocommerce/myaccount/form-lost-password.php
    caramba/woocommerce/myaccount/form-reset-password.php
    caramba/woocommerce/myaccount/lost-password-confirmation.php
    caramba/woocommerce/myaccount/my-account.php
    caramba/woocommerce/myaccount/my-address.php
    caramba/woocommerce/myaccount/my-downloads.php
    caramba/woocommerce/myaccount/my-orders.php
    caramba/woocommerce/myaccount/navigation.php
    caramba/woocommerce/myaccount/orders.php
    caramba/woocommerce/myaccount/payment-methods.php
    caramba/woocommerce/myaccount/view-order.php
    caramba/woocommerce/notices/error.php
    caramba/woocommerce/notices/notice.php
    caramba/woocommerce/notices/success.php
    caramba/woocommerce/order/form-tracking.php
    caramba/woocommerce/order/order-again.php
    caramba/woocommerce/order/order-details-customer.php
    caramba/woocommerce/order/order-details-item.php
    caramba/woocommerce/order/order-details.php
    caramba/woocommerce/order/tracking.php
    caramba/woocommerce/product-searchform.php
    caramba/woocommerce/single-product/add-to-cart/external.php
    caramba/woocommerce/single-product/add-to-cart/grouped.php
    caramba/woocommerce/single-product/add-to-cart/simple.php
    caramba/woocommerce/single-product/add-to-cart/variable.php
    caramba/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
    caramba/woocommerce/single-product/add-to-cart/variation.php
    caramba/woocommerce/single-product/meta.php
    caramba/woocommerce/single-product/price.php
    caramba/woocommerce/single-product/product-attributes.php
    caramba/woocommerce/single-product/product-image.php
    caramba/woocommerce/single-product/product-thumbnails.php
    caramba/woocommerce/single-product/rating.php
    caramba/woocommerce/single-product/related.php
    caramba/woocommerce/single-product/review-meta.php
    caramba/woocommerce/single-product/review-rating.php
    caramba/woocommerce/single-product/review.php
    caramba/woocommerce/single-product/sale-flash.php
    caramba/woocommerce/single-product/share.php
    caramba/woocommerce/single-product/short-description.php
    caramba/woocommerce/single-product/tabs/additional-information.php
    caramba/woocommerce/single-product/tabs/description.php
    caramba/woocommerce/single-product/tabs/tabs.php
    caramba/woocommerce/single-product/title.php
    caramba/woocommerce/single-product/up-sells.php
    caramba/woocommerce/single-product-reviews.php
    caramba/woocommerce/single-product.php
    caramba/woocommerce/taxonomy-product_cat.php
    caramba/woocommerce/taxonomy-product_tag.php
    
    

    url?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘cart-empty.php notice location’ is closed to new replies.