TOPIC:

Calculation and Mailback format 1 week 13 hours ago #254526

  • Topic Author
  • allantschultz
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
My quote form includes about 150 line items, where each line consists of three elements –
Quantity which is input by the customer
Price which is automatically calculated based on the Quantity
Ext Price which is calculated by (Quantity * Price), and is like this on the form –

(see attached png image for A and B)
A ) when the form opens and before any customer input …

B ) After customer input …

I have two issues I don’t know how to resolve:

1) In my “Mailback Emails” I only want to report “Nonempty values” but the “0” in A ) above shows in the Mailback report as 0 and is not empty. I don’t want anything reported unless it is from the calculation AFTER A CUSTOMER INPUT of Quantity as in B ).

2) I need the Price and the Ext. Price values to display with 2 decimals and with the thousands separator, i.e. B ) above should show –

Cuff Outfit 1 – Quantity 10 Price $: 1,965.87 Ext. Price $: 19,658.70

I will appreciate help in solutions to these two items.
Thank you.

P.S. the code for the calculations that Tihana guided me with is as below:

function ff_quotegeneratorproto02_init() {
setInterval('calc()',500);
} // ff_quotegeneratorproto02_init

function calc() {

if(ff_getElementByName('coonequantity').value > 0 && ff_getElementByName('coonequantity').value <=5) {
ff_getElementByName('cooneprice').value=2069.34;
}
else if(ff_getElementByName('coonequantity').value > 5 && ff_getElementByName('coonequantity').value <=30) {
ff_getElementByName('cooneprice').value=1965.87;
}
else if(ff_getElementByName('coonequantity').value >30 && ff_getElementByName('coonequantity').value <=72) {
ff_getElementByName('cooneprice').value=1862.40;
}
else if(ff_getElementByName('coonequantity').value >72 && ff_getElementByName('coonequantity').value <=249) {
ff_getElementByName('cooneprice').value=1758.94;
}
else if(ff_getElementByName('coonequantity').value >250) {
ff_getElementByName('cooneprice').value=1696.86;
}

ff_getElementByName('cooneextprice').value =
Number(ff_getElementByName('cooneprice').value) *
Number(ff_getElementByName('coonequantity').value);
Attachments:

Please Log in or Create an account to join the conversation.

Calculation and Mailback format 6 days 19 hours ago #254540

  • Topic Author
  • allantschultz
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
On the issue of setting the mailback to only print non-empty items, is there a way to implement an "onchange" like event into each line item such that if the customer doesn't make a change to the item quantity that item's price won't show and it's calculation won't occur and therefore the "0" might not be there?

Please Log in or Create an account to join the conversation.

Calculation and Mailback format 6 days 11 hours ago #254564

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3785
  • Karma: 3
  • Thanks: 303
Hi,

maybe I should to "recreate" calculation function that 0 is not shown
But I can't find your access information for me, please post it here again, because here is multiple messages on the forum


Regards,
Tihana

Please Log in or Create an account to join the conversation.

Calculation and Mailback format 6 days 7 hours ago #254598

  • Topic Author
  • allantschultz
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
Here is my post again ...

My quote form includes about 150 line items, where each line consists of three elements –
Quantity which is input by the customer
Price which is automatically calculated based on the Quantity
Ext Price which is calculated by (Quantity * Price), and is like this on the form –

(see attached png image for A and B )
A ) when the form opens and before any customer input …

B ) After customer input …

I have two issues I don’t know how to resolve:

1) In my “Mailback Emails” I only want to report “Nonempty values” but the “0” in A ) above shows in the Mailback report as 0 and is not empty. I don’t want anything reported unless it is from the calculation AFTER A CUSTOMER INPUT of Quantity as in B ).

2) I need the Price and the Ext. Price values to display with 2 decimals and with the thousands separator, i.e. B ) above should show –

Cuff Outfit 1 – Quantity 10 Price $: 1,965.87 Ext. Price $: 19,658.70

I will appreciate help in solutions to these two items.
Thank you.

P.S. the code for the calculations that Tihana guided me with is as below:

function ff_quotegeneratorproto02_init() {
setInterval('calc()',500);
} // ff_quotegeneratorproto02_init

function calc() {

if(ff_getElementByName('coonequantity').value > 0 && ff_getElementByName('coonequantity').value <=5) {
ff_getElementByName('cooneprice').value=2069.34;
}
else if(ff_getElementByName('coonequantity').value > 5 && ff_getElementByName('coonequantity').value <=30) {
ff_getElementByName('cooneprice').value=1965.87;
}
else if(ff_getElementByName('coonequantity').value >30 && ff_getElementByName('coonequantity').value <=72) {
ff_getElementByName('cooneprice').value=1862.40;
}
else if(ff_getElementByName('coonequantity').value >72 && ff_getElementByName('coonequantity').value <=249) {
ff_getElementByName('cooneprice').value=1758.94;
}
else if(ff_getElementByName('coonequantity').value >250) {
ff_getElementByName('cooneprice').value=1696.86;
}

ff_getElementByName('cooneextprice').value =
Number(ff_getElementByName('cooneprice').value) *
Number(ff_getElementByName('coonequantity').value);
Attachments:

Please Log in or Create an account to join the conversation.

Calculation and Mailback format 6 days 6 hours ago #254609

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3785
  • Karma: 3
  • Thanks: 303
Hi,

I think we don't understood each other :D

I asked for your login information and backend link, I know that you already sent it to me, but I can't find it, because there is more login information on the forum

Thanks for undestanding :)

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Calculation and Mailback format 6 days 5 hours ago #254612

  • Topic Author
  • allantschultz
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
I don't know what "multiple login" means. I must be doing something wrong, but I don't know what it is. Can you try again to tell me what I need to do? I can send you access to site if you give me confidential instructions.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!