• I am troubleshooting an issue with the mini-cart (preview cart). I’m using WooCommerce, WooCommerce Bookings, and WooCommerce Memberships. The issue I’m having is that when a user with 2 memberships on their account, logs in, they add a product to their cart, the mini-cart will display a double discount (so if it’s 10%, the subtotal will add an additional 10% discount on top).

    https://snipboard.io/JZx5Hu.jpg

    I have contacted the support for WooCommerce Bookings and Memberships and they directed me to contact OceanWP as it seems the mini-cart originates from the theme.

    Additional troubleshooting notes:

    I have custom code to disable discount stacking for WooCommerce Membership in my function file, which applies on the product page, but does not affect the mini-cart.

    I’ve updated all my plugins and the theme to the latest version.

    BouncingSprout Support Notes:

    Our plugin allows users to add additional bookings from the booking screen. It creates proposed bookings based on the initial booking, using the standard WooCommerce Booking functions. It determines the correct pricing for each of these 'recurring bookings' based on pricing rules.
    
    We then hook into woocommerce_add_cart_item, with a simple foreach loop, where the '_cost' of each booking is added up to get $price, and then we return $cart_item['data']->set_price( $price );
    
    This has always worked well - and indeed still does with WooCommerce Memberships in the actual cart, where your discounts are preserved. For reasons I don't understand, the mini-cart, if activated, seems to double-discount. E.G..
    
    Customer makes two bookings (£10 per booking). Memberships offers a 50% discount. The main cart correctly gives a subtotal of £10 (£20 - 50%), but the mini-cart shows £7.50. Interestingly, if you then go to the cart, simply clicking once on the mini-cart (or refreshing the page) makes it display the correct price (£10).
    
    Because the cart functionality seems to be working, I'm veering towards the issue being more to do with how the mini-cart displays the price, rather than an issue deep in the logic our plugins.

    SkyVerge Support Notes:

    Having stepped through this from our end of things, my assessment is the same—I'm thinking this is likely due to the Mini Cart itself.
    
    It looks like this mini-cart is implemented through your theme, OceanWP. I looked at the OceanWP Changelog and it looks like they modified the mini-cart in their latest version, 3.2.2: https://docs.oceanwp.org/article/653-oceanwp-theme-changelog
    
    Would you please try updating the theme to version 3.2.2 and let me know if it resolves this issue that you're seeing? Of course, I'd recommend making a full backup of your site before making any changes in case something unexpected happens. :)

    Updated to the latest version of the theme and problem remains.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    For the testing, please switch to any default theme like twentytwenty and check if it is working well or getting the same issue.

    In addition, Would you be so kind and go to Elementor > System Info and share the report with us so that we can take a look?

    Thread Starter opitdev

    (@opitdev)

    Hi Abhishek,

    I changed the theme to storefront, and it looks like the issue remains on the mini-cart

    System Info:

    == Server Environment ==
    	Operating System: Linux
    	Software: Apache
    	MySQL version: MySQL Community Server - (GPL) v5.7.37
    	PHP Version: 7.4.29
    	PHP Memory Limit: 
    	PHP Max Input Vars: 1000
    	PHP Max Post Size: 32M
    	GD Installed: Yes
    	ZIP Installed: No
    	Write Permissions: All right
    	Elementor Library: Connected
    
    == WordPress Environment ==
    	Version: 5.9.3
    	Site URL: https://www.tgcacalgary.com/development
    	Home URL: https://www.tgcacalgary.com/development
    	WP Multisite: No
    	Max Upload Size: 32 MB
    	Memory limit: 40M
    	Max Memory limit: 256M
    	Permalink Structure: /%postname%/
    	Language: en-US
    	Timezone: America/Edmonton
    	Admin Email: [email protected]
    	Debug Mode: Inactive
    
    == Theme ==
    	Name: Storefront
    	Version: 4.1.0
    	Author: Automattic
    	Child Theme: No
    
    == User ==
    	Role: administrator
    	WP Profile lang: en_US
    	User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36
    
    == Active Plugins ==
    	Add Admin CSS
    		Version: 2.0.1
    		Author: Scott Reilly
    
    	Child Theme Configurator
    		Version: 2.5.9
    		Author: Lilaea Media
    
    	Elementor
    		Version: 3.6.5
    		Author: Elementor.com
    
    	FluentSMTP
    		Version: 2.1.1
    		Author: FluentSMTP & WPManageNinja Team
    
    	Limit Login Attempts Reloaded
    		Version: 2.25.3
    		Author: Limit Login Attempts Reloaded
    
    	Mailchimp for WooCommerce
    		Version: 2.6.2
    		Author: Mailchimp
    
    	Menu Image
    		Version: 3.0.8
    		Author: Freshlight Lab
    
    	Password Protected
    		Version: 2.5.1
    		Author: WPExperts
    
    	Product Customer List for WooCommerce
    		Version: 3.0.9
    		Author: Kokomo
    
    	PublishPress Capabilities
    		Version: 2.4.1
    		Author: PublishPress
    
    	reCaptcha for WooCommerce
    		Version: 2.33
    		Author: I Thirteen Web Solution
    
    	Recurring Bookings for WooCommerce (Premium)
    		Version: 2.0.4
    		Author: Bouncingsprout Studio
    
    	Site Kit by Google
    		Version: 1.75.0
    		Author: Google
    
    	Sticky Header OceanWP
    		Version: 1.0.8
    		Author: Oren Hahiashvili
    
    	The Post Grid
    		Version: 4.0.4
    		Author: RadiusTheme
    
    	WC Multiple Email Recipients
    		Version: 1.4.0
    		Author: Con Schneider
    
    	WooCommerce
    		Version: 6.5.1
    		Author: Automattic
    
    	WooCommerce Bookings
    		Version: 1.15.56
    		Author: WooCommerce
    
    	WooCommerce Memberships
    		Version: 1.23.0
    		Author: SkyVerge
    
    	WooCommerce Moneris Gateway
    		Version: 2.17.3
    		Author: SkyVerge
    
    	WooCommerce PDF Invoices
    		Version: 4.15.5
    		Author: Andrew Benbow
    
    	WooCommerce Product Add-ons
    		Version: 4.9.0
    		Author: WooCommerce
    
    == Must-Use Plugins ==
    	WordPress automation by Installatron
    		Version: 
    		Author: 
    
    == Elements Usage ==
    	
    	page : 1
    		heading : 1
    		text-editor : 5
    	section : 2
    		heading : 2
    	wp-post : 82
    		button : 13
    		divider : 2
    		heading : 37
    		image : 56
    		image-carousel : 6
    		image-gallery : 14
    		spacer : 3
    		text-editor : 104
    	wp-page : 84
    		button : 1
    		divider : 6
    		google_maps : 1
    		heading : 58
    		icon : 4
    		image : 17
    		spacer : 5
    		text-editor : 180
    
    == Elementor Experiments ==
    	Optimized DOM Output: Inactive by default
    	Improved Asset Loading: Inactive by default
    	Improved CSS Loading: Inactive by default
    	Inline Font Icons: Inactive by default
    	Accessibility Improvements: Inactive by default
    	Import Export Template Kit: Active by default
    	Additional Custom Breakpoints: Inactive by default
    	Hide native WordPress widgets from search results: Active by default
    	: Inactive by default
    	Flexbox Container: Inactive by default
    	Landing Pages: Active by default
    	Color Sampler: Active by default
    	Favorite Widgets: Active by default
    	Admin Top Bar: Active by default
    
    == Log ==
    	
    Log: showing 20 of 372021-11-17 20:11:24 [info] Elementor/Upgrades - _v_3_4_8_fix_font_awesome_default_value_from_1_to_yes Finished 
    2021-11-17 20:11:24 [info] Elementor data updater process has been completed. [array (
      'plugin' => 'Elementor',
      'from' => '3.3.1',
      'to' => '3.4.8',
    )]
    2021-11-17 20:11:25 [info] Elementor data updater process has been queued. [array (
      'plugin' => 'Elementor',
      'from' => '3.3.1',
      'to' => '3.4.8',
    )]
    2021-12-21 20:09:18 [info] elementor::elementor_updater Started 
    2021-12-21 20:09:18 [info] Elementor/Upgrades - _on_each_version Start  
    2021-12-21 20:09:19 [info] Elementor/Upgrades - _on_each_version Finished 
    2021-12-21 20:09:20 [info] elementor::elementor_updater Started 
    2021-12-21 20:09:20 [info] Elementor/Upgrades - _v_3_4_8_fix_font_awesome_default_value_from_1_to_yes Start  
    2021-12-21 20:09:20 [info] Elementor/Upgrades - _v_3_4_8_fix_font_awesome_default_value_from_1_to_yes Finished 
    2021-12-21 20:09:20 [info] Elementor data updater process has been completed. [array (
      'plugin' => 'Elementor',
      'from' => '3.4.8',
      'to' => '3.5.1',
    )]
    2022-03-15 20:37:32 [info] Elementor data updater process has been queued. [array (
      'plugin' => 'Elementor',
      'from' => '3.5.1',
      'to' => '3.5.6',
    )]
    2022-03-15 20:37:32 [info] elementor::elementor_updater Started 
    2022-03-15 20:37:32 [info] Elementor/Upgrades - _on_each_version Start  
    2022-03-15 20:37:34 [info] Elementor/Upgrades - _on_each_version Finished 
    2022-03-15 20:37:34 [info] Elementor data updater process has been completed. [array (
      'plugin' => 'Elementor',
      'from' => '3.5.1',
      'to' => '3.5.6',
    )]
    2022-05-23 18:40:07 [info] Elementor data updater process has been queued. [array (
      'plugin' => 'Elementor',
      'from' => '3.5.6',
      'to' => '3.6.5',
    )]
    2022-05-23 18:40:08 [info] elementor::elementor_updater Started 
    2022-05-23 18:40:08 [info] Elementor/Upgrades - _on_each_version Start  
    2022-05-23 18:40:08 [info] Elementor/Upgrades - _on_each_version Finished 
    2022-05-23 18:40:08 [info] Elementor data updater process has been completed. [array (
      'plugin' => 'Elementor',
      'from' => '3.5.6',
      'to' => '3.6.5',
    )]
    
    PHP: showing 5 of 5PHP: 2021-04-28 11:55:27 [notice X 50][/home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/includes/managers/image.php::86] Trying to access array offset on value of type bool [array (
      'trace' => '
    #0: Elementor\Core\Logger\Manager -> shutdown()
    ',
    )]
    PHP: 2021-06-17 09:15:38 [notice X 1][/home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/includes/api.php::160] Undefined index: pro_widgets [array (
      'trace' => '
    #0: Elementor\Core\Logger\Manager -> shutdown()
    ',
    )]
    PHP: 2021-08-10 19:44:29 [notice X 134][/home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/core/app/modules/import-export/module.php::87] Trying to get property 'label' of non-object [array (
      'trace' => '
    #0: Elementor\Core\Logger\Manager -> shutdown()
    ',
    )]
    PHP: 2021-08-25 08:12:09 [notice X 3][/home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/core/common/modules/ajax/module.php::171] Undefined index: data [array (
      'trace' => '
    #0: Elementor\Core\Logger\Manager -> shutdown()
    ',
    )]
    PHP: 2022-01-20 13:00:33 [error X 1][/home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/includes/template-library/sources/local.php::1042] Uncaught TypeError: Argument 2 passed to Elementor\TemplateLibrary\Source_Local::on_save_post() must be an instance of WP_Post, instance of stdClass given, called in /home/mol8pr45m5rw/public_html/wp-includes/class-wp-hook.php on line 294 and defined in /home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/includes/template-library/sources/local.php:1042
    Stack trace:
    #0 /home/mol8pr45m5rw/public_html/wp-includes/class-wp-hook.php(294): Elementor\TemplateLibrary\Source_Local->on_save_post(40201, Object(stdClass))
    #1 /home/mol8pr45m5rw/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #2 /home/mol8pr45m5rw/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /home/mol8pr45m5rw/public_html/wp-includes/post.php(4384): do_action('save_post', 40201, Object(stdClass), true)
    #4 /home/mol8pr45m5rw/public_html/wp-includes/post.php(4486): wp_insert_post(Array, false, true)
    #5 /home/mol8pr45m5rw/public_html/wp-content/plugins/elementor/includes/db.php(235): wp_upda [array (
      'trace' => '
    #0: Elementor\Core\Logger\Manager -> shutdown()
    ',
    )]
    
    == Elementor - Compatibility Tag ==
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Discount Stacking on Mini-Cart’ is closed to new replies.