Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Simple URL question


Guest

Recommended Posts

Posted

Hey guys,

 

I recently added a coupon addon. the input field for the coupon code is located in /boxes/, so it can be displayed in column_left/right.

The box is also displayed on checkout_shipping.

After that, I added a reset coupon fix, so that a user can cancel his code and apply a better code if he likes to do that.

 

The problem is: Entering the coupon code and pressing the OK button forwards the user to the next page (checkout_payment).

What I'd like to see here is the coupon code gets activated and LEAVES ME ON THE SAME PAGE (so that I can see that my code got applied).

 

$info_box_contents[] = array( 'form' => tep_draw_form('coupon', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'post'),

'align' => 'center',

'text' => tep_draw_input_field('coupon_code', '') . tep_hide_session_id() . tep_image_submit('couponcode.jpg', IMAGE_BUTTON_CONTINUE));

Cancelling the code leaves the user on the same page!

$info_box_contents[] = array( 'form' => tep_draw_form('coupon', tep_href_link(basename($PHP_SELF) . '?' . tep_get_all_get_params(), '', $request_type, false), 'get'),

'align' => 'center',

'text' => '<a href="' . basename($PHP_SELF) . '?' . tep_get_all_get_params() . 'reset_coupon=1&osCsid='.tep_session_id().'">' . '<br>' . tep_image_submit('cancelcoupon.jpg', 'cancel code') . '</a>');

 

 

I mean, I know what's happening over there: Submitting the code uses the "next" button on the vottom of the page (because it's using the same function + URL) so it forwards to the next page of checkout process.

I would have to change the URL, similar to the reset_code.

 

But what URL would I have to set there?

Posted

wow, I didn't think that I'd have to bump this again.

Is there no simple solution to this one?

 

I guess I'll only need a URL that leaves me on the same page? What can I use.

  • 2 weeks later...
Posted

Bumping = ignore to many here since it is against forum rules. Plus, doing so so many times, causes the replies count to go up which usually means the problem is being handled. I'm curious why you haven't posted your question in the support thread for whichever contribution it is you installed? That is where support questions should be asked. But if you insist on just posting it anywhere, you should at least mention what you installed so that those that are familiar with the package, and possibly the problem, can help.

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

Archived

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

×
×
  • Create New...