by ShopSite Lauren » Mon Apr 20, 2015 10:18 am
Do you have other products with cross sell items that you want to display always, with just a quantity of 1. Or, can customers mix and match products/coffees, and once they hit 5 products/coffees, you want to display the global cross sell?
A quick option would be to add style="display: none;" to the containing element for the cross sell (or example <div id="crosssell" style="display: none;">), then add some javascript that checks to see if there are 5 products in the cart, if there are, remove the display: none;. The following javascript will work for the DIV example I used. You can place this code in the 'text at the bottom of the shopping cart screen' field under Commerce Setup > Order System > Shopping Cart.
<script type="text/javascript">
var $ = ss_jQuery, jQuery = ss_jQuery;
if (number_products >= 5) {$("#crosssell").show();}
</script>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.