Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is javascript required to be on for OSC?


Jack_mcs

Recommended Posts

I've added the Must Agree To Privacy Statement distribution. It adds a link to a policy page for the visitor to view before signing in. If you click on that link and then click on the continue button on the conditions page, it takes you back to the default page (index.php) instead of to the create account page. I thought to change the link so it would go back using java script:history.back() but if javascript isn't enabled then the button won't work at all. Is javascript required to use OSC or is there a way to code around this problem?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I dont know about the contribution but the version in CVS doesnt require on javascript at all.

 

osCommerce itself can run with or without javascript and with or without cookies enabled.

 

HTH

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

'course, that's a hard link,not a true browser "back".

 

-jared

Thanks for the link. What I need is code to determine whether or not I came from the create account page. Then I could test against that and choose where to return to. I'm sure this is probably doable but it is beyond my php knowledge.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

that'd be in the referrer HTTP header - - there was some discussion about this in another thread, someone said he'd found a way to grab that. Not sure how he did it.

 

I'll see if I can find the thread for you so that you can ask him.

 

-jared

Link to comment
Share on other sites

Thanks for the idea Jared. I didn't find anything in that thread but I wasn't aware of HTTP_REFERER so I will look up how to use it and hopefully find something there.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the link.  What I need is code to determine whether or not I came from the create account page.  Then I could test against that and choose where to return to.  I'm sure this is probably doable but it is beyond my php knowledge.

Here is the code I have added to privacy.php and should give you an good idea how to do it ;)

 

  if (isset($navigation->path[sizeof($navigation->path)-2]) && ($navigation->path[sizeof($navigation->path)-2]['page'] == FILENAME_CREATE_ACCOUNT)) {

 

HTH

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

[quote name=sparky' date='Mar 13 2004, 04:50 PM

Here is the code I have added to privacy.php and should give you an good idea how to do it ;)

 

 ?if (isset($navigation->path[sizeof($navigation->path)-2]) && ($navigation->path[sizeof($navigation->path)-2]['page'] == FILENAME_CREATE_ACCOUNT)) {

 

HTH[/quote]

Thanks for the code. I'm not real familar with php so I may be doing this completely wrong but here is what I tried, which doesn't work BTW.

 

Before the body tag in the policy file I put

<?php
$pagename = FILENAME_DEFAULT;
 if (isset($navigation->path[sizeof($navigation->path)-2]) && ($navigation->path[sizeof($navigation->path)-2]['page'] == FILENAME_CREATE_ACCOUNT)) {
   $pagename = FILENAME_CREATE_ACCOUNT;
 }
?>

 

and then I changed the code for the continue button to

 <td align="right"><?php echo '<a href="' . tep_href_link($pagename) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

 

But no matter from which page I enter, I am always returned to FILENAME_DEFAULT. Any ideas (anyone) where I am going wrong?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...