Purchase without Account

Misaligned radio buttons - Purchase without Account

Misaligned radio buttons

by vmn » Sun Apr 04, 2021 12:25 pm

PWA version 4.3.6.x

Because of the new input.php class introduced in 1.0.8.1, the tpl_cm_cs_pwa_keep_account.php radio buttons are misaligned (see the attachment).

old contents:

...
<div class="col-sm-12">
<label class="radio-inline">
<?php echo tep_draw_radio_field('pwa_account', 'true', NULL, 'required aria-required="true"') . ' ' . MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_TEXT_SET_PASSWORD; ?>
</label>
</div>
<div class="col-sm-12">
<label class="radio-inline">
<?php echo tep_draw_radio_field('pwa_account', 'false') . ' ' . MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_TEXT_DELETE_ACCOUNT; ?>
</label>
</div>
...

my fix:

...
<div class="col-sm-12 custom-control custom-radio">
<?php
echo tep_draw_selection_field('pwa_account', 'radio','true', false, 'id="keep" required class="custom-control-input"');
echo '<label for="keep" class="custom-control-label text-muted">' . MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_TEXT_SET_PASSWORD .'</label>';
?>
</div>
<div class="col-sm-12 custom-control custom-radio">
<?php
echo tep_draw_selection_field('pwa_account', 'radio','false',false,'id="delete" class="custom-control-input"');
echo '<label for="delete" class="custom-control-label text-muted">' . MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_KEEP_ACCOUNT_TEXT_DELETE_ACCOUNT .'</label>';
?>
</div>
...

The function tep_draw_radio_field is deprecated in admin. I presume that it will be deprecated in the catalog, too.

In Login without Account Form settings the Exclude Payment Modules for Virtual Guest Orders check boxes are misaligned (see the attachment).
Attachments
pwa.keep.misaligned.jpg
payment.modules.misaligned.jpg
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact:

Re: Misaligned radio buttons

by raiwa » Sun Apr 04, 2021 1:33 pm

Thanks,
I’ ll include it in the next update. Although the next update round is planned for Phoenix 1.0.9.0. Please be patient.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Misaligned radio buttons

by vmn » Mon Apr 12, 2021 11:51 am

Hi,
I just downloaded PWA 4.4.0, thanks!

Looks like the misaligned radio buttons and admin checkbox are not fixed, yet.

Please consider this change, which works in all template configurations:

//VMNif (!file_exists(DIR_FS_CATALOG . 'templates/' . TEMPLATE_SELECTION . '/includes/hooks/shop/siteWide/pwa.php')) {
global $oscTemplate;
if (!file_exists($oscTemplate->map_to_template('includes/hooks/shop/siteWide/pwa.php', ''))) {
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact:

Re: Misaligned radio buttons

by raiwa » Mon Apr 12, 2021 12:24 pm

PWA is still a 1.0.8.0 version. As already pointed out, 1.0.8.1+ will probably not come until 1.0.9.0 release.
Thanks for the reminder on the hook check. Hope I’ll remember it for the next update :-)
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Misaligned radio buttons

by vmn » Tue Apr 13, 2021 7:37 am

Sorry, I missed the tested with note. I appreciate your hard work with all addon updates.

When 1.0.8.1 was released I decided to start with a fresh installation. I've got all my changes (addons and my own) archived. So it's relatively easy to install them into a full fresh release.

The !file_exists change suggestion worked already in 1.0.7.16.
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact: