Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

Display 'Name' of an option list in the report 03.04.2016 00:07

Hello,

Thanks for your joomla extension, calc builder, it is awesome! I use joomla 3.5 on php 7 and all is working smoothly

I made a price calculator with fields that are option list. So for an option list there is a Name and a Value.
I would like to show in my report (email, pdf) the Name and the value of the fields to make a description of the price they pay and what for. Is it possible? natively.

For example, I have an option list with Name 'Once a week' with the value '15' € and another 'Once a Month' with the value '5' €
I would like to describe the price as follow:

"You have subscribed to our service at the price of 15 € per month. The task will be done Once a week."

So if the field is $price, I can easily display the value in the report using ##price## but how can I display the name of the option list field ?

Thanks in advance,
Best regards,

Pouce

Edited by pouce - 03.04.2016 00:09

Edited by pouce - 03.04.2016 00:10

Re: Display 'Name' of an option list in the report 03.04.2016 10:09

Hello,
thanks for the feedback, highly appreciated!. Yes, you have access either to the value of an option, or the text that shows at the option list (the name). You only need to add _name to get the text attached. For ex, if you have an option list field with name 'myoptionlist', you will be printing the value selected with

##myoptionlist##

and the text attached with

##myoptionlist_name##

Please note you can also freely build different texts according to the value selected, using a new variable at the code, for ex:

if($myoptionlist=="15") { $mynewtext="You have subscribed to our service at the price of 15 € per month. The task will be done Once a week.";}
if($myoptionlist=="5") { $mynewtext="You have subscribed to our service at the price of 5 € per month.....";}


and then print at your output your new ##mynewtext## to have the custom text included.

Hope this helps, regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback