Disabling the Shopping Cart Functionality
To disable the shopping cart functionality, perform the following steps:
1. Create a backup of the userMenu.tmpl.html file available at <INS_HOME>\InS_SW\SW\Applications\Windchill.ear\codebase.war\delivery\app\views\header\userMenu.tmpl.html
2. Update the file by making the following changes:
a. Search for the code snippet <li class="menu-trigger" data-ng-if="hasPartsAccess() && !showCartBtn"> and comment out the code as follows:
<!--li class="menu-trigger" data-ng-if="hasPartsAccess() && !showCartBtn">
<div class="wrapper alignCartButton">
<div class="alignCartButton innerWrapper">
<div class="cartButton alignCartButton">
<button type="button" class="cart-preview-button menu-button">
<span class="ins-icon icon-cart disable-push-effect" data-ng-attr-title="{{'CARTS'|translate}}"></span> <span
class="ptc-icon-count-badge"
data-ng-if="cartData.activeCartQuantity > 0 || cartData.activeCartQuantity === '999+'"
data-ng-bind="cartData.activeCartQuantity"></span>
</button>
<div data-ptc-flyout class="cart-preview"
data-ng-show="cartData.activeCart">
<div data-arrow-box>
<div
data-ng-if="totalCartsAvailable === 0 || !isActiveCartNeeded"
data-ptc-include="'app/views/header/cartPreview/cartPreview.tmpl.html'"></div>
</div>
</div>
</div>
<div class="cartLabel cartLabelText"
data-ng-controller="cartsController" data-ng-click="openCartPreview($event);">
<span
data-ng-maxlength="23"
data-ng-if="cartData.activeCart"
data-ng-bind="trimCartLabel(cartData.activeCart.displayName)"></span>
</div>
<div id="cartBubbleActions" data-ptc-flyout class="cartBubble"
position-fn="'FLYOUT_DROP_ALIGN_CENTER_NO_FLIP'"
data-ng-show="!cartData.activeCart"
fit-to-window>
<div class="cart-started-arrow-box" data-arrow-box>
<span class="notificationImageStyle"><img data-ng-src="app/style/images/notification_warning.png" src="app/style/images/ notification_warning.png"> </span>
<div class="cart-bubble-message" data-ng-bind="'CART_BUBBLE_MESSAGE' | translate"></div>
<br>
</div>
</div>
</div-->
<!-- Select cart picker -->
<!--div class="header-item alignCartButton"
data-ng-controller="cartsController">
<div class="menu-container">
<button type="button" class="menu-button menu-button-no-padding activeCartSelector" data-ng-click="getSelectCartMenuItems()">
<span data-ng-if="!cartData.activeCart && !isSmallerMobileDevice" data-ng-bind="'SELECT_CART' | translate"></span>
<i class="ins-icon icon-arrow-down cartMenu disable-push-effect"></i>
</button>
<div class="cartItemsMenu" data-ptc-flyout data-position-fn="'FLYOUT_DROP_ALIGN_LEFT'">
<menu>
<a class="menu-item-button"
data-ng-bind="'ADD_NEW_CART' | translate"
data-ng-click="addNewCart()"
href="javascript:void(0);"
data-click-to-hide></a>
<a data-ng-repeat="item in selectCartMenuItems"
class="menu-item-button"
data-ng-bind="item.displayName"
data-ng-click="item.moreLink?item.clickHandler():activateCart(item)"
href="javascript:void(0);"
data-click-to-hide
data-ng-hide="cartData.activeCart.id === item.id"></a>
</menu>
</div>
</div>
</div-->
<!-- Select Cart Picker ends -->
<!--/div>
</li-->
b. Search for the code snippet <a data-ng-if="::hasPartsAccess()" and comment out the code as follows:
<!--a data-ng-if="::hasPartsAccess()"
data-ng-attr-title="{{::'SHOPPING' | translate}}"
data-ng-bind="::'SHOPPING' | translate"
class="menu-item-button"
data-ng-click="openShoppingWindow()"
data-click-to-hide
href="javascript:void(0);">
</a-->

<!--a data-ng-if="::isShoppingParametersAvailable && isShoppingParamEnabled && hasPricingPrivilege && (shoppingParam !== undefined) && (shoppingParam.length > 0)"
data-ng-attr-title="{{::'SET_SHOPPING_PARAMETERS' | translate}}"
data-ng-bind="::'SET_SHOPPING_PARAMETERS' | translate"
class="menu-item-button"
data-click-to-hide
data-ng-click="setShoppingParameters()">
</a-->
3. Create a backup of the directives.js file available at: <INS_HOME>\InS_SW\SW\Applications\Windchill.ear\codebase.war\delivery\app\config\directives.js
4. Update the directives.js file by making the following changes: Search for the content "directives/addToCart/addToCartDirective", and comment out the code as follows:// "directives/addToCart/addToCartDirective",
5. Run the minimize command by performing the following steps:
a. Open the Windchill shell.
b. At the command prompt navigate to <INS_HOME>\InS_SW\SW\Applications\Windchill.ear\bin and type: windchill shell
c. Run the following command: ant –f codebase.war\delivery\minimize.xml
Disabling the Shopping Cart Icon for Parts List
To disable the shopping cart icon for a parts list, perform the following steps:
1. Create a backup of the contentActionService.js file available at: <INS_HOME>\InS_SW\SW\Applications\Windchill.ear\codebase.war\delivery\app\services\contentActionService.js
2. Update the contentActionService.js file by making the following changes: Search for the content addToCartPartList and comment out the code as follows:
//},
// addToCartPartList: {
// name: 'addToCartPartList',
// template: "app/views/contentActions/addToCartPartList/ addToCartPartList.html",
// onClick: function () {
// cartsService.confirmChoices();
// }
}
3. Create a backup of the Element.PartsList.tmpl.html file available at <INS_HOME>/InS_SW/SW/Applications/Windchill.ear/codebase.war/delivery/templates/title/Element.PartsList.tmpl.html
4. Update the Element.PartsList.tmpl.html file by making the following changes: Search for the content id="addToCartPartsList" and comment out the button tag as follows:
<!—button data-ng-if=”isSmallerMobileDevice && totalCount > 0” class=”ins-icon icon-add-cart” type=”button” id=”addToCartPartList” style=”min-width: 15vw;padding-bottom: 5px;background-color: #4780ab;color: white;border-color: white;” data-ng-click=”confirmChoices()”></button-->
5. Run the minimize command by performing the following steps:
a. Open the Windchill shell.
b. At the command prompt navigate to <INS_HOME>\InS_SW\SW\Applications\Windchill.ear\bin and type: windchill shell
c. Run the following command: ant –f codebase.war\delivery\minimize.xml
Was this helpful?