Decimal in product price causes problem with radio button array

How to use decimal prices in a ChronoForms radio button array.

Overview

The issue occurs because array keys cannot contain decimal points, which prevents product descriptions from appearing in emails and PayPal.
Wrap the decimal price keys in quotes within the Custom Code action, but remove the quotes from the Select Drop-Down options box to ensure compatibility with PayPal.

Answered
gC gChambers 04 Feb, 2015
Set-up: CFv5 on J2.5.28 (preparing for J3.x migration). PayPal re-direct plugin.

Conditions: Radio button array with price on left side and description on right side.

Problem: the decimal causes the product description to not appear in email alert and PayPal page. Whole number prices work fine. Prices with decimals do not work.

Question: Is it possible to use prices that contain decimal points?

Decimal in product price causes problem with radio button array image 1

Decimal in product price causes problem with radio button array image 2

Decimal in product price causes problem with radio button array image 3

Decimal in product price causes problem with radio button array image 4


[attachment=0]screenSnag_003.png[/attachment]
[attachment=1]screenSnag_004.png[/attachment]
[attachment=2]screenSnag_002.png[/attachment]
[attachment=3]screenSnag_001.png[/attachment]
Max_admin Max_admin 04 Feb, 2015
Hi,

Array keys can't have decimal points, please wrap all your keys in quotes, e.g: "47.5"

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gC gChambers 05 Feb, 2015
Max,
Thanks for your suggestion. I understand now that array keys can not contain decimal points. However, when I wrap the keys in quotes ("47.50") Paypal rejects the number.
Is there, perhaps, another way to escape the decimal ORalter the custom code to remove the quotes prior to being re-directed to Paypal?
I feel we are close to a solution.

[attachment=0]2-5-2015 9-28-35 AM.png[/attachment]

[attachment=1]2-5-2015 9-30-02 AM.png[/attachment]

[attachment=2]2-5-2015 9-30-49 AM.png[/attachment]
Gr GreyHead 05 Feb, 2015
Answer
Hi gChambers,

Please leave the quotes in the array in the Custom Code action but remove them from the Select Drop-Down options box.

Bob
This topic is locked and no more replies can be posted.