Can we extends the Categories. Js
# suitecommerce
g
Can we extends the Categories. Js
m
Yes you can
return _.extend(Categories, {
// do some work
});
g
I wanted to do some changes in makenavigationTab??if make any changes in that I am not getting additionfields array in category object
Any one have any idea on this
m
Make sure to call this after your changes inside the code block
this.application.trigger('Configuration.navigationData');
g
Where I need to write this snippet
Can I write in mountbto app
m
In my case I need to make changes in
addToNavigationTabs
and
makeNavigationTab
. This is the code block I modified and was it working perfectly.
if (index !== -1) {
self.fetchCategoriesToExclude().then(function(response) {
var tabs = self.makeNavigationTab(categories, response.data.categories);
// navigationData.splice(index, 1);
_.each(tabs, function(tab, position) {
navigationData.splice(index + position, 0, tab);
});
self.application.trigger('Configuration.navigationData');
});
}
g
I want to add custom field data to tab section
m
Yes you can. Create a service to fetch the data from custom field and modify the methods I mentioned above as per your needs.
s
if you are just adding a simple link that redirect to a landing page, then you can simply add it in the configuration section