title: Allow shopify cart to checkout only if all cart items have same specific tag
body: <p>Here’s my situation:</p>
  
  <ul>
  <li>I have products set up with 2 major collections/tags: day(example: monday-product) and location (example: location-vegas). All day tags have the same "-product" suffix and each location tag has the same "location-" prefix</li>
  <li>All products can be tagged with one day tag "monday-product" and one location tag “location-vegas”.</li>
  <li>If a person buys a product with the tags “location-vegas” and another product with the tag “location-la”, the checkout doesn’t work because it doesn’t have matching "location-“ tags between them.</li>
  </ul>
  
  <p>I can't seem to figure out the coding for the checkout to look if all products have matching "location-" tags. I would also like to do the same with the "-product" tags.</p>
  
  <p>I've tried this code but it only looks if either is there, not if each has at least one matching: </p>
  
  <pre><code>{% for item in cart.items %}
      {% assign different_locations = false %}
      {% if item.product.tags == 'location-atwater' or 'location-nordelec' or 'location-place-ville-marie' %}
      {% assign different_locations = true %}
      {% endif %}
      {% endfor %}
  
      {% if different_locations == true %}
      [ 'CANNOT COMPLETE ORDER' ]
      {% else %}
      &lt;p&gt;
        &lt;input type="submit" class="action_button add_to_cart" id="checkout" name="checkout" value="{{ 'cart.general.checkout' | t }}" /&gt;
      &lt;/p&gt;
      {% endif %}
  </code></pre>
  
  <p>Hoping the stack overflow community can help.</p>