Hi folks,
One of my clients has a module that uses the value of g.Product_Code to determine whether or not to apply custom behavior on the PROD page. The module stopped working when the client turned on URI Management. Apparently in some cases, g.Product_Code is not initialized any more.
This was a surprise to me. I've written a lot of modules over the years that use g.Product_Code. Is there a way to get it initialized by changing some admin settings?
After studying some LSK code, I was able to work out a quick fix by using the value of g.Session:uri:product_id to look up the correct product when g.Product_Code is empty. Is this the recommended practice, or is there a better way? This is a system-ex module, so I can't use template variables, at least not without writing quite a bit of new code.
If there's some other documentation on this that I missed, please point me to it. Thanks --
One of my clients has a module that uses the value of g.Product_Code to determine whether or not to apply custom behavior on the PROD page. The module stopped working when the client turned on URI Management. Apparently in some cases, g.Product_Code is not initialized any more.
This was a surprise to me. I've written a lot of modules over the years that use g.Product_Code. Is there a way to get it initialized by changing some admin settings?
After studying some LSK code, I was able to work out a quick fix by using the value of g.Session:uri:product_id to look up the correct product when g.Product_Code is empty. Is this the recommended practice, or is there a better way? This is a system-ex module, so I can't use template variables, at least not without writing quite a bit of new code.
If there's some other documentation on this that I missed, please point me to it. Thanks --
Comment