<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Hide content with {tag_instock, true}</title>
    <link>https://forums.adobe.com/community/business_catalyst/liquid_layouts?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Mon, 07 Jan 2013 09:33:38 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-01-07T09:33:38Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4973708?tstart=0#4973708</link>
      <description>&lt;!-- [DocumentBodyStart:342b01eb-c843-47ad-bf8d-970f2190c278] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;No worries, glad it worked!&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:342b01eb-c843-47ad-bf8d-970f2190c278] --&gt;&lt;img src='/beacon?t=1415885022494' /&gt;</description>
      <pubDate>Mon, 07 Jan 2013 09:33:38 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4973708?tstart=0#4973708</guid>
      <dc:date>2013-01-07T09:33:38Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4973531?tstart=0#4973531</link>
      <description>&lt;!-- [DocumentBodyStart:c6a3ebf9-2f3a-4d72-9451-5ffde0544b53] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Justin you beauty! thanks champ! &lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:c6a3ebf9-2f3a-4d72-9451-5ffde0544b53] --&gt;</description>
      <pubDate>Mon, 07 Jan 2013 06:47:57 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4973531?tstart=0#4973531</guid>
      <dc:date>2013-01-07T06:47:57Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4973264?tstart=0#4973264</link>
      <description>&lt;!-- [DocumentBodyStart:36b788f2-907f-4652-a722-7cf01551ebad] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hey Wes,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Of course, I forgot about the new inventory control! So you need the code to run when the &amp;lt;select&amp;gt; is clicked.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Since you're going straight to cart when you buy a product you don't really need the code running when the add to cart button is pressed so replace the last line with:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;$('.catProdAttributeItem select').click(displaySlaves)&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cheers,&lt;br/&gt;Justin&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:36b788f2-907f-4652-a722-7cf01551ebad] --&gt;</description>
      <pubDate>Mon, 07 Jan 2013 03:10:57 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4973264?tstart=0#4973264</guid>
      <dc:date>2013-01-07T03:10:57Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4971546?tstart=0#4971546</link>
      <description>&lt;!-- [DocumentBodyStart:2cb70d8c-28cf-4f4f-9831-41b28ba463c4] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hey Justin, &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks again mate for your help! I've put your script into the product details page of my site:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.kiph.co.za/all-products/save-water-graphic-tee" rel="nofollow"&gt;http://www.kiph.co.za/all-products/save-water-graphic-tee&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;if the product loads an initial stock value of 0 the script works perfectly, however if i change the attribute variation to eg: "small" size nothing happens.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;unlike the product grouping dropdown, the new attribute dropdown doesn't refresh the page... &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Wes&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:2cb70d8c-28cf-4f4f-9831-41b28ba463c4] --&gt;</description>
      <pubDate>Sun, 06 Jan 2013 07:25:53 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4971546?tstart=0#4971546</guid>
      <dc:date>2013-01-06T07:25:53Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4971396?tstart=0#4971396</link>
      <description>&lt;!-- [DocumentBodyStart:ee6a06e0-7f31-42b4-ac98-7a5371b8ffe0] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi Wes,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is untested, but you could check initially on page load as well as each time the add to cart button is clicked.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You really just need to re-run the code whenever the value changes.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Something like this perhaps: &lt;/span&gt;&lt;a class="jive-link-external-small" href="http://jsfiddle.net/M6GZb/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/M6GZb/&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can manually test it by changing the span value then pressing run. I have not tested this live in BC to make sure it works with the add to cart button. BC is known for killing DOM in eCommerce.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I've also made a couple of assumptions like your add to cart button being the standard BC image and inside the quantity UL LI.&amp;nbsp; You might need to adjust a couple of things to make it work with your setup.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Replace the span in jsFiddle with {tag_instock,true} when you test it in BC.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Let me know if that works for you.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cheers,&lt;br/&gt;Justin&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ee6a06e0-7f31-42b4-ac98-7a5371b8ffe0] --&gt;</description>
      <pubDate>Sun, 06 Jan 2013 03:46:39 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4971396?tstart=0#4971396</guid>
      <dc:date>2013-01-06T03:46:39Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4970534?tstart=0#4970534</link>
      <description>&lt;!-- [DocumentBodyStart:9cc42fdb-05d8-41fb-8397-c457eb665d21] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi Justin, &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for the response! I did try the following script:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;div id="stock"&amp;gt;{tag_instock, true}&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="slave1"&amp;gt;SOLD OUT&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;$(document).ready(function(){&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;var n = $("#stock").text();&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;$("#slave1").css("display", (n &amp;lt; 1) ? "inline" : "none");&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;$("#slave2").css("display", (n &amp;lt; 1) ? "inline" : "none");&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;});&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;span style="color: #ff0000;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;excuse my syntax, I'm still a novice at JavaScript. Problem was that if you change the attribute the script wouldn't react to it. In other words the script would only react to the default stock value the page loads with. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;any ideas? &lt;/p&gt;&lt;p&gt;Wes&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:9cc42fdb-05d8-41fb-8397-c457eb665d21] --&gt;</description>
      <pubDate>Sat, 05 Jan 2013 18:40:30 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4970534?tstart=0#4970534</guid>
      <dc:date>2013-01-05T18:40:30Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4970139?tstart=0#4970139</link>
      <description>&lt;!-- [DocumentBodyStart:dc00cf1a-ea99-49d0-b952-59bd5fe717a9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hey Wes.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You could hide the span using CSS, then tell Javascript/jQuery to also hide the form if the span has a 0, if it has any other number leave as is? Javascript numerics is pretty handy, you can do all sorts with it.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Kind regards,&lt;br/&gt;Justin&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:dc00cf1a-ea99-49d0-b952-59bd5fe717a9] --&gt;</description>
      <pubDate>Sat, 05 Jan 2013 15:33:56 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4970139?tstart=0#4970139</guid>
      <dc:date>2013-01-05T15:33:56Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Hide content with {tag_instock, true}</title>
      <link>https://forums.adobe.com/message/4970058?tstart=0#4970058</link>
      <description>&lt;!-- [DocumentBodyStart:bfa8c15c-ea58-4bab-b169-48d89a392fa7] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi there, &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;I need to show a form when an item is out of stock on the product details page. With the grouping function it was easy class="stockout-{tag_instock}" would call a class to hide ("stockout-1") or to display ("stockout-0"). &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;HOWEVER, with attributes you need to use the {tag_instock, true} tag which DOESN'T simply output a 0 or 1! It however outputs the number of stock items within &amp;lt;span&amp;gt; tags. This prevents me from using this css trick to show and hide content. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; eg: &amp;lt;span class="catInStock catInStock_6190581"&amp;gt;0&amp;lt;/span&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; I've explored various options ranging from jquery to content holders but nothing seems to work. If you could suggest anything I would be really grateful!&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Maybe a Json script? &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Kind regards,&lt;/p&gt;&lt;p&gt;Wes&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:bfa8c15c-ea58-4bab-b169-48d89a392fa7] --&gt;</description>
      <pubDate>Sat, 05 Jan 2013 13:56:20 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4970058?tstart=0#4970058</guid>
      <dc:date>2013-01-05T13:56:20Z</dc:date>
      <clearspace:dateToText>1 year 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

