<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hide add to cart and order now button from service portal in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358811#M15737</link>
    <description>&lt;H3 class="cm-content-title m-t"&gt;Please refer below ServiceNow Community Links:-&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=99fc4369db9cdbc01dcaf3231f9619ea" target="_blank" rel="noopener noreferrer"&gt;To Hide "Add to Cart " &amp;amp; "Order Now " Button using client script&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=6e29cbe1db5cdbc01dcaf3231f961957" target="_blank" rel="noopener noreferrer"&gt;Remove OrderNow button&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=caffe625db657bc0feb1a851ca96198a" target="_blank" rel="noopener noreferrer"&gt;How to hide 'order now' button dynamically in a catalog without using DOM Manipulation&lt;/A&gt;&lt;/H3&gt;</description>
    <pubDate>Wed, 02 Mar 2022 03:52:25 GMT</pubDate>
    <dc:creator>Shakeel Shaik</dc:creator>
    <dc:date>2022-03-02T03:52:25Z</dc:date>
    <item>
      <title>Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358806#M15732</link>
      <description>&lt;P&gt;I have create variable with 2 option and below are the scenario i want to achieve.&lt;/P&gt;
&lt;P&gt;Scenario 1&lt;/P&gt;
&lt;P&gt;When i choose option 1 variable name (u_option1) default the add to cart and order now button already loaded.&lt;/P&gt;
&lt;P&gt;Scenario 2&lt;/P&gt;
&lt;P&gt;When i choose option 2 variable name (u_option2) the add to cart and order now button must hide.&lt;/P&gt;
&lt;P&gt;I attach the screenshot for your reference and is there scripts or option I can do that.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:33:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358806#M15732</guid>
      <dc:creator>TMKAM</dc:creator>
      <dc:date>2022-03-02T03:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358807#M15733</link>
      <description>&lt;P&gt;Open Platform &amp;gt; Maintain item &amp;gt; select your catalog &amp;gt; go to Portal Settings tab&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/149792iB82F37AFD099E577/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;select options as per you requirement. then save and check.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:37:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358807#M15733</guid>
      <dc:creator>Shakeel Shaik</dc:creator>
      <dc:date>2022-03-02T03:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358808#M15734</link>
      <description>&lt;P&gt;I have the above option in the maintain item... this is what i would like to achieve based on below scenario.&lt;/P&gt;
&lt;P&gt;Scenario 1&lt;/P&gt;
&lt;P&gt;When i choose option 1 variable name (u_option1) default the add to cart and order now button already loaded.&lt;/P&gt;
&lt;P&gt;Scenario 2&lt;/P&gt;
&lt;P&gt;When i choose option 2 variable name (u_option2) the add to cart and order now button must hide.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:44:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358808#M15734</guid>
      <dc:creator>TMKAM</dc:creator>
      <dc:date>2022-03-02T03:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358809#M15735</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;for showing/hiding the add to cart and order now button via script would require DOM manipulation which is not recommended.&lt;/P&gt;
&lt;P&gt;if you still require then use this onChange script on that variable&lt;/P&gt;
&lt;P&gt;I have shared solution here 2 years ago; enhance it for your requirement&lt;/P&gt;
&lt;P&gt;Ensure Isolate Script field is set to False for this client script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/149800iB9E8CC9167320445/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '') {
		return;
	}

	if(newValue == 'u_option2'){
		// hide
		this.document.getElementsByClassName('btn btn-default sc-btn form-control ng-scope')[0].style.display = 'none';
		this.document.getElementsByClassName('btn btn-primary btn-block ng-binding ng-scope')[0].style.display = 'none';
	}
	else{
		// show
		this.document.getElementsByClassName('btn btn-default sc-btn form-control ng-scope')[0].style.display = '';
		this.document.getElementsByClassName('btn btn-primary btn-block ng-binding ng-scope')[0].style.display = '';
	}

	//Type appropriate comment here, and begin script below
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:48:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358809#M15735</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2022-03-02T03:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358810#M15736</link>
      <description>&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=2cb907e5db5cdbc01dcaf3231f961956" target="_blank" rel="noopener noreferrer"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=2cb907e5db5cdbc01dcaf3231f961956&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:50:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358810#M15736</guid>
      <dc:creator>Shakeel Shaik</dc:creator>
      <dc:date>2022-03-02T03:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358811#M15737</link>
      <description>&lt;H3 class="cm-content-title m-t"&gt;Please refer below ServiceNow Community Links:-&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=99fc4369db9cdbc01dcaf3231f9619ea" target="_blank" rel="noopener noreferrer"&gt;To Hide "Add to Cart " &amp;amp; "Order Now " Button using client script&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=6e29cbe1db5cdbc01dcaf3231f961957" target="_blank" rel="noopener noreferrer"&gt;Remove OrderNow button&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="cm-content-title m-t"&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=caffe625db657bc0feb1a851ca96198a" target="_blank" rel="noopener noreferrer"&gt;How to hide 'order now' button dynamically in a catalog without using DOM Manipulation&lt;/A&gt;&lt;/H3&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:52:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358811#M15737</guid>
      <dc:creator>Shakeel Shaik</dc:creator>
      <dc:date>2022-03-02T03:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358812#M15738</link>
      <description>&lt;P&gt;Dear Ankur,&lt;/P&gt;
&lt;P&gt;I have use your scripts in the catalog scripts and it is working as expected.&lt;/P&gt;
&lt;P&gt;thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:59:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358812#M15738</guid>
      <dc:creator>TMKAM</dc:creator>
      <dc:date>2022-03-02T03:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358813#M15739</link>
      <description>&lt;P&gt;Dear Smudge,&lt;/P&gt;
&lt;P&gt;thank you for your information and your expertise.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:59:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358813#M15739</guid>
      <dc:creator>TMKAM</dc:creator>
      <dc:date>2022-03-02T03:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358814#M15740</link>
      <description>&lt;P&gt;Glad to know.&lt;/P&gt;
&lt;P&gt;Please mark response helpful as well.&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 04:02:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358814#M15740</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2022-03-02T04:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358815#M15741</link>
      <description>&lt;P&gt;Dear Ankur,&lt;/P&gt;
&lt;P&gt;Is it possible to hide the word "Approval is Precondition"? i attach the screenshot for your reference.&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 04:03:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358815#M15741</guid>
      <dc:creator>TMKAM</dc:creator>
      <dc:date>2022-03-02T04:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hide add to cart and order now button from service portal</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358816#M15742</link>
      <description>&lt;P&gt;Hide Add cart and order&amp;nbsp; Button from portal Then In catalog Item .In Related list&amp;nbsp; Their is option Portal setting then youcan hide it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/149808i2052B0FED25F0299/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 04:25:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-add-to-cart-and-order-now-button-from-service-portal/m-p/1358816#M15742</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2022-03-02T04:25:17Z</dc:date>
    </item>
  </channel>
</rss>

