Initializations script modification is not saving. HELP!

  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc created the topic: Initializations script modification is not saving. HELP!

I have a script on a form that I need to modify. It is not saving upon modification.

Here is my current working script. I just want to remove the TX tax. If I remove it, it doesn't save. HELP!

setInterval('Kalcprice()', 500);
}
function Kalcprice(){
mytotal=0;
subtotal=0;
calctotal=0;
shippingamount=0;
mytax=0;
tax=0;
state = ff_getElementByName('state').value;

//check if personalized name is set
persname1=0;
persname2=0;
persname3=0;
persname4=0;
persname5=0;

if(ff_getElementByName('name1').value!=''){persname1=Number(ff_getElementByName('qty1').value)*7;}
if(ff_getElementByName('name2').value!=''){persname2=Number(ff_getElementByName('qty2').value)*7;}
if(ff_getElementByName('name3').value!=''){persname3=Number(ff_getElementByName('qty3').value)*7;}
if(ff_getElementByName('name4').value!=''){persname4=Number(ff_getElementByName('qty4').value)*7;}
if(ff_getElementByName('name5').value!=''){persname5=Number(ff_getElementByName('qty5').value)*7;}


//calculate visible totals on each page
ff_getElementByName('total1').value =(Number(ff_getElementByName('qty1').value) * Number(ff_getElementByName('price1').value))+Number(persname1);
ff_getElementByName('total2').value =(Number(ff_getElementByName('qty2').value) * Number(ff_getElementByName('price2').value))+Number(persname2);
ff_getElementByName('total3').value =(Number(ff_getElementByName('qty3').value) * Number(ff_getElementByName('price3').value))+Number(persname3);
ff_getElementByName('total4').value =(Number(ff_getElementByName('qty4').value) * Number(ff_getElementByName('price4').value))+Number(persname4);
ff_getElementByName('total5').value =(Number(ff_getElementByName('qty5').value) * Number(ff_getElementByName('price5').value))+Number(persname5);

//calculate the hidden total
subtotal=
Number(ff_getElementByName('total1').value)+
Number(ff_getElementByName('total2').value)+
Number(ff_getElementByName('total3').value)+
Number(ff_getElementByName('total4').value)+
Number(ff_getElementByName('total5').value);

mytotal=Number(subtotal.toFixed(2));



//calc shipping
if(mytotal>0&&mytotal<=25){subtotal+=Number(7.95);shippingamount=Number(7.95);}
if(mytotal>25&&mytotal<=50){subtotal+=Number(9.95);shippingamount=Number(9.95);}
if(mytotal>50&&mytotal<=75){subtotal+=Number(10.95);shippingamount=Number(10.95);}
if(mytotal>75&&mytotal<=100){subtotal+=Number(12.95);shippingamount=Number(12.95);}
if(mytotal>100&&mytotal<=150){subtotal+=Number(14.95);shippingamount=Number(14.95);}
if(mytotal>150&&mytotal<=200){subtotal+=Number(17.95);shippingamount=Number(17.95);}
if(mytotal>200&&mytotal<=250){subtotal+=Number(19.95);shippingamount=Number(19.95);}
if(mytotal>250&&mytotal<=300){subtotal+=Number(21.95);shippingamount=Number(21.95);}
if(mytotal>300&&mytotal<=400){subtotal+=Number(23.95);shippingamount=Number(23.95);}
if(mytotal>400&&mytotal<=500){subtotal+=Number(25.95);shippingamount=Number(25.95);}
if(mytotal>500&&mytotal<=600){subtotal+=Number(27.95);shippingamount=Number(27.95);}



ff_getElementByName('total_hidden').value=subtotal.toFixed(2);



ff_getElementByName('shipping_amount1').value=shippingamount;
ff_getElementByName('shipping_amount2').value=shippingamount;
ff_getElementByName('shipping_amount3').value=shippingamount;
ff_getElementByName('shipping_amount4').value=shippingamount;
ff_getElementByName('shipping_amount5').value=shippingamount;
mytotaltax=0;
mytotaltax=mytotal-Number(persname5)-Number(persname4)-Number(persname3)-Number(persname2)-Number(persname1);

//calc Tax

if(state == 'IL'){
mytax=(mytotaltax/100)*6.25;
tax=mytax.toFixed(2);
ff_getElementByName('tax').value=tax;
calctotal=Number(ff_getElementByName('total_hidden').value)+Number(tax);
} else {
calctotal=Number(ff_getElementByName('total_hidden').value);
}

//show order and tax amount on each page
ff_getElementByName('order_total1').value=calctotal.toFixed(2);
ff_getElementByName('order_total2').value=calctotal.toFixed(2);
ff_getElementByName('order_total3').value=calctotal.toFixed(2);
ff_getElementByName('order_total4').value=calctotal.toFixed(2);
ff_getElementByName('order_total5').value=calctotal.toFixed(2);

ff_getElementByName('tax_total1').value=Number(tax);
ff_getElementByName('tax_total2').value=Number(tax);
ff_getElementByName('tax_total3').value=Number(tax);
ff_getElementByName('tax_total4').value=Number(tax);
ff_getElementByName('tax_total5').value=Number(tax);

}
#237588
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Initializations script modification is not saving. HELP!

Hello,

You wrote "I just want to remove the TX tax". Please explain what exactly are you trying to remove.

Is the problem that you do a change in a script, save it, but next time you enter the script nothing is changed?
If that is the case, please try to clear cache.

Go to Joomla > System. Clear Cache and Clear Expired Cache.
Check if you are running Joomla Cache on your website .
You can check it System > Global Config. > System > Cache Settings > System Cache > and set it to "Off".

Regards,

Mihaela
#237592
  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc replied the topic: Initializations script modification is not saving. HELP!

Good day. Thank you for your reply!

I sent the wrong script to you. The script I show previously is what I want saved.

I cannot modify the script and save it. I can delete the script and save it. When I try to re-add the script it won't save. I have had to restore the site.

I have no caching enabled. This is a new one for me. Never had trouble like this prior.

I'd be happy to have you look at it.
#237594
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Initializations script modification is not saving. HELP!

Hello,

Ok, I Understand. So no changes to the script are saved. Did you for example try to add an element to your form to see whether that will work?

You can send me backend login info to your site so I can take a look at this form the first hand. Send it to mihaela.kobovac@crosstec.org .
Also, in the email write the name of the form that I should look at.

Regards,

Mihaela
#237597
  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc replied the topic: Initializations script modification is not saving. HELP!

So sorry Mihaela, I was checking to see if you logged in and the user wasn’t enabled. Ugh!

It is now. Please try to login and see my issue on this script.
#237607
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Initializations script modification is not saving. HELP!

Hello,

Thank you for your backend login info.

I've been trying to resolve the issue so in order to see what might be causing the Script not to save I have set Error Reporting to "Development".

After that change, the backend all I'm getting is a white page.

Can you please check with your host what has happened?

Regards,

Mihaela
#237638
Moderators: ForumSupporttomeperica
Time to create page: 0.068 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here