Jump to content
Sign in to follow this  
Skittles

tep_image_submit to tep_draw_button, potential pitfalls

Recommended Posts

Hi All,

 

It's been a long time since I was active here. Just been busy doing non-osc stuff. But...

 

I'm back to working on osCommerce, and I'm modifying a number of contributions to work with my v2.3.1 install. Among other things, I've installed the Admin Theme Switcher and I've been changing image 'submit' buttons over to the new jquery buttons to take full advantage of the switcher.

 

I ran into a big snafu with Header Tags SEO, though.

 

Turns our the update function on one of the pages uses the 'x' value sent when clicking on the image... but there isn't an 'x' value sent with the jquery button. I'm sure most contributions do not utilize this technique, but it is something to look for if your jquery submit button doesn't work. In this case the code was

 

if (isset($_POST['x'])

 

But it could just as easily have been

 

if (isset($HTTP_POST_VARS['x'])

 

and of course, such a 'flag' could also use the y coordinate.

 

So if your converted button doesn't submit, I recommend doing a quick search for ['x'] or ['y'] (including the brackets,) to eliminate that possibility from the list of things that could be wrong.

 

If you find it is being used, you'll have to find something else to replace it with. You may be able to find a key/value that is being used as part of the if/elseif statement, like I did. Or you may need to add a hidden input with a value to test for.

 

I hope this information will save some of you from the hours of frustration I went through where none of the 'usual suspects' were causing my problem.

 

And if anyone else has an image-to-button 'ah-ha' moment, please feel free to add it here. It would be cool to have a single thread that answers our questions about converting over to the jquery button.

 

Cheers,

-Anita

Share this post


Link to post
Share on other sites

would it not be best posted to the Tips and Tricks section?

ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×