Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

posting variables during checkout process - from shipment to payment


prova2123

Recommended Posts

Posted

Hello,

 

I am editing checkout_shipping.php - i have added 2 dropdown list which the user selects and the selected value needs to be posted to the next page in the checkout process which is checkout_payment.php

 

Now, to retrieve them with

tep_db_prepare_input($HTTP_POST_VARS['my_var']);

i need first to post them.

 

As i understand the page uses this line to post stuff.

 

 

<?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'post', 'onsubmit="return check_form();"') . tep_draw_hidden_field('action', 'process'); ?>

 

 

how do i add my custom fields in that post?

 

 

should i create a new class

 

 

such as <select class="myclass">

 

 

and add this class as a parameter there?

such as tep_draw_hidden_field('action, myclass')

 

Thanks so much for any advice. o:)

!

Posted

I am actually wrong. That post is to change the address.

 

So i do not understand how it goes to the next page when i click continue. where is the form processed and posted?

Posted

Uhmm....

 

I have registered the session btw:

 

if (!tep_session_is_registered('california_county')) tep_session_register('california_county');

if (tep_not_null($HTTP_POST_VARS['california_county'])) {

$california_county = tep_db_prepare_input($HTTP_POST_VARS['california_county']);

}

Posted

I could be wrong....but how come your trying to draw a new form? Why not on checkout_shipping.php make sure you have the 2 drop down menus within the current form with the continue button this way they post with the shipping choice without any new forms or submit buttons.

Posted

Hello,

 

thanks for your message.

 

I don't want to add a new form, i just want to submit my 2 new drop down menu to the next page.

 

from checkout_shipping.php to checkout_payment.php

 

I have added 2 selects, when I press continue in the next page the _POST is empty.

 

 

The problem with the current form is that there are o <form> </form> tags, therefore i cannot see where to put my dropdown.

Posted

So on checkout shipping.....the following is giving your not using templates...if you are then you gotta find these items in that sub folder for the template...

 

Your two drop down menus need to be between

 

echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')

 

and the submit/continue button...

 

 

echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);

 

 

so for example just above the continue button where you see....

<tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

 

you could do the folllowing...

 

<tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<tr>
    <td><?php
//draw your drop-downs here.......
?></td>
  </tr>
<tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

 

hope this helps

Archived

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

×
×
  • Create New...