I am using one step checkout module from magestore and I want to hide some products in the magento checkout these products are pre added automatically with every order for example packing material for these products So I need to hide these products in checkout and cart How can I do this one step checkout module it is using knockoutJS so i am not very familiar with this. Thanks for your response in advance.
I have tried hiding using CSS but that is not what I want to do. So i want to hide these products programmatically.
/*
* *
* Copyright © 2016 Magestore. All rights reserved.
* See COPYING.txt for license details.
*
*/
/*browser:true*/
/*global define*/
define(
[
'jquery',
'ko',
'Magento_Checkout/js/model/totals',
'uiComponent',
'Magento_Checkout/js/model/step-navigator',
'Magento_Checkout/js/model/quote',
],
function ($, ko, totals, Component, stepNavigator, quote) {
'use strict';
return Component.extend({
initialize: function () {
this._super();
var self = this;
totals.isLoading.subscribe(function () {
if (totals.isLoading() == true) {
self.showOverlay();
} else {
self.hideOverlay();
}
});
},
defaults: {
template: 'Magestore_OneStepCheckout/summary/cart-items'
},
totals: totals.totals(),
getItems: totals.getItems(),
getItemsQty: function() {
return parseFloat(this.totals.items_qty);
},
showOverlay: function () {
$('#ajax-loader3').show();
$('#control_overlay_review').show();
},
hideOverlay: function () {
$('#ajax-loader3').hide();
$('#control_overlay_review').hide();
},
isItemsBlockExpanded: function () {
return quote.isVirtual() || stepNavigator.isProcessed('shipping');
}
});
}
);
This is the actual cart-items.js file that i suppose containing the code of displaying products in checkout but i don't understand how to apply filter to hide products with this sku XXXXXXXXX or product Id XXXXX. This is the website i setup for testing purposes. http://13.232.223.99