lat9 / ZCA-Bootstrap-Template

A Bootstrap-4 template for Zen Cart versions 1.5.8 through 2.1.0. Forked from https://github.com/zcadditions/ZCA-Bootstrap-Template-for-1.5.6-v2.0.0c. See the demo site, below, for additional information.
https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=index
GNU General Public License v3.0
4 stars 14 forks source link

Payment Modules with checkboxes/radio buttons not correctly rendered #397

Closed scottcwilson closed 2 months ago

scottcwilson commented 3 months ago

Payment modules like Authorize CIM that include a checkbox do not appear on the checkout payment page in the Bootstrap template.

This was also an issue for Order Total modules, and so the code on line 120-133 of includes/templates/bootstrap/templates/tpl_checkout_payment_default.php was added to handle these two situations.

Either this code is required at on line 229 of the same file, as suggested here:

https://www.zen-cart.com/showthread.php?223910-ZCA-Bootstrap-4-Template-Support-Thread&p=1401560#post1401560

Or the CSS should be tweaked, as suggested here:

https://www.zen-cart.com/showthread.php?223910-ZCA-Bootstrap-4-Template-Support-Thread&p=1401572#post1401572

(obviously it would have to be more general than what is shown).

If the former approach is used, it might make sense to isolate the code at lines 119-140 into a tpl_modules file and include it twice in tpl_checkout_payment_default.php to handle order total and payment modules in the same way.

lat9 commented 3 months ago

For the code change, using a 'modules' file sounds like a good idea. It'll also be needed for tpl_modules_opc_payment_choices.php and tpl_modules_opc_credit_selections.php.

lat9 commented 3 months ago

Noting that this is going to be a PITA for PayPal Restful, since it's Bootstrap-aware and already properly formats its checkbox for the display.

scottcwilson commented 3 months ago

You could scan for "custom-control" and just use the regular logic if this string is present.

lat9 commented 3 months ago

Right, it's just an additional level of complexity.

proseLA commented 2 months ago

you know @swguy, it would be nice on the forum if when i give you an answer that addresses your problem, you can say something about how that fixes your issue, and give me a little credit over there. now you are creating an issue here, referencing my solution without saying anything on the forum.

in recent memory, this is the 2nd time you have done that. on the auth.net support thread, i showed you how to use an existing notifier to solve your problem.

either give me my flowers, and say that solves your problem or do not expect any help from me in the future.

scottcwilson commented 2 months ago

I didn't use your fix for checkboxes/radio buttons in bootstrap, and I think it's a bad idea because it doesn't solve the problem generally, it just patches things for your particular module. This would have to be done every time someone creates a payment module with a radio button or checkbox.

I may use your fix to use the notifier for Authorize CIM, and if I do, I'll certainly credit you.

I credit you, and all the contributors, all the time. Knowing that this is a particular sensitivity for you, I will be even more diligent in the future. Thanks so much for everything you do to keep Zen Cart alive and well.