Re: One-Page Checkout [Support Thread]
To keep that checkbox checked, you'll need to modify that optional insurance order-total so that it records the check when clicked (or unclicked) into the session, as you indicated, and also to initialize the checkbox based on that session value (if present).
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
To keep that checkbox checked, you'll need to modify that optional insurance order-total so that it records the check when clicked (or unclicked) into the session, as you indicated, and also to initialize the checkbox based on that session value (if present).
Ok cool.....I just did that in the ot_insurance module and got it working!
Final question (I promise)! It looks like your One Page module is the one putting the "Apply" button next to these other modules, which makes total sense because it's designed to have the user "click to apply" their settings.
But since I modified the Insurance module to "auto-submit" upon checking the box, I no longer need the "Apply" button next to it (since it's auto-applied based on our changes).
How can I remove that Apply button from being displayed on the ot_insurance section of the checkout page? (Would it just be an if/else statement added to your function submitonce() in your checkout_one.js file)?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
Ok cool.....I just did that in the ot_insurance module and got it working!
Final question (I promise)! It looks like your One Page module is the one putting the "Apply" button next to these other modules, which makes total sense because it's designed to have the user "click to apply" their settings.
But since I modified the Insurance module to "auto-submit" upon checking the box, I no longer need the "Apply" button next to it (since it's auto-applied based on our changes).
How can I remove that Apply button from being displayed on the ot_insurance section of the checkout page? (Would it just be an if/else statement added to your function submitonce() in your checkout_one.js file)?
You can "hide" that button via CSS. Just update your template's version of /css/checkout_one.css and add something akin to
Code:
#disc-ot_insurance+div.buttonRow { display: none; }
Just use your browser's 'element inspector' and make sure that the id= attribute on the ot_insurance input matches the value above.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
You can "hide" that button via CSS. Just update your template's version of /css/checkout_one.css and add something akin to
Code:
#disc-ot_insurance+div.buttonRow { display: none; }
Just use your browser's 'element inspector' and make sure that the
id= attribute on the
ot_insurance input matches the value above.
Thank you so much for all your help! That works PERFECTLY!!
Just to document what I did (for anyone else wanting to accomplish the same), I made two changes to the code.
1. Since your template is the one that adds the Apply button on the checkout page, I modified the tpl_opc_credit_selections.php to assign a unique class name to ONLY the insurance block.
I changed this (line 54):
Code:
<div class="buttonRow forward"><?php echo zen_image_button(BUTTON_IMAGE_SUBMIT, ALT_TEXT_APPLY_DEDUCTION, $additional_parms, $secondary_class); ?></div>
And replaced it with this:
Code:
<?php
if(strpos($current_selection['module'],"Shipping Insurance") !== false){
?>
<div class="buttonRow forward ot-insurance"><?php echo zen_image_button(BUTTON_IMAGE_SUBMIT, ALT_TEXT_APPLY_DEDUCTION, $additional_parms, $secondary_class); ?></div>
<?php
}
else {
?>
<div class="buttonRow forward"><?php echo zen_image_button(BUTTON_IMAGE_SUBMIT, ALT_TEXT_APPLY_DEDUCTION, $additional_parms, $secondary_class); ?></div>
<?php
}
?>
There is probably a better (and prettier) way to accomplish that, but I'm not a native PHP programmer. :)
2. Finally, I simply edited your checkout_one.css file to add the following line:
Code:
.ot-insurance { display: none; }
Those changes (along with the previous posts of ours) made the module work exactly as we wanted! The customer can now click to apply insurance, it will update the form totals automatically, and the now-redundant "Apply" button has been removed from that Insurance block (without removing it from others like Coupons and Gift Certificates, etc).
Thanks again for all your help, Lat9!
Re: One-Page Checkout [Support Thread]
I think I have a bug =(
So when you change the shipping/billing address in checkout the only button there is cancel, "save changes" doesn't appear until you click the box which cannot be seen
Zen Cart 1.5.5f
OPC 2.3.3 (2020-07-07)
~Melanie
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
mprough
I think I have a bug =(
So when you change the shipping/billing address in checkout the only button there is cancel, "save changes" doesn't appear until you click the box which cannot be seen
Zen Cart 1.5.5f
OPC 2.3.3 (2020-07-07)
~Melanie
Which bootstrap template is in use? Have you checked to see that any of the template's overrides of the OPC templates is 'current'?
I'll note that the site's pulling in a woefully old v2.1.1 of jQuery, don't know if that has play in the issue or not.
Re: One-Page Checkout [Support Thread]
Noting, too, that the Save Changes button appears when you exit the changed field.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
Which bootstrap template is in use? Have you checked to see that any of the template's overrides of the OPC templates is 'current'?
I'll note that the site's pulling in a woefully old v2.1.1 of jQuery, don't know if that has play in the issue or not.
Updated jQuery, no help. Bootstrap Version: 1.0.5 08 July 2018.
Quote:
Have you checked to see that any of the template's overrides of the OPC templates is 'current'?
Not to be dense, but I don't understand this LOL
Re: One-Page Checkout [Support Thread]
For that last bit, I was suggesting that you file-compare the /templates/bootstrap/templates against templates/template_default/templates to ensure that any template-overrides for the OPC templates have all the current changes.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
For that last bit, I was suggesting that you file-compare the /templates/bootstrap/templates against templates/template_default/templates to ensure that any template-overrides for the OPC templates have all the current changes.
I have done so.... did a full install of OPC instead of picking through it