Forums

Decimal in product price causes problem with radio button array

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?










[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 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.
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]
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
gChambers 05 Feb, 2015
Thanks, Bob.
This does the trick.
This topic is locked and no more replies can be posted.