Hi All I want to hide PO number through extension ...
# suitecommerce
s
Hi All I want to hide PO number through extension in checkout I'm trying to extend 'OrderWizard.Module.PaymentMethod.PurchaseNumber'. Any ideas?
p
If you want to remove it conditionally then re-implementing "isActive" function might be the best option
if you just wan't to turn it off there's a setting in setup website for that i believe
s
Thank you PabloZ I have to hide based on condition only but not isActive of invoice section define( 'Dev.RepairsExtension.PurchaseOrderModule', [ 'OrderWizard.Module.PaymentMethod.PurchaseNumber', 'Utils', 'underscore', 'Backbone', 'jQuery' ], function( PurchaseOrderModuleView, Utils, _, Backbone, jQuery ) { 'use strict'; _.extend(PurchaseOrderModuleView.prototype, { initialize: function(options) { this.cart = LiveOrderModel.getInstance(); this.application = options.container; this.on('afterViewRender', this.hidePurchaseOrder, this); }, hidePurchaseOrder: function() { debugger; var hide = false; try { this.cart.get('lines').each(function(e) { var options = e.attributes.item.attributes.custitem_sr_repair; if (options) { hide = true; } }); } catch (e) { console.log(e); } if (hide) { //hiding in here } } }); }); this is how iam extending module
but with this my page is showing blank
p
hard for me to debug slack code 🙂
s
hmm no problem Thank you