Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

check out page Javascript problems


Go to End


3 Posts   1629 Views

Avatar
JonShutt

Community Member, 244 Posts

3 June 2011 at 12:24pm

Hi there,
I'm gettings there, but on my checkout page, i'm getting various javascript errors - namely 'initialiseForm is not defined'

looking at the source code in my shop, i dont have any javascript links to "sapphire/javascript/Validator.js" which i think i need.

the file exists in my site, but where would I go about adding the code to make the page load this?
also - what other javascript files do I need load to make it run properly?

cheers folks

Avatar
JonShutt

Community Member, 244 Posts

3 June 2011 at 1:50pm

ok, notice on commerce/code/CheckoutPage.php this section is set to block the validor script?
seems strange, instead of blocking it, if i load it, it works.

Requirements::block(THIRDPARTY_DIR . '/behaviour.js');
Requirements::block(THIRDPARTY_DIR . '/prototype.js');
Requirements::block(THIRDPARTY_DIR . '/prototype_improvements.js');
Requirements::block(SAPPHIRE_DIR . '/javascript/Validator.js');

however, the country drop down list doesn't work, when i click on it nothing happens!

Avatar
JonShutt

Community Member, 244 Posts

3 June 2011 at 9:51pm

i realised the problem with the dropdown was something to do with the template i'd chosen. resetttign to the standard theme corrected this problem