Hi is there a way to refresh body content on a cer...
# suitecommerce
m
Hi is there a way to refresh body content on a certain action... this.application.getLayout().headerViewInstance.render() this will refresh header content .. any way for body content?
s
call
render()
on the specific child view instance
m
My child view is actually a data view... If I render it will refresh that particular section only..
Instead I want to refresh the whole body content
I tried Backbone.history.navigate ... With empty url but it always takes me to home
s
I think you need to give me more information as it sounds like there's probably a better solution. What exactly is it and why do you need it to re-render?
m
I have 2 things : 1. I'm trying to login through PDP(login form will show in PDP itself) , buy button is hidden before I login, which I want to enable after the successful logins. So I could able to refresh the header but unable to refresh PDP content. 2. I have matrix combination already selected which I want to unselect on reset action.
p
If i were you i’d refresh the page with window.location.reload()
Login in shopping is not a supported use case so even if you log in a lot of session related stuff will not automatically update
and you’ll end up having to add a lot of glue code, to sync back tje cart, the profile, the session, language and more. simpler to run a refresh
m
Maybe backbone.history works