Print Page | Close Window

Dialog Box

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=4270
Printed Date: 14-July-2025 at 9:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Dialog Box
Posted By: joshs
Subject: Dialog Box
Date Posted: 25-January-2011 at 3:36pm
I have been trying to add an additional dialog pop box within the onepagecheckout.asp

Outside the page I can get it to work just fine but as soon as I put it into the checkout - no go.

Specifically in opc_chooseShpmnt.asp page.
I want to display additional information about shipping.

Any help or ideas?

-------------
Josh Shirley
josh@windsurfutah.com



Replies:
Posted By: Brett
Date Posted: 26-January-2011 at 9:57am
What kind of "dialog pop box" are you trying to add? Where do you want it to show up? inside opc_chooseShpmnt might not be the right place. I believe that page is loaded via AJAX when the customer proceeds to shipping selection. You might want to put it outside of opc_chooseShpmnt.asp and somewhere in onepagecheckout.asp.


Posted By: joshs
Date Posted: 26-January-2011 at 12:13pm
I am trying to add a dialog box similar to the "view terms and agreements" which is right after the address section. That is if the store settings display the terms are set on.

Basically I want to let the user click - "Shipping Terms" and a dialog box appears. Exactly the same format as the aforementioned dialog box.



-------------
Josh Shirley
josh@windsurfutah.com


Posted By: Brett
Date Posted: 26-January-2011 at 2:36pm
Here's an edited opc_chooseShpmnt.asp which will replace the Shipping Disclaimer with a pop up dialog box as with the terms and conditions:
uploads/1159/opc_chooseShpmnt.zip - opc_chooseShpmnt.zip

Here is the code that was added:

<script type="text/javascript">
     //SHIPDIALOG
     $('#ViewShippingTerms').click(function(){
          $("#ShippingTermsDialog").dialog('open');
          return ;
     });     
     //ENDSHIPDIALOG
     //*Terms Dialog
     $("#ShippingTermsDialog").dialog({
               bgiframe: true,
               autoOpen: false,
               width: 450,
               height: 250,
               modal: true
     });     
</script>
<div id="ShipTermsArea" name="ShipTermsArea">
     <div style="padding:2px;text-align: right;"><a href="javascript:;" id="ViewShippingTerms"><%=PC_SHIP_DETAIL_TITLE%></a></div>
     <div id="ShippingTermsDialog" title="<%=PC_SHIP_DETAIL_TITLE%>" style="display:none">
          <div id="ShipTermsMsg"><%=PC_SHIP_DETAILS%></div>
     </div>
</div>


You might want to change text-align: right to left and change the text size and stuff, but this should accomplish what you're after.


Posted By: joshs
Date Posted: 26-January-2011 at 2:41pm
Just to help me understand better. My jquery was /is identical - but I am guessing that it has to be placed on the opc_chooseshpmnt.asp and not on the onepagecheckjs.asp?

Thanks
Josh

-------------
Josh Shirley
josh@windsurfutah.com


Posted By: Brett
Date Posted: 26-January-2011 at 2:43pm
That appears to be the issue. If you view source on onepagecheckout.asp you'll notice that none of the shipping stuff shows up. Maybe the shipping info is loaded into an iframe and therefore the javascript on one page cannot communicate with the other page. That would be my best guess.


Posted By: joshs
Date Posted: 26-January-2011 at 2:47pm
That did it. Thanks.
I was about to try that then I got frustrated and decided to ask.

-------------
Josh Shirley
josh@windsurfutah.com


Posted By: joshs
Date Posted: 31-January-2011 at 11:43pm
Well, it works, and doesn't work. IE doesn't like it. At least IE 8. Humm.

-------------
Josh Shirley
josh@windsurfutah.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net