Hello everyone! I'm currently working with the Pro...
# suitecommerce
z
Hello everyone! I'm currently working with the Product Detail Page (PDP) component. In the entry point file of my custom extension, I'm attempting to override the image URL property of the Product Detail Page using addToViewContextDefiniton method. The name of the property matches the existing code, and I can see the property value changing in the console. However, the image on the page is not updating. If I create a new image element with the property value in the Tpl template, the image renders correctly. What could be the solution for this issue? Thanks in advance!
s
Re-render the view
z
Thank you, @Steve Goldberg Is there any way to re-render the view from entry point file ?
s
Once you’ve changed the value of the property you could probably just do something like
container.getLayout().getCurrentView().render()
z
container.getLayout().getCurrentView() is undefined for me. Is there any other way to do it ?
s
You may have to wait for the application to progress far enough for that value to set, so I would set an event listener for further down the execution chain
s
Hi @Zohaib Ahmed, I'm interested to know if you did this successfully. Were you able to?
z
Hello @suiteExperimenter I'm still working on it.