Woo Mix and Match doesn't update quantity

Hello there,
I purchased Sydney Pro to work with Woocommerce. I purchased a few of their extensions and the Mix and Match Product doesn’t seem to work well. When you go on this link you can see that as I change the quantities the message underneath is stuck “You have selected 0 items”. It actually does work well on Sydney (but that theme doesn’t have the shipping card and my account pages). https://www.katinka.org/shop/testmix-match2/
This is what Woo told me: “typically what you are describing is the theme is modifying the quantity inputs. Most commonly I see themes add plus/minus buttons. These buttons change in the quantity input, but programmatically changing the quality fails to trigger the change event that Mix and match is listening for.
This can be fixed by the theme authors chaining a .change() event to the code that changes the quantity in the input. The theme author should know what that means. I’ll confirm it once you upload it to staging, but you’ll probably need to contact the theme authors.”
Would this help you fixing the issue?
Thank you!

Hi there,

The compatibility issue has been resolved and we’ll upload the new version of the theme now.

Vlad

Thank you!
In the meantime I got a reply from the Woo team working on Mix and Match Product extension and offered a solution. I wanted to share with you:
Normally, I don’t dig too deeply into themes, but the theme is fairly well organized and I was able to find the offending code in the main.js:

	$( 'body' ).on( 'click', '.q-plus, .q-min', function( e ) {
		e.preventDefault();
		var $qty = $( this ).closest( '.quantity' ).find( '.qty' ),
			currentVal = parseInt( $qty.val() ),
			isAdd = $( this ).hasClass( 'add' );

		!isNaN( currentVal ) && $qty.val( isAdd ? ++currentVal : ( currentVal > 0 ? --currentVal : currentVal ) );

		$("[name='update_cart']").removeAttr('disabled');

	} );

I believe the one line needs to be switched to:

!isNaN( currentVal ) && $qty.val( isAdd ? ++currentVal : ( currentVal > 0 ? --currentVal : currentVal ) ).change();

I tried doing that, but the theme is loading the minified scripts so there’s no change. The theme author will need to handle this.

Does this help at all?

I went to My Account downloads and downloaded the Sydney Pro again (adducing this is the place I can get the fixed theme from). I installed it and it not just doesn’t work it added a left side bar on the product page, a photo header and all my oder pages are messed up: I did it love so if you are there you can see it here till 11a, EST today (in the next 30 mins). https://www.katinka.org Then I will with back. If you would like I gave admin access to Charlie to my staging site I can upload it there too. Let me know what to do please. Thank you!

Hi,

You don’t have to download it from your account, you just have to update it from Appearance > Themes (if you’ve added your license key). So do that please. I’m thinking you might have downloaded an older version of the theme or something as in this update there have been no changes other than the fix I made for the Mix and Match issue.

Vlad

Hello Vlad,

I found the place to enter the license key and updated the theme.

Unfortunately the issue is still there. The message still displays even when I am selecting the 2 products required for the mix and match. Please see the screenshot below.

Have you tried the piece of code I shared above (that the Woo developers provided me with)?

Thank you,

Katinka

Hello Vlad,
I updated the theme and unfortunately the Mix and Match feature still doesn’t work. As you see, I selected two items and it still says you have selected 0 items.

Hello Katinka,

Vlad is away this week, sorry for the delay.

Kind Regards, Roman.
aThemes Support

No problem. Is there anyone else who could please help me? The Woo Mix and Match developer has sent all the code needed. It should be a quick fix. It is all in the above chats. Thank you!

Hello Katinka,

I tried doing that, but the theme is loading the minified scripts so there’s no change. The theme author will need to handle this.

As a temporary workaround, you can try to apply that fix once again, remove the minified file, and rename the modified file to main.min.js

Kind Regards, Roman.
aThemes Support

Hi Roman,
My case is closed with the Woo team regarding to this issue and if I message them again I am worried they will say it is not their job to fix a theme. Could you please apply this temporary workaround for me? I am not a developer and don’t know how to do it.
As for a long term solution, what do you suggest?
Thank you!

Hello Katinka,

In this case I would suggest you to wait for Vlad’s response. He should apply the fix and update the theme, then all you have to do is update the theme.

Kind Regards, Roman.
aThemes Support

OK. Is he back yet? I have a deadline to get this done by Tuesday. Thank you!

Hi there,

Really sorry about the delay here.
So the issue was fixed when I said I updated it. I’m thinking maybe you haven’t seen it working because of cache?
I see you made some changes now but if you reinstall an unaltered copy of Sydney Pro let me know and I’ll have a look.

Hey Vlad,
Thank you for getting back to me.
Something quite strange is happening - it works on the testmix-match2 page, but doesn’t work here mix-and-match-test2.
Thanks,
K

Send me an admin account please at vlad[at]athemes.com. I’ll sort it out for you.

Hi there,

Still waiting for the email please.

Hey Vlad, I have sent you an email with the credentials right away 3 days ago and I have just resent it again. Please check your junk mail and let me know if you still don’t have it. Thank you!