Hi folks --
I've written a custom module for a store that has some products that can't be shipped to certain states. The module checks the basket contents when the customer goes from OCST to OSEL. If any restricted items are in the basket, the module redirects them to the BASK page by changing the value of g.Screen. It also displays an error message, and highlights the restricted item(s) so the customer can click the Remove button(s).
The problem is that this redirect occurs with an https URL, since it's coming off a checkout page. So when the customer clicks a Remove button, they get that warning box about going from a secure page to an insecure one. I must admit that I'm a little unclear on the finer points of the secure/insecure transitions, and on how they've changed in newer versions of Miva. So I could use some help getting a clean solution for this.
My best idea is to replace the form tags for the Remove and Update-quantity forms with an if/else, about like this:
Is there a better way? Can I just use secure_sessionurl here, without the if/else? Or will that cause other problems?
Thanks --
I've written a custom module for a store that has some products that can't be shipped to certain states. The module checks the basket contents when the customer goes from OCST to OSEL. If any restricted items are in the basket, the module redirects them to the BASK page by changing the value of g.Screen. It also displays an error message, and highlights the restricted item(s) so the customer can click the Remove button(s).
The problem is that this redirect occurs with an https URL, since it's coming off a checkout page. So when the customer clicks a Remove button, they get that warning box about going from a secure page to an insecure one. I must admit that I'm a little unclear on the finer points of the secure/insecure transitions, and on how they've changed in newer versions of Miva. So I could use some help getting a clean solution for this.
My best idea is to replace the form tags for the Remove and Update-quantity forms with an if/else, about like this:
Code:
<mvt:if expr="('https' IN s.documenturl) EQ 1"> <form method="post" action="&mvt:global:secure_sessionurl;"> <mvt:else> <form method="post" action="&mvt:global:sessionurl;"> </mvt:if>
Thanks --
Comment