New Landing How can we help? Themeforest Theme Support Neighborhood Mini-cart shows price excl. Tax

Viewing 15 posts - 16 through 30 (of 35 total)
  • #263503
    David Martin – Support
    Moderator
    Post count: 20834

    Is there any scope to set the admin language to English?

    Thanks.

    #263798
    larslenselink
    Member
    Post count: 99

    I’ve added a plugin that allows you to change the language. After you login you can change de language in the top left wordpress admin bar (default nl_NL).

    #263801
    David Martin – Support
    Moderator
    Post count: 20834

    Thanks, can you please add your FTP details so I can verify this on your site?

    – David.

    #264916
    larslenselink
    Member
    Post count: 99
    This reply has been marked as private.
    #265359
    David Martin – Support
    Moderator
    Post count: 20834

    Thanks, that’s great.

    If you open your child theme functions.php file, please add this:

    – Once added and saved, you will need to clear your cart and then add a new product to the cart to update WooCommerce mini cart price output.

    /* ADD TO CART HEADER RELOAD
    	================================================== */
    	if (!function_exists('sf_woo_header_add_to_cart_fragment')) {
    		function sf_woo_header_add_to_cart_fragment( $fragments ) {
    			global $woocommerce;
    
    			ob_start();
    
    			$cart_total = $woocommerce->cart->get_cart_total();
    			$cart_total = round($woocommerce->cart->cart_contents_total + $woocommerce->cart->tax_total, 2);
    
    			$cart_count = $woocommerce->cart->cart_contents_count;
    			$cart_count_text = sf_product_items_text($cart_count);
    			$price_display_suffix  = get_option( 'woocommerce_price_display_suffix' );
    
    			$options = get_option('sf_neighborhood_options');
    			$show_cart_count = false;
    			if (isset($options['show_cart_count'])) {
    				$show_cart_count = $options['show_cart_count'];
    			}
    			?>
    
    			<li class="parent shopping-bag-item">
    				<?php if ($show_cart_count) { ?>
    				<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping bag', 'swiftframework'); ?>"><i class="sf-cart"></i><?php echo $cart_total; ?> (<?php echo $cart_count; ?>)</a>
    				<?php } else { ?>
    				<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping bag', 'swiftframework'); ?>"><i class="sf-cart"></i><?php echo $cart_total; ?></a>
    				<?php }  ?>
    
    				<ul class="sub-menu">
    					<li>
    						<div class="shopping-bag">
    
    							<?php if ( sizeof($woocommerce->cart->cart_contents)>0 ) { ?>
    
    								<div class="bag-header"><?php echo $cart_count_text; ?> <?php _e('in the shopping bag', 'swiftframework'); ?></div>
    
    								<div class="bag-contents">
    
    									<?php foreach ($woocommerce->cart->cart_contents as $cart_item_key => $cart_item) { ?>
    
    								    	<?php
    									        $_product     		 = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    									        $price 				 = apply_filters( 'woocommerce_cart_item_price', $woocommerce->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
    
    									        $product_title       = $_product->get_title();
    									        $product_short_title = ( strlen( $product_title ) > 25 ) ? substr( $product_title, 0, 22 ) . '...' : $product_title;
    								        ?>
    
    								        <?php if ($_product->exists() && $cart_item['quantity']>0) { ?>
    
    								        	<div class="bag-product clearfix">
    
    								            	<figure><a class="bag-product-img" href="<?php echo get_permalink($cart_item['product_id']); ?>"><?php echo $_product->get_image(); ?></a></figure>
    
    									            <div class="bag-product-details">
    									           		<div class="bag-product-title">
    									           			<a href="<?php echo get_permalink($cart_item['product_id']); ?>">
    									           				<?php echo apply_filters( 'woocommerce_cart_widget_product_title', $product_short_title, $_product ); ?></a>
    									           		</div>
    									            	<div class="bag-product-price"><?php _e("Unit Price:", "swiftframework"); ?> <?php echo $price; ?></div>
    									            	<div class="bag-product-quantity"><?php _e('Quantity:', 'swiftframework'); ?> <?php echo $cart_item['quantity']; ?></div>
    									            	<?php if ( $price_display_suffix ) { ?>
    									            		<small class="woocommerce-price-suffix"><?php echo $price_display_suffix; ?></small>
    								            		<?php } ?>
    
    									            </div>
    
    									            <?php echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf('<a href="%s" class="remove" title="%s">&times;</a>', esc_url( $woocommerce->cart->get_remove_url( $cart_item_key ) ), __('Remove this item', 'swiftframework') ), $cart_item_key ); ?>
    
    									    	</div>
    
    								    	<?php } ?>
    
    								    <?php } ?>
    
    							    </div>
    
    							    <div class="bag-buttons">
    
    							    	<a class="sf-roll-button bag-button" href="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>"><span><?php _e('View shopping bag', 'swiftframework'); ?></span><span><?php _e('View shopping bag', 'swiftframework'); ?></span></a>
    
    							    	<a class="sf-roll-button checkout-button" href="<?php echo esc_url( $woocommerce->cart->get_checkout_url() ); ?>"><span><?php _e('Proceed to checkout', 'swiftframework'); ?></span><span><?php _e('Proceed to checkout', 'swiftframework'); ?></span></a>
    
    								</div>
    
    							<?php } else { ?>
    
    								<div class="bag-header"><?php _e("0 items in the shopping bag", "swiftframework"); ?></div>
    
    								<div class="bag-empty"><?php _e('Unfortunately, your shopping bag is empty.','swiftframework'); ?></div>
    
    								<div class="bag-buttons">
    
    									<?php $shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) ); ?>
    
    									<a class="sf-roll-button shop-button" href="<?php echo esc_url( $shop_page_url ); ?>"><span><?php _e('Go to the shop', 'swiftframework'); ?></span><span><?php _e('Go to the shop', 'swiftframework'); ?></span></a>
    
    								</div>
    
    							<?php } ?>
    
    							</div>
    						</li>
    					</ul>
    				</li>
    
    			<?php
    
    			$fragments['.shopping-bag-item'] = ob_get_clean();
    
    			return $fragments;
    
    		}
    		add_filter('add_to_cart_fragments', 'sf_woo_header_add_to_cart_fragment');
    	}
    
    #265464
    larslenselink
    Member
    Post count: 99

    I am sorry, but I am really starting to lose my patience…I’ve bought an extra support license and still the new code does not solve the problem. The price next to the shopping basket still shows the price without tax (229,75) but now even without the € icon (see attached image). It should display €278,00 (price including tax) just like in the dropdown. Did you login on my ste with the login details and ftp details that I had to provide? Did you check the code yourself to see if it works?

    Attachments:
    You must be logged in to view attached files.
    #265546
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    This is what I see: http://d.pr/i/12PIm.

    Are you wanting the 89,25 to be added to the 514,25?

    That total is shown anywhere on your site, not even on the cart/cehckout?

    Thanks.

    #266565
    larslenselink
    Member
    Post count: 99

    Hi David, it seems to work now. However, the € sign/icon is not showing anymore next to the price in the topbar (next to the shopping basket icon). How can I get it back? Furthermore, my website now puts a . instead of a , before the decimals. How can I change this?

    #266847
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    1)

    I updated the code to add the currency symbol, see screenshot: http://d.pr/i/18qze

    – I should note, you experience a delay seeing the output as the cart is using AJAX. This is only updated for you, when you you add/remove a product from you cart, it refreshes the AJAX output.

    2) The decimals are set here:

    WooCommerce => Settings => General Options => Thousand Separator

    and…

    WooCommerce => Settings => General Options => Decimal Separator

    Thanks.

    #267337
    larslenselink
    Member
    Post count: 99

    Thanks a lot! However, it does not seem to work for variable products like https://www.transferpersshop.nl/winkel/flexfolie/cad-cut-premium-plus-white-001. Please advice.

    #267391
    David Martin – Support
    Moderator
    Post count: 20834

    No problem, can you confirm that you see differently to this:

    Thanks,
    David.

    #269054
    larslenselink
    Member
    Post count: 99

    Works perfect now!

    #269165
    larslenselink
    Member
    Post count: 99

    It seems that still some products have this problem. How come the the code above does not solve the tax problem for all products?

    https://www.transferpersshop.nl/winkel/accessoires/secabo-tc5-beam-adapter

    When I add this product to my bag it still shows the price without tax……

    #269166
    larslenselink
    Member
    Post count: 99

    I think I have over written the functions.php file in my child theme with a local version (without your changes). Do you still have it?

    #269548
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    @larslenselink

    David is in holidays atm. Don’t you have any backup of the changes?

    -Rui

Viewing 15 posts - 16 through 30 (of 35 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register