top of page

Custom Login Bar

Sometimes the default elements will be responsive regardless of your settings, so it can look odd on larger screens. Or maybe the default elements design settings are too limiting and you are not able to design a version you like. Well if either of those are the case for you, then this lesson is for you!


VIDEO IS FOR CHANNEL MEMBERS ONLY. JOIN HERE.



$w.onReady(function () {
	//RUN CART FUNCTION
	hideCartIcon();
});


// CART INDICATOR FUNCTION
import {cart} from 'wix-stores';

function hideCartIcon(id) {
	cart.getCurrentCart().then(initialCart => showIcon(initialCart));
	cart.onChange(changedCart => showIcon(changedCart));

	function showIcon(aCart) {
		let count = aCart.lineItems.length;

		if (count) $w('#cartHasItems').show();
		else $w('#cartHasItems').hide();
	}
}

Enjoy!


Scene 02 (0-00-00-26).jpg

elevate your client projects?

Transform Your Projects with the Ultimate 2024-2025 Wix Studio Template Bundle!

Group 8.png
bottom of page